Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after AskUserMessage I have to stop the task manually #1829

Open
Anna-Bianca opened this issue Jan 29, 2025 · 4 comments
Open

after AskUserMessage I have to stop the task manually #1829

Anna-Bianca opened this issue Jan 29, 2025 · 4 comments
Labels
bug Something isn't working needs-triage

Comments

@Anna-Bianca
Copy link

After a Person clicks on an action I use AskUserMessage to ask something to the user, and after the user answers and the timeout is consumed, it sends a message with two actions, but I can not write, nor click the actions until I manually stops the task. I dont undestand why this happens, and I do not know how to solve it

To Reproduce
prompt_ask_feedback = cl.AskUserMessage(content=feedback_message, timeout=5)
comment = None
if yes_no == 1:
response = await prompt_ask_feedback.send()
if response:
comment = response["output"]
await new_continue.send()

Expected behavior
After the user answer the AskUserMessage, I expect that the user will be able to either type another message or click an action

Desktop
I am using chainlit == 2.0.0

I will greatly appreciate any input into this problem, I have tried all I can think of and I cannot figure out how to solve this

@dosubot dosubot bot added the bug Something isn't working label Jan 29, 2025
@AidanShipperley
Copy link
Contributor

Does setting the timeout to a large number like 500 work? A timeout of 5 seconds means that the AskUserMessage will stop working after 5 seconds, so the user would only have 5 seconds to interact with it:

If the user does not answer in time (see timeout), a TimeoutError will be raised or None will be returned depending on raise_on_timeout.

@Anna-Bianca
Copy link
Author

Thank you very much for your time and answer! I try what ypu suggested, but the problem persist, even after the user interacts with the AskUserMessage and the next message is send, it shows that there is another task running and I have to stop the taks manually in order to continue talking or press an action.

@willydouhard
Copy link
Collaborator

what is await new_continue.send()?

@Anna-Bianca
Copy link
Author

Hello, is a cl.Message with a few buttons and content. It works well, but I am not allow to pres the buttons untill I press to stop the task, and I can not figure out which task I am stopping, I figure it has something to do with the AskUserMessage, because it only happens there.
Thank you very much for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

3 participants