Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,9 +9,9 @@ def respond(message, history):
|
|
| 9 |
|
| 10 |
if history:
|
| 11 |
messages.extend(history)
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
def echo(message, history):
|
| 17 |
return message
|
|
|
|
| 9 |
|
| 10 |
if history:
|
| 11 |
messages.extend(history)
|
| 12 |
+
messages.append({“role”: “user”, “content”: message})
|
| 13 |
+
response = client.chat_completion(messages, max_tokens = 100)
|
| 14 |
+
return response[‘choices’][0][‘message’][‘content’].strip()
|
| 15 |
|
| 16 |
def echo(message, history):
|
| 17 |
return message
|