Spaces:
Sleeping
Sleeping
aliss77777
commited on
Commit
β’
3a4367b
1
Parent(s):
70201ee
shortened timeout value
Browse files
app.py
CHANGED
@@ -185,7 +185,7 @@ async def run_conversation(message_from_ui: cl.Message):
|
|
185 |
|
186 |
while res and res.get("value") == "question":
|
187 |
|
188 |
-
question = await cl.AskUserMessage(content='How can I help?', timeout=
|
189 |
|
190 |
# Use this to send the output of completion request into the next OpenAI API call.
|
191 |
question_response = hf.summary_completion(address, country, output, question['output'])
|
@@ -233,7 +233,7 @@ async def run_conversation(message_from_ui: cl.Message):
|
|
233 |
|
234 |
while res and res.get("value") == "question":
|
235 |
|
236 |
-
question = await cl.AskUserMessage(content='How can I help?', timeout=
|
237 |
|
238 |
# Use this to send the output of completion request into the next OpenAI API call.
|
239 |
question_response = hf.summary_completion(address, country, output, question['output'])
|
@@ -259,7 +259,7 @@ async def run_conversation(message_from_ui: cl.Message):
|
|
259 |
actions=[
|
260 |
cl.Action(name="yes", value="yes", label="β
Yes"),
|
261 |
cl.Action(name="no", value="no", label="π« No")],
|
262 |
-
timeout=
|
263 |
|
264 |
# Only proceed if they want to give feedback
|
265 |
if res_want_feedback.get("value") == "yes":
|
@@ -269,7 +269,7 @@ async def run_conversation(message_from_ui: cl.Message):
|
|
269 |
cl.Action(name="good", value="good", label="π Good. I'm ready to take action"),
|
270 |
cl.Action(name="IDK", value="IDK", label="π Not sure"),
|
271 |
cl.Action(name="no_good", value="no_good", label="π Not good"),],
|
272 |
-
timeout=
|
273 |
|
274 |
if res_feedback.get("value") == "good":
|
275 |
thank_you_message = cl.Message(author="Climate Change Assistant", content="Thanks for your feedback!")
|
|
|
185 |
|
186 |
while res and res.get("value") == "question":
|
187 |
|
188 |
+
question = await cl.AskUserMessage(content='How can I help?', timeout=180).send()
|
189 |
|
190 |
# Use this to send the output of completion request into the next OpenAI API call.
|
191 |
question_response = hf.summary_completion(address, country, output, question['output'])
|
|
|
233 |
|
234 |
while res and res.get("value") == "question":
|
235 |
|
236 |
+
question = await cl.AskUserMessage(content='How can I help?', timeout=180).send()
|
237 |
|
238 |
# Use this to send the output of completion request into the next OpenAI API call.
|
239 |
question_response = hf.summary_completion(address, country, output, question['output'])
|
|
|
259 |
actions=[
|
260 |
cl.Action(name="yes", value="yes", label="β
Yes"),
|
261 |
cl.Action(name="no", value="no", label="π« No")],
|
262 |
+
timeout=180).send()
|
263 |
|
264 |
# Only proceed if they want to give feedback
|
265 |
if res_want_feedback.get("value") == "yes":
|
|
|
269 |
cl.Action(name="good", value="good", label="π Good. I'm ready to take action"),
|
270 |
cl.Action(name="IDK", value="IDK", label="π Not sure"),
|
271 |
cl.Action(name="no_good", value="no_good", label="π Not good"),],
|
272 |
+
timeout=180).send()
|
273 |
|
274 |
if res_feedback.get("value") == "good":
|
275 |
thank_you_message = cl.Message(author="Climate Change Assistant", content="Thanks for your feedback!")
|