Spaces:
Sleeping
Sleeping
EtienneB
commited on
Commit
·
263c392
1
Parent(s):
cdc6431
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,8 @@ class BasicAgent:
|
|
26 |
# and returns a dictionary with the processed messages.
|
27 |
response_messages = self.graph.invoke({"messages": messages})
|
28 |
# The answer is expected to be in the 'content' of the last message.
|
29 |
-
answer = response_messages['messages']
|
|
|
30 |
print(f"Agent full response: {answer}")
|
31 |
return answer
|
32 |
|
|
|
26 |
# and returns a dictionary with the processed messages.
|
27 |
response_messages = self.graph.invoke({"messages": messages})
|
28 |
# The answer is expected to be in the 'content' of the last message.
|
29 |
+
answer = response_messages['messages'][-1].content
|
30 |
+
answer = answer.strip('"').strip("'")
|
31 |
print(f"Agent full response: {answer}")
|
32 |
return answer
|
33 |
|