You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow text tool to give agent ability to terminate research
We'd moved research planner to only use tools in enum of schema. This
enum tool enforcement prevented model from terminating research by
setting tool field to empty.
Fix the issue by adding text tool to research tools enum and tell
model to use that to terminate research and start response instead.
Copy file name to clipboardExpand all lines: src/khoj/processor/conversation/prompts.py
+1-1
Original file line number
Diff line number
Diff line change
@@ -735,7 +735,7 @@
735
735
- Ensure that all required context is passed to the tool AIs for successful execution. They only know the context provided in your query.
736
736
- Think step by step to come up with creative strategies when the previous iteration did not yield useful results.
737
737
- You are allowed upto {max_iterations} iterations to use the help of the provided tool AIs to answer the user's question.
738
-
- Stop when you have the required information by returning a JSON object with an empty "tool" field. E.g., {{scratchpad: "I have all I need", tool: "", query: ""}}
738
+
- Stop when you have the required information by returning a JSON object with the "tool" field set to "text" and "query" field empty. E.g., {{"scratchpad": "I have all I need", "tool": "text", "query": ""}}
739
739
740
740
# Examples
741
741
Assuming you can search the user's notes and the internet.
Copy file name to clipboardExpand all lines: src/khoj/utils/helpers.py
+1
Original file line number
Diff line number
Diff line change
@@ -389,6 +389,7 @@ class ConversationCommand(str, Enum):
389
389
ConversationCommand.Online: "To search the internet for information. Useful to get a quick, broad overview from the internet. Provide all relevant context to ensure new searches, not in previous iterations, are performed.",
390
390
ConversationCommand.Webpage: "To extract information from webpages. Useful for more detailed research from the internet. Usually used when you know the webpage links to refer to. Share the webpage links and information to extract in your query.",
0 commit comments