Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,8 +94,8 @@ def chat(message,
|
|
| 94 |
|
| 95 |
messages.append(HM(content=message))
|
| 96 |
memory=MEM(memory_key="history")
|
| 97 |
-
agent=Ex
|
| 98 |
-
return agent(messages)
|
| 99 |
ai1=gr.ChatInterface(
|
| 100 |
chat,
|
| 101 |
chatbot=chatbot,
|
|
|
|
| 94 |
|
| 95 |
messages.append(HM(content=message))
|
| 96 |
memory=MEM(memory_key="history")
|
| 97 |
+
agent=Ex(agent=Agent(llm,tools,prompt),tools=tools,verbose=True,handle_parsing_errors=True,memory=memory)
|
| 98 |
+
return agent.invoke({"input":messages,"chat_history":memory})
|
| 99 |
ai1=gr.ChatInterface(
|
| 100 |
chat,
|
| 101 |
chatbot=chatbot,
|