Created
November 14, 2022 12:08
-
-
Save ehzawad/db7d9e41844863b56c9da043176afc0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first = ['A'] | |
second = ['B', 'C'] | |
third = ['D', 'E', 'F'] | |
intents_pack = [first, second, third] | |
if intents_pack.index(second) == 1: | |
print('Yes') | |
rasa_stories = [*first] | |
class Story: | |
def __init__(self, intents_pack): | |
self.intents_pack = intents_pack | |
def story_builder(self): | |
if intents_pack.index(second) == 1 and second.index('B') == 0: | |
rasa_stories.append(second[0]) | |
def story_level(self): | |
if (any(x in second for x in rasa_stories)) == True: | |
if intents_pack.index(third) == 2 and third.index('F') == 2: | |
# print('Go to the third') | |
rasa_stories.append(third[2]) | |
else: | |
print('Go to the hell') | |
def return_stories(self): | |
return rasa_stories | |
sample_intent = Story(intents_pack) | |
sample_intent.story_builder() | |
sample_intent.story_level() | |
print(sample_intent.return_stories()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment