File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ addTool({
269269 . default ( 'google' ) ,
270270 cursor : z . string ( )
271271 . optional ( ) ,
272- } ) ) . min ( 1 ) . max ( 10 ) ,
272+ } ) ) . min ( 1 ) . max ( 5 ) ,
273273 } ) ,
274274 execute : tool_fn ( 'search_engine_batch' , async ( { queries} , ctx ) => {
275275 const search_promises = queries . map ( ( { query, engine, cursor} ) => {
@@ -313,7 +313,7 @@ addTool({
313313 } ) ;
314314 } ) ;
315315
316- const results = await Promise . all ( search_promises ) ;
316+ const results = await Promise . allSettled ( search_promises ) ;
317317 return JSON . stringify ( results , null , 2 ) ;
318318 } ) ,
319319} ) ;
@@ -330,7 +330,7 @@ addTool({
330330 openWorldHint : true ,
331331 } ,
332332 parameters : z . object ( {
333- urls : z . array ( z . string ( ) . url ( ) ) . min ( 1 ) . max ( 10 ) . describe ( 'Array of URLs to scrape (max 10 )' )
333+ urls : z . array ( z . string ( ) . url ( ) ) . min ( 1 ) . max ( 5 ) . describe ( 'Array of URLs to scrape (max 5 )' )
334334 } ) ,
335335 execute : tool_fn ( 'scrape_batch' , async ( { urls} , ctx ) => {
336336 const scrapePromises = urls . map ( url =>
@@ -351,7 +351,7 @@ addTool({
351351 } ) )
352352 ) ;
353353
354- const results = await Promise . all ( scrapePromises ) ;
354+ const results = await Promise . allSettled ( scrapePromises ) ;
355355 return JSON . stringify ( results , null , 2 ) ;
356356 } ) ,
357357} ) ;
You can’t perform that action at this time.
0 commit comments