Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,11 +69,10 @@ agent = initialize_agent(
|
|
| 69 |
|
| 70 |
|
| 71 |
def chat_with_agent(user_input, history):
|
| 72 |
-
|
| 73 |
-
return history + [{"role": "assistant", "content": "Please enter a message to start the conversation!"}]
|
| 74 |
|
| 75 |
try:
|
| 76 |
-
bot_response = agent.
|
| 77 |
except Exception as e:
|
| 78 |
bot_response = f"Sorry, an error occurred: {e}"
|
| 79 |
|
|
|
|
| 69 |
|
| 70 |
|
| 71 |
def chat_with_agent(user_input, history):
|
| 72 |
+
# ... (rest of the function)
|
|
|
|
| 73 |
|
| 74 |
try:
|
| 75 |
+
bot_response = agent(user_input) # Use agent(user_input) or agent.invoke(user_input)
|
| 76 |
except Exception as e:
|
| 77 |
bot_response = f"Sorry, an error occurred: {e}"
|
| 78 |
|