Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ class BasicAgent:
|
|
| 17 |
def __call__(self, question: str, file_path: str) -> str:
|
| 18 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 19 |
state = assistant_agent.invoke({"question": question, "file_path": file_path})
|
| 20 |
-
answer = state["messages"][-1]
|
| 21 |
answer = answer.split("FINAL ANSWER:")[-1].strip()
|
| 22 |
print(f"Agent returning answer: {answer}")
|
| 23 |
return answer
|
|
|
|
| 17 |
def __call__(self, question: str, file_path: str) -> str:
|
| 18 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 19 |
state = assistant_agent.invoke({"question": question, "file_path": file_path})
|
| 20 |
+
answer = state["messages"][-1].content
|
| 21 |
answer = answer.split("FINAL ANSWER:")[-1].strip()
|
| 22 |
print(f"Agent returning answer: {answer}")
|
| 23 |
return answer
|