forked from RasaHQ/rasa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RasaHQ#11809 from RasaHQ/merge-3.3.x-main-95d44dc
Merge 3.3.x into main
- Loading branch information
Showing
21 changed files
with
899 additions
and
771 deletions.
There are no files selected for viewing
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 file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
The documentation was updated for Buttons using messages that start with '/'. | ||
Previously, it wrongly stated that messages with '/' bypass NLU, which is not the case. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add documentation for Rasa Pro Services upgrades. |
42 changes: 42 additions & 0 deletions
42
data/test_classes/custom_graph_components/nlu_meta_fallback.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from typing import Dict, Text, Any, List | ||
|
||
from rasa.engine.graph import GraphComponent, ExecutionContext | ||
from rasa.engine.recipes.default_recipe import DefaultV1Recipe | ||
from rasa.engine.storage.resource import Resource | ||
from rasa.engine.storage.storage import ModelStorage | ||
from rasa.shared.nlu.training_data.message import Message | ||
from rasa.shared.nlu.training_data.training_data import TrainingData | ||
from rasa.nlu.classifiers.fallback_classifier import FallbackClassifier | ||
|
||
|
||
@DefaultV1Recipe.register( | ||
[DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER], is_trainable=True | ||
) | ||
class MetaFallback(FallbackClassifier): | ||
|
||
def __init__( | ||
self, | ||
config: Dict[Text, Any], | ||
model_storage: ModelStorage, | ||
resource: Resource, | ||
execution_context: ExecutionContext, | ||
) -> None: | ||
super().__init__(config) | ||
|
||
self._model_storage = model_storage | ||
self._resource = resource | ||
|
||
@classmethod | ||
def create( | ||
cls, | ||
config: Dict[Text, Any], | ||
model_storage: ModelStorage, | ||
resource: Resource, | ||
execution_context: ExecutionContext, | ||
) -> FallbackClassifier: | ||
"""Creates a new untrained component (see parent class for full docstring).""" | ||
return cls(config, model_storage, resource, execution_context) | ||
|
||
def train(self, training_data: TrainingData) -> Resource: | ||
# Do something here with the messages | ||
return self._resource |
15 changes: 15 additions & 0 deletions
15
data/test_classes/custom_graph_components/nlu_meta_intent_featurizer.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from rasa.engine.recipes.default_recipe import DefaultV1Recipe | ||
from rasa.shared.nlu.training_data.training_data import TrainingData | ||
from rasa.nlu.classifiers.diet_classifier import DIETClassifier | ||
|
||
|
||
@DefaultV1Recipe.register( | ||
[DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER, | ||
DefaultV1Recipe.ComponentType.ENTITY_EXTRACTOR, | ||
DefaultV1Recipe.ComponentType.MESSAGE_FEATURIZER], is_trainable=True | ||
) | ||
class DIETFeaturizer(DIETClassifier): | ||
|
||
def process_training_data(self, training_data: TrainingData) -> TrainingData: | ||
# classify and add the attributes to the messages on the training data | ||
return training_data |
Oops, something went wrong.