macadeliccc commited on
Commit
5f7b7b0
·
1 Parent(s): 6214252
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -28,12 +28,14 @@ start_ochat_server()
28
  def user(message, history):
29
  return "", history + [[message, None]]
30
 
 
31
  def bot(history):
32
  if history and history[-1] and history[-1][0]:
33
  user_message = history[-1][0]
34
  bot_response = chat_with_ochat(user_message)
35
- return "", history + [(None, bot_response)]
36
- return "", history
 
37
  # Function to send a message to the ochat server and get a response
38
  def chat_with_ochat(message):
39
  url = "http://0.0.0.0:18888/v1/chat/completions"
 
28
  def user(message, history):
29
  return "", history + [[message, None]]
30
 
31
+
32
  def bot(history):
33
  if history and history[-1] and history[-1][0]:
34
  user_message = history[-1][0]
35
  bot_response = chat_with_ochat(user_message)
36
+ history.append([user_message, bot_response])
37
+ return history
38
+
39
  # Function to send a message to the ochat server and get a response
40
  def chat_with_ochat(message):
41
  url = "http://0.0.0.0:18888/v1/chat/completions"