ThienLe commited on
Commit
b61bd65
·
verified ·
1 Parent(s): a847c9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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]["content"]
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