From f5a3cf5b09f5845a7177d1fff1c97b5267804202 Mon Sep 17 00:00:00 2001 From: "Jonathan C. McKinney" Date: Thu, 31 Oct 2024 09:11:34 -0700 Subject: [PATCH] Reminder it needs to continue executing code to keep going --- openai_server/agent_tools/bing_search.py | 7 ++++++- openai_server/agent_tools/google_search.py | 7 ++++++- openai_server/agent_tools/news_query.py | 7 ++++++- openai_server/agent_tools/scholar_papers_query.py | 7 ++++++- src/version.py | 2 +- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/openai_server/agent_tools/bing_search.py b/openai_server/agent_tools/bing_search.py index 06cc641f5..0979e39d3 100644 --- a/openai_server/agent_tools/bing_search.py +++ b/openai_server/agent_tools/bing_search.py @@ -172,7 +172,12 @@ def bing_search(): for result in results[:args.limit]: print_func(result, args) - print("""\n\nRemember web snippets are short and often non-specific. For specific information, you must use ask_question_about_documents.py on URLs or documents, ask_question_about_image.py for images, or download_web_video.py for videos, etc.""") + print("""\n\nRemember web snippets are short and often non-specific. +For specific information, you must use ask_question_about_documents.py on URLs or documents, +ask_question_about_image.py for images, +or download_web_video.py for videos, etc. +If you have not found a good response to the user's original query, continue to write executable code to do so. +""") if __name__ == "__main__": diff --git a/openai_server/agent_tools/google_search.py b/openai_server/agent_tools/google_search.py index a0597bab0..37b402766 100644 --- a/openai_server/agent_tools/google_search.py +++ b/openai_server/agent_tools/google_search.py @@ -253,7 +253,12 @@ def print_results(results: Dict[str, Any], args): print("\nFull JSON output:") print(json.dumps(results, indent=2, default=str)) - print("""\n\nRemember web snippets are short and often non-specific. For specific information, you must use ask_question_about_documents.py on URLs or documents, ask_question_about_image.py for images, or download_web_video.py for videos, etc.""") + print("""\n\nRemember web snippets are short and often non-specific. +For specific information, you must use ask_question_about_documents.py on URLs or documents, +ask_question_about_image.py for images, +or download_web_video.py for videos, etc. +If you have not found a good response to the user's original query, continue to write executable code to do so. +""") def google_search(): diff --git a/openai_server/agent_tools/news_query.py b/openai_server/agent_tools/news_query.py index 1547919c4..e0a3e329c 100644 --- a/openai_server/agent_tools/news_query.py +++ b/openai_server/agent_tools/news_query.py @@ -137,7 +137,12 @@ def main(): except requests.RequestException as e: print(f"An error occurred while fetching news: {e}") - print("""Remember to not only use these news snippets, but also use ask_question_about_documents.py to ask questions about URLs or documents, ask_question_about_image.py to ask questions about images, or download_web_video.py to download videos, etc.""") + print("""\n\nRemember to not only use these news snippets, +but also use ask_question_about_documents.py to ask questions about URLs or documents, +ask_question_about_image.py to ask questions about images, +or download_web_video.py to download videos, etc. +If you have not found a good response to the user's original query, continue to write executable code to do so. +""") if __name__ == "__main__": diff --git a/openai_server/agent_tools/scholar_papers_query.py b/openai_server/agent_tools/scholar_papers_query.py index a8812933d..08563aa77 100644 --- a/openai_server/agent_tools/scholar_papers_query.py +++ b/openai_server/agent_tools/scholar_papers_query.py @@ -171,7 +171,12 @@ def main(): if i == args.limit: break - print("""\n\nRemember to not only use these scientific scholar paper listings, but also use ask_question_about_documents.py to ask questions about URLs or PDF documents, ask_question_about_image.py to ask questions about images, or download_web_video.py to download videos, etc.""") + print("""\n\nRemember to not only use these scientific scholar paper listings, +but also use ask_question_about_documents.py to ask questions about URLs or PDF documents, +ask_question_about_image.py to ask questions about images, +or download_web_video.py to download videos, etc. +If you have not found a good response to the user's original query, continue to write executable code to do so. +""") if __name__ == "__main__": main() diff --git a/src/version.py b/src/version.py index fe132c88a..76197b9fa 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -__version__ = "168e1574db6c2f9c233b7dc5e3d3d02f908dda67" +__version__ = "624e361f9ad2155bfee5c226bf21234f4a184b0a"