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