diff --git a/app/actions.tsx b/app/actions.tsx index f3b3c44f..6617ab64 100644 --- a/app/actions.tsx +++ b/app/actions.tsx @@ -139,7 +139,7 @@ async function submit(formData?: FormData, skip?: boolean) { // If not using a tool, this model generates the answer while ( useSpecificAPI - ? toolOutputs.length === 0 && answer.length === 0 + ? answer.length === 0 : answer.length === 0 && !errorOccurred ) { // Search the web and generate the answer diff --git a/lib/agents/researcher.tsx b/lib/agents/researcher.tsx index 6ef6d53b..f2857bbd 100644 --- a/lib/agents/researcher.tsx +++ b/lib/agents/researcher.tsx @@ -43,6 +43,7 @@ Tool Usage Guide: - "What are some parks in San Francisco?" When you use 'geospatialQueryTool', you don't need to describe how the map will change; simply provide your textual answer based on the query, and trust the map will update appropriately. +When tools are not needed, provide direct, helpful answers based on your knowledge. Always aim to directly address the user's question. If using information from a tool (like web search), cite the source URL. Match the language of your response to the user's language.`;