artificialguybr commited on
Commit
28f2631
·
1 Parent(s): bfe7113

Refactor chat history in app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -101,7 +101,7 @@ with gr.Blocks() as demo:
101
  print("Updating chatbot...")
102
  chat_history = user(message, chat_history)
103
  chat_history, _, _ = chat(chat_history, system_msg.value, max_tokens.value, temperature.value, top_p.value, 40, 1.1)
104
- chat_history = [(msg["role"], msg["content"]) for msg in chat_history]
105
  return chat_history, chat_history, ""
106
 
107
  submit.click(
 
101
  print("Updating chatbot...")
102
  chat_history = user(message, chat_history)
103
  chat_history, _, _ = chat(chat_history, system_msg.value, max_tokens.value, temperature.value, top_p.value, 40, 1.1)
104
+ chat_history = [msg["content"] for msg in chat_history]
105
  return chat_history, chat_history, ""
106
 
107
  submit.click(