Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,11 +115,12 @@ def respond(message, history):
|
|
| 115 |
messages.extend(history)
|
| 116 |
|
| 117 |
messages.append({"role":"user","content": "message"})
|
|
|
|
| 118 |
|
| 119 |
response = client.chat_completion(messages, max_tokens = 100, temperature = 1.3, top_p = 0.3)
|
| 120 |
|
| 121 |
#temperature and top_p control randomness
|
| 122 |
-
return response['choices'][0]['message']['content'].strip()
|
| 123 |
|
| 124 |
chatbot = gr.ChatInterface(respond, type="messages")
|
| 125 |
chatbot.launch()
|
|
|
|
| 115 |
messages.extend(history)
|
| 116 |
|
| 117 |
messages.append({"role":"user","content": "message"})
|
| 118 |
+
|
| 119 |
|
| 120 |
response = client.chat_completion(messages, max_tokens = 100, temperature = 1.3, top_p = 0.3)
|
| 121 |
|
| 122 |
#temperature and top_p control randomness
|
| 123 |
+
return response['choices'][0]['message']['content'].strip() + "Here is one recipe you could make: " + best_recipes_chunk[0] + "\n"
|
| 124 |
|
| 125 |
chatbot = gr.ChatInterface(respond, type="messages")
|
| 126 |
chatbot.launch()
|