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

[ENH] Extending the Bot Model Process to be Sequential #101

Closed
samuelvkwong opened this issue Aug 16, 2023 · 4 comments · Fixed by #105 or #99
Closed

[ENH] Extending the Bot Model Process to be Sequential #101

samuelvkwong opened this issue Aug 16, 2023 · 4 comments · Fixed by #105 or #99
Assignees
Labels
enhancement New feature or request

Comments

@samuelvkwong
Copy link
Contributor

samuelvkwong commented Aug 16, 2023

  1. Motivation - [ENH] Chaining Bot Actions las2peer-social-bot-manager-service#208 (comment) - With how the process is structured now as a star network, a Bot Action that takes a while or fails is not able to be handled properly and the process proceeds to the next IncomingMessage regardless.
  2. Specification - As mentioned by @lakhoune, Bot Actions would lead to a new IncomingMessage. Action Parameters would still be attached in a star structure.
  3. Finalised state - Modeling the process in a sequential way would allow checks to be made so that if a Bot Action fails or in the case where Bot Actions are chained, if one of the Bot Actions fails, the process can be interrupted.
@samuelvkwong samuelvkwong added the enhancement New feature or request label Aug 16, 2023
@samuelvkwong samuelvkwong self-assigned this Aug 16, 2023
@lakhoune
Copy link
Member

As we discussed before, I would see no problem in extending the modeling language to allow for such behaviour. The existing specification woul coexist with the new one giving the bot developers the option to choose between the two.

@samuelvkwong
Copy link
Contributor Author

@AlexanderNeumann Do you have any thoughts or example usages for this implementation?

@AlexanderNeumann
Copy link
Member

I agree with Ben's comment.

I think Ben has already examples from his thesis. @lakhoune can you provide a concrete example of the mensa bot for example?

From use case scenarios, there are plenty. For example, if the response of a request (when we fetch information from a service/website etc) is relevant to the bot message. If the request fails the state should not change or go into another state (automatically).
It is also a little bit complicated because sometimes we are using webhooks if the requests are taking longer. We first directly give a response to the user that there is a longer process ongoing and when the process is finished we give the result to the user.

@lakhoune
Copy link
Member

An example for sequential behaviour for the mensabot would be the review process.
The process looks similar to this:
'request to make review' -> 'specify canteen' -> 'specify meal' -> 'confirm choices' -> 'give stars' -> '(optional) feedback'
Currently we do this in one state for the first half 'request to make review' -> 'specify canteen' -> 'specify meal' -> 'confirm choices' and then a second half 'give stars' -> '(optional) feedback'
But it would be great to have each as an own bot action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants