From 61c10f767a6e304c00d3e30cdc30d0c76e12985b Mon Sep 17 00:00:00 2001 From: zaidmukaddam Date: Wed, 6 Nov 2024 21:32:52 +0530 Subject: [PATCH] Refactor active tools in chat API and update trip query guidelines for clarity --- app/api/chat/route.ts | 4 ++-- app/search/page.tsx | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 2f75f51..f3f3d2d 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -53,7 +53,7 @@ export async function POST(req: Request) { topP: 0.5, frequencyPenalty: 0, presencePenalty: 0, - experimental_activeTools: ["get_weather_data", "programming", "web_search", "text_translate", "find_place"], + experimental_activeTools: ["get_weather_data", "find_place", "programming", "web_search", "text_translate",], system: ` You are an expert AI web search engine called MiniPerplx, that helps users find information on the internet with no bullshit talks. Always start with running the tool(s) and then and then only write your response AT ALL COSTS!! @@ -117,7 +117,7 @@ You can also accept and analyze images, like what is in the image, or what is th Follow the format and guidelines for each tool and provide the response accordingly. Remember to use the appropriate tool for each task. No need to panic, just follow the guidelines and you'll do great! ## Trip based queries: -- For queries related to trips, use the find_place tool for map location and web_search tool to find information about places, directions, or reviews. +- For queries related to trips, always use the find_place tool for map location and then run the web_search tool to find information about places, directions, or reviews. - Calling web and find place tools in the same response is allowed, but do not call the same tool in a response at all costs!! ## Programming Tool Guidelines: diff --git a/app/search/page.tsx b/app/search/page.tsx index 8bb20a8..7602c24 100644 --- a/app/search/page.tsx +++ b/app/search/page.tsx @@ -437,9 +437,6 @@ GPT-4o has been re-enabled! You can use it by selecting the model from the dropd }; - - // Google Maps components - const TranslationTool: React.FC<{ toolInvocation: ToolInvocation; result: any }> = ({ toolInvocation, result }) => { const [isPlaying, setIsPlaying] = useState(false); const [audioUrl, setAudioUrl] = useState(null);