Spaces:
Sleeping
Sleeping
Update app/agent.py
Browse files- app/agent.py +1 -1
app/agent.py
CHANGED
|
@@ -94,7 +94,7 @@ def chat(gr_history, user_msg):
|
|
| 94 |
response = openai.chat.completions.create(model=MODEL_TEXT, messages=messages)
|
| 95 |
|
| 96 |
# Extraer la respuesta final del asistente
|
| 97 |
-
reply = response.choices[0].message
|
| 98 |
|
| 99 |
# Actualizar el historial de Gradio
|
| 100 |
gr_history.append((user_msg, reply))
|
|
|
|
| 94 |
response = openai.chat.completions.create(model=MODEL_TEXT, messages=messages)
|
| 95 |
|
| 96 |
# Extraer la respuesta final del asistente
|
| 97 |
+
reply = response.choices[0].message.content
|
| 98 |
|
| 99 |
# Actualizar el historial de Gradio
|
| 100 |
gr_history.append((user_msg, reply))
|