Spaces:
Running
on
Zero
Running
on
Zero
macadeliccc
commited on
Commit
·
5f7b7b0
1
Parent(s):
6214252
test
Browse files
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 |
-
|
36 |
-
return
|
|
|
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"
|