Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,10 +16,10 @@ def respond(message, history):
|
|
| 16 |
]
|
| 17 |
|
| 18 |
if history:
|
| 19 |
-
|
| 20 |
|
| 21 |
response = client.chat_completion(
|
| 22 |
-
|
| 23 |
)
|
| 24 |
|
| 25 |
return response['choices'][0]['message']['content'].strip
|
|
|
|
| 16 |
]
|
| 17 |
|
| 18 |
if history:
|
| 19 |
+
messages.extend(history)
|
| 20 |
|
| 21 |
response = client.chat_completion(
|
| 22 |
+
messages, max_tokens = 100
|
| 23 |
)
|
| 24 |
|
| 25 |
return response['choices'][0]['message']['content'].strip
|