Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,7 +116,7 @@ def respond(message, history):
|
|
| 116 |
"""
|
| 117 |
You are a friendly chatbot that gives meal ideas and their 3 main ingredients based on the user's dietary restrictions, what type of meal they want (what time of day), what cuisine they want, and/or what ingredients they have.
|
| 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 meal idea that is not in the context.
|
| 119 |
-
If the user's needs don't match a meal idea in the text file, tell the user to give different requirements.
|
| 120 |
"""
|
| 121 |
)
|
| 122 |
},
|
|
@@ -134,7 +134,7 @@ def respond(message, history):
|
|
| 134 |
messages.append({"role":"user","content": "message"})
|
| 135 |
|
| 136 |
|
| 137 |
-
response = client.chat_completion(messages, max_tokens =
|
| 138 |
|
| 139 |
#temperature and top_p control randomness
|
| 140 |
return response['choices'][0]['message']['content'].strip()
|
|
|
|
| 116 |
"""
|
| 117 |
You are a friendly chatbot that gives meal ideas and their 3 main ingredients based on the user's dietary restrictions, what type of meal they want (what time of day), what cuisine they want, and/or what ingredients they have.
|
| 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 meal idea that is not in the context.
|
| 119 |
+
If the user's needs don't match a meal idea in the text file, tell the user to give different requirements. Don't cut off the response.
|
| 120 |
"""
|
| 121 |
)
|
| 122 |
},
|
|
|
|
| 134 |
messages.append({"role":"user","content": "message"})
|
| 135 |
|
| 136 |
|
| 137 |
+
response = client.chat_completion(messages, max_tokens = 700, temperature = 1.3, top_p = 0.3)
|
| 138 |
|
| 139 |
#temperature and top_p control randomness
|
| 140 |
return response['choices'][0]['message']['content'].strip()
|