antonioschiro commited on
Commit
f87397d
·
verified ·
1 Parent(s): 2739b0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -26,7 +26,9 @@ class BasicAgent:
26
  state_dict = alfred.invoke({"messages": [HumanMessage(content = question)]})
27
  response = state_dict["messages"][-1]
28
  try:
29
- return response.content
 
 
30
  except:
31
  return "Sorry, I can't answer to this question."
32
 
 
26
  state_dict = alfred.invoke({"messages": [HumanMessage(content = question)]})
27
  response = state_dict["messages"][-1]
28
  try:
29
+ response = response.content
30
+ response = response.split("Final answer:")[1].strip()
31
+ return response
32
  except:
33
  return "Sorry, I can't answer to this question."
34