Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,7 +115,7 @@ def respond(message, history):
|
|
| 115 |
"content": (
|
| 116 |
"""
|
| 117 |
You are a friendly chatbot that gives recipes based on the user's question and needs.
|
| 118 |
-
Base your answer on the provided context. Do not get information from anywhere else besides the provided text file.
|
| 119 |
If the user's needs don't match a recipe in the text file, tell the user to give different requirements.
|
| 120 |
Keep answers below 75 words.
|
| 121 |
"""
|
|
@@ -138,7 +138,7 @@ def respond(message, history):
|
|
| 138 |
response = client.chat_completion(messages, max_tokens = 100, temperature = 1.3, top_p = 0.3)
|
| 139 |
|
| 140 |
#temperature and top_p control randomness
|
| 141 |
-
return response['choices'][0]['message']['content'].strip()
|
| 142 |
|
| 143 |
chatbot = gr.ChatInterface(respond, type="messages")
|
| 144 |
chatbot.launch()
|
|
|
|
| 115 |
"content": (
|
| 116 |
"""
|
| 117 |
You are a friendly chatbot that gives recipes based on the user's question and needs.
|
| 118 |
+
Base your answer on the provided context. Do not get information from anywhere else besides the provided text file. Do not give the user a recipe that is not in the context.
|
| 119 |
If the user's needs don't match a recipe in the text file, tell the user to give different requirements.
|
| 120 |
Keep answers below 75 words.
|
| 121 |
"""
|
|
|
|
| 138 |
response = client.chat_completion(messages, max_tokens = 100, temperature = 1.3, top_p = 0.3)
|
| 139 |
|
| 140 |
#temperature and top_p control randomness
|
| 141 |
+
return response['choices'][0]['message']['content'].strip()
|
| 142 |
|
| 143 |
chatbot = gr.ChatInterface(respond, type="messages")
|
| 144 |
chatbot.launch()
|