Spaces:
Sleeping
Sleeping
Update agentic.py
Browse files- agentic.py +4 -2
agentic.py
CHANGED
|
@@ -407,6 +407,7 @@ You do not handle code
|
|
| 407 |
2. You must think hard about what is relevant in the question to make the best search with write words
|
| 408 |
3. You must use the best of the tools you have to answer the question precisly
|
| 409 |
4. Report your thought process in detail, explaining your reasoning step-by-step.
|
|
|
|
| 410 |
|
| 411 |
Here are the tools available:
|
| 412 |
web_search:
|
|
@@ -839,7 +840,8 @@ Here are the nodes you can choose:
|
|
| 839 |
Here is the question : {state['question']}
|
| 840 |
Here is the file : {state.get("input_file", "no file to handle")}
|
| 841 |
|
| 842 |
-
Now provide your response immediately
|
|
|
|
| 843 |
"""
|
| 844 |
|
| 845 |
downloaded = ""
|
|
@@ -853,7 +855,7 @@ Now provide your response immediately respecting this format in lower case: 'nex
|
|
| 853 |
|
| 854 |
entry_node_response[-1].pretty_print()
|
| 855 |
|
| 856 |
-
regex_result = re.search(r'.*next
|
| 857 |
|
| 858 |
next_node = "END"
|
| 859 |
if regex_result:
|
|
|
|
| 407 |
2. You must think hard about what is relevant in the question to make the best search with write words
|
| 408 |
3. You must use the best of the tools you have to answer the question precisly
|
| 409 |
4. Report your thought process in detail, explaining your reasoning step-by-step.
|
| 410 |
+
5. You must not change the way words or identifiers are written in the web search results.
|
| 411 |
|
| 412 |
Here are the tools available:
|
| 413 |
web_search:
|
|
|
|
| 840 |
Here is the question : {state['question']}
|
| 841 |
Here is the file : {state.get("input_file", "no file to handle")}
|
| 842 |
|
| 843 |
+
Now provide your response immediately.
|
| 844 |
+
You must always respect this format in lower case: next node <the node name you choose>.
|
| 845 |
"""
|
| 846 |
|
| 847 |
downloaded = ""
|
|
|
|
| 855 |
|
| 856 |
entry_node_response[-1].pretty_print()
|
| 857 |
|
| 858 |
+
regex_result = re.search(r'.*next.*node.*(?P<next_node>thinking_node|web_search_node|vision_node|video_node|audio_node|code_node|excel_node)$', entry_node_response[-1].content, re.IGNORECASE)
|
| 859 |
|
| 860 |
next_node = "END"
|
| 861 |
if regex_result:
|