kawre commited on
Commit
23b51bf
·
verified ·
1 Parent(s): a1f93f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -43,9 +43,10 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
43
  response_aux2 = f"Erro ao gerar resposta: {e}"
44
 
45
  # Atualiza histórico no formato correto para o Gradio Chatbot
46
- history.append((message, response_aux2))
 
47
 
48
- return history, history
49
 
50
 
51
  # Atualiza histórico do chat
 
43
  response_aux2 = f"Erro ao gerar resposta: {e}"
44
 
45
  # Atualiza histórico no formato correto para o Gradio Chatbot
46
+ history.append({"role": "user", "content": message})
47
+ history.append({"role": "assistant", "content": response_aux2})
48
 
49
+ return history, history
50
 
51
 
52
  # Atualiza histórico do chat