Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,10 +10,10 @@ def responding(message, history):
|
|
| 10 |
if history:
|
| 11 |
messages.extend(history)
|
| 12 |
messages.append({"role": "user", "content": "messages"})
|
| 13 |
-
responses = client.chat_completion(messages, max_tokens =
|
| 14 |
|
| 15 |
return responses['choices'][0]['message']['content'].strip()
|
| 16 |
|
| 17 |
|
| 18 |
-
chatbot = gr.ChatInterface(
|
| 19 |
chatbot.launch()
|
|
|
|
| 10 |
if history:
|
| 11 |
messages.extend(history)
|
| 12 |
messages.append({"role": "user", "content": "messages"})
|
| 13 |
+
responses = client.chat_completion(messages, max_tokens = 1000)
|
| 14 |
|
| 15 |
return responses['choices'][0]['message']['content'].strip()
|
| 16 |
|
| 17 |
|
| 18 |
+
chatbot = gr.ChatInterface(responding, type="messages", title="My chat bot") #conversation history and user input(chatbot UI)
|
| 19 |
chatbot.launch()
|