Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -99,10 +99,15 @@ def tool_selector(state: AgentState) -> AgentState:
|
|
99 |
" {'action':'excel'}\n"
|
100 |
" {'action':'final'}\n"
|
101 |
"if the tool you want isnt listed above, return {'action':'final'}"
|
|
|
|
|
|
|
|
|
|
|
102 |
)
|
103 |
)
|
104 |
raw = LLM(state.messages + [prompt]).content.strip()
|
105 |
-
|
106 |
state.add(AIMessage(content=raw))
|
107 |
parsed = safe_json(raw)
|
108 |
# parsed = json.loads(raw)
|
|
|
99 |
" {'action':'excel'}\n"
|
100 |
" {'action':'final'}\n"
|
101 |
"if the tool you want isnt listed above, return {'action':'final'}"
|
102 |
+
"Use wiki if you need to search online for information"
|
103 |
+
"Use ocr if the question is about an image"
|
104 |
+
"Use audio if the question is about an audio file"
|
105 |
+
"Use excel if the question is about an excel file"
|
106 |
+
|
107 |
)
|
108 |
)
|
109 |
raw = LLM(state.messages + [prompt]).content.strip()
|
110 |
+
print(f"Tool selector response: {raw}")
|
111 |
state.add(AIMessage(content=raw))
|
112 |
parsed = safe_json(raw)
|
113 |
# parsed = json.loads(raw)
|