Last active
March 23, 2022 15:10
-
-
Save jcabot/0beb16be016a3be726c97aae73c59b22 to your computer and use it in GitHub Desktop.
(Partial) Chatbot DSL
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
class Intent: | |
def __init__(self, name: str, training_sentences: list[str]): | |
self.name: str = name | |
self.training_sentences: list[str] = training_sentences | |
class NLUContext: | |
def __init__(self, name: str): | |
self.name: str = name | |
self.intents: list[Intent] = [] | |
self.tokenizer: tf.keras.preprocessing.text.Tokenizer = None | |
self.nlp_model: tf.keras.models = None | |
class Bot: | |
def __init__(self, bot_id: uuid, name: str, configuration: NlpConfiguration = None): | |
self.bot_id: uuid = bot_id | |
self.name: str = name | |
self.contexts: list[NLUContext] = [] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment