albertosanzdev commited on
Commit
7cefabe
·
verified ·
1 Parent(s): f46e9b5

Update app/agent.py

Browse files
Files changed (1) hide show
  1. 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["content"]
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))