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

Add: multiple fallback tutorial #316

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

NotBioWaste905
Copy link
Collaborator

Description

Add tutorial that utilizes local transitions to local fallback nodes to handle fallbacks.

To Consider

  • Add script test via premade dialogue path?

Add tutorial that utilizes local transitions to local fallback nodes to handle fallbacks.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears this PR is a release PR (change its base from master if that is not the case).

Here's a release checklist:

  • Update package version
  • Change PR merge option
  • Test modules without automated testing:
    • Requiring telegram api_id and api_hash
    • Requiring HF_API_KEY
  • Search for objects to be deprecated

tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
("information_flow", "time_node"):
cnd.exact_match(Message(text="time")),
("information_fallback_node"):
cnd.true()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Script should be rewritten in a way that shows how using LOCAL transitions simplifies script writing process.

The current script has exactly one transition to fallback node per flow so it is not clear how using LOCAL helps.
If the script had several nodes that have to have a fallback then we could showcase that using LOCAL saves time from writing the same transitions in every node as it is suggested in the next markdown cell.

tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
},

"auth_fallback_node": {
RESPONSE: Message(text="User not found."),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the nodes from this flow fallback to this node. So this node is visited not only when user is not found but also, for example, when admin password is incorrect.

tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
tutorials/script/core/10_multiple_fallback_nodes.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants