An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
fix: Update search depth parameter to accept string values
Yoshiki Miura812bfb51d121
diff --git a/lib/agents/tools/search.tsx b/lib/agents/tools/search.tsxindex be98aece..f4efc187 100644--- a/lib/agents/tools/search.tsx+++ b/lib/agents/tools/search.tsx@@ -81,7 +81,7 @@ export const searchTool = ({ uiStream, fullResponse }: ToolProps) =>: searxngSearch)(filledQuery,max_results,- effectiveSearchDepth,+ effectiveSearchDepth === 'advanced' ? 'advanced' : 'basic',include_domains,exclude_domains)diff --git a/lib/schema/search.tsx b/lib/schema/search.tsxindex 822982be..51b84bf2 100644--- a/lib/schema/search.tsx+++ b/lib/schema/search.tsx@@ -7,8 +7,10 @@ export const searchSchema = z.object({.number().describe('The maximum number of results to return'),search_depth: z- .enum(['basic', 'advanced'])- .describe('The depth of the search'),+ .string()+ .describe(+ 'The depth of the search. Allowed values are "basic" or "advanced"'+ ),include_domains: z.array(z.string()).optional()