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
from rasa_core_sdk import Action | |
import csv | |
class ActionDefaultAskAffirmation(Action): | |
"""Asks for an affirmation of the intent if NLU threshold is not met.""" | |
def name(self): | |
return "action_default_ask_affirmation" |
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
def __init__(self, | |
config_path: Optional[Text] = None, | |
domain_path: Optional[Text] = None, | |
training_data_paths: Optional[Union[List[Text], Text]] = None, | |
repository: Text = ""): | |
github = Github() | |
self.repository = github.get_repo(repository) |
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
# This gist is deprecated. | |
# Please follow the guide here | |
# https://rasa.com/docs/rasa-x/installation-and-setup/existing-deployment/#import-existing-conversations-from-rasa-open-source | |
# to migrate from Rasa Open Source to Rasa X |
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
policies: | |
- name: TwoStageFallbackPolicy | |
nlu_threshold: 0.8 | |
# other policies of yours |
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
from rasa_nlu.training_data.loading import load_data | |
data = load_data('<path to your nlu training data>') | |
train, test = data.train_test_split() | |
train.persist('<output directory for training data>') | |
test.persist('<output directory for test data>') |