Limit for concurrecy ofscraping #31
Merged
+52
−31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes various enhancements and optimizations to the web search functionality in the
app/(playground)/p/[agentId]/beta-proto
directory. The most important changes include adding a newrelevance
field to web search items, optimizing the web search stream processing by chunking items, and increasing the maximum number of search results.Enhancements to web search functionality:
app/(playground)/p/[agentId]/beta-proto/graph/actions.ts
: Added arelevance
field to the web search data structure to improve result sorting. (app/(playground)/p/[agentId]/beta-proto/graph/actions.tsR560)app/(playground)/p/[agentId]/beta-proto/web-search/types.ts
: Updated theWebSearchItem
interface to include the newrelevance
field. (app/(playground)/p/[agentId]/beta-proto/web-search/types.tsR42)Optimizations to web search processing:
app/(playground)/p/[agentId]/beta-proto/web-search/server-action.ts
: Introduced chunking of web search items to process them in smaller batches, improving efficiency. (app/(playground)/p/[agentId]/beta-proto/web-search/server-action.tsR107-R121, app/(playground)/p/[agentId]/beta-proto/web-search/server-action.tsR152)Configuration changes:
app/(playground)/p/[agentId]/beta-proto/web-search/tavily.ts
: Increased themax_results
parameter from 1 to 3 to retrieve more search results. (app/(playground)/p/[agentId]/beta-proto/web-search/tavily.tsL84-R84)Code structure improvements:
app/(playground)/p/[agentId]/beta-proto/web-search/server-action.ts
: Refactored imports to includeWebSearchItemReference
type, improving code readability and maintainability. (app/(playground)/p/[agentId]/beta-proto/web-search/server-action.tsL15-R20)Release flow:
The database migration does not exist in these changes. So I'll release it and check it after approval.