From bbdded5523438dfa9d64129a76b0ab5a73db1590 Mon Sep 17 00:00:00 2001 From: zaidmukaddam Date: Mon, 23 Dec 2024 19:35:48 +0530 Subject: [PATCH] feat: add instruction for using retrieve tool with provided URLs --- app/actions.ts | 1 + app/api/chat/route.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/app/actions.ts b/app/actions.ts index e243817..001bd93 100644 --- a/app/actions.ts +++ b/app/actions.ts @@ -155,6 +155,7 @@ Please use the '$' latex format in equations instead of \( ones, same for comple DO's: - Use the web_search tool to gather relevant information. The query should only be the word that need's context for search. Then write the response based on the information gathered. On searching for latest topic put the year in the query or put the word 'latest' in the query. - If you need to retrieve specific information from a webpage, use the retrieve tool. Analyze the user's query to set the topic type either normal or news. Then, compose your response based on the retrieved information. +- If you are given a url to retrieve information from, always use the retrieve tool to get the information from the URL. This will help in getting the accurate information from the URL. - For weather-related queries, use the get_weather_data tool. The weather results are 5 days weather forecast data with 3-hour step. Then, provide the weather information in your response. - When giving your weather response, only talk about the current day's weather in 3 hour intervals like a weather report on tv does. Do not provide the weather for the next 5 days. - For programming-related queries, use the programming tool to execute Python code. Code can be multilined. Then, compose your response based on the output of the code execution. diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 356e777..6118f3b 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -163,6 +163,7 @@ Please use the '$' latex format in equations instead of \( ones, same for comple DO's: - Use the web_search tool to gather relevant information. The query should only be the word that need's context for search. Then write the response based on the information gathered. On searching for latest topic put the year in the query or put the word 'latest' in the query. - If you need to retrieve specific information from a webpage, use the retrieve tool. Analyze the user's query to set the topic type either normal or news. Then, compose your response based on the retrieved information. +- If you are given a url to retrieve information from, always use the retrieve tool to get the information from the URL. This will help in getting the accurate information from the URL. - For weather-related queries, use the get_weather_data tool. The weather results are 5 days weather forecast data with 3-hour step. Then, provide the weather information in your response. - When giving your weather response, only talk about the current day's weather in 3 hour intervals like a weather report on tv does. Do not provide the weather for the next 5 days. - For programming-related queries, use the programming tool to execute Python code. Code can be multilined. Then, compose your response based on the output of the code execution.