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

Conversations #270

Open
alglyzin opened this issue Nov 24, 2022 · 7 comments
Open

Conversations #270

alglyzin opened this issue Nov 24, 2022 · 7 comments

Comments

@alglyzin
Copy link

I need to collect information from the user using a conversation. So that the bot remembers the input context for a while.
Example: https://botman.io/2.0/conversations

@fabio-ivona
Copy link
Member

Hi, this is planned, until then you can handle a conversation through webhooks and storage

@elephantux
Copy link

Hi, this is planned, until then you can handle a conversation through webhooks and storage

It would be great to see the simplest example of a conversation. For example, asking the user for an email using validation - don't accept the answer until the correct email is provided.

@henzel
Copy link

henzel commented May 9, 2023

Hi, this is planned, until then you can handle a conversation through webhooks and storage

It would be great to see the simplest example of a conversation. For example, asking the user for an email using validation - don't accept the answer until the correct email is provided.

Hi. You can use Storage (https://defstudio.github.io/telegraph/storage/entities_storage). For example you asked for a email. Set variable "wait_email_{user_id}". After that in handleChatMessage (https://defstudio.github.io/telegraph/webhooks/webhook-request-types) check variable. And work with this :)

@pou
Copy link
Contributor

pou commented Jul 5, 2023

i'm going to make it. Do you have any ideas or wishes?

@bilogic
Copy link

bilogic commented Jan 28, 2024

I like to think there are 2 ways:

  1. For a HTTP styled request, response transaction, we need a state machine and it has to remember its last state for each user
  2. Create PHP daemon and an input loop, much like how a CLI application works, but this will not scale nicely as 1 daemon can serve only 1 user

@nikolajgromkov
Copy link

When is the next version planned to be developed?

@fabio-ivona
Copy link
Member

Yeah, we are designing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants