### Python API: process_training_examples_by_key Method Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/shared/nlu/training_data/formats/rasa_yaml Prepares various NLU training examples (like intent examples or lookup tables) to be written to YAML. This static method handles multiple training examples and their associated keys. ```APIDOC Method: process_training_examples_by_key Decorator: @staticmethod Signature: def process_training_examples_by_key( training_examples: Dict[Text, List[Union[Dict, Text]]], key_name: Text, key_examples: Text, example_extraction_predicate: Callable[[Dict[Text, Any]], Text] ) -> List[OrderedDict] Description: Prepares training examples to be written to YAML. This can be any NLU training data (intent examples, lookup tables, etc.). Arguments: training_examples (Dict[Text, List[Union[Dict, Text]]]): Multiple training examples. Mappings in case additional values were specified for an example (e.g. metadata) or just the plain value. key_name (Text): The top level key which the examples belong to (e.g. `intents`). key_examples (Text): The sub key which the examples should be added to (e.g. `examples`). example_extraction_predicate (Callable[[Dict[Text, Any]], Text]): Function to extract example value (e.g. the text for an intent example). Returns: List[OrderedDict]: NLU training data examples prepared for writing to YAML. ``` -------------------------------- ### Initialize a new Rasa project Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/command-line-interface This command sets up a complete Rasa assistant project with example training data, configuration, and action files. It creates a standard directory structure and optionally trains an initial model, making it the best way to get started with Rasa. ```Bash rasa init ``` -------------------------------- ### Install Rasa Open Source using pip Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/installation/installing-rasa-open-source Installs the core Rasa Open Source package using pip. This is the standard and recommended method for most users to get started with Rasa. ```Shell pip3 install rasa ``` -------------------------------- ### Install Rasa with all dependencies Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/installation Installs Rasa Open Source along with all its optional dependencies, providing a complete setup for various configurations. This option includes all additional dependencies. ```bash pip3 install rasa[full] ``` -------------------------------- ### Start and Configure Rasa Action Server Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/command-line-interface Instructions and command-line arguments for starting the Rasa SDK action server. It covers basic execution, port configuration, CORS settings, action package loading, SSL/TLS setup, auto-reloading, and logging options. ```Shell rasa run actions ``` ```APIDOC usage: rasa run actions [-h] [-v] [-vv] [--quiet] [--logging-config-file LOGGING_CONFIG_FILE] [-p PORT] [--cors [CORS ...]] [--actions ACTIONS] [--ssl-keyfile SSL_KEYFILE] [--ssl-certificate SSL_CERTIFICATE] [--ssl-password SSL_PASSWORD] [--auto-reload] options: -h, --help: description: "show this help message and exit" -p PORT, --port PORT: description: "port to run the server at" default: "5055" --cors [CORS ...]: description: "enable CORS for the passed origin. Use * to whitelist all origins" default: "None" --actions ACTIONS: description: "name of action package to be loaded" default: "None" --ssl-keyfile SSL_KEYFILE: description: "Set the SSL certificate to create a TLS secured server." default: "None" --ssl-certificate SSL_CERTIFICATE: description: "Set the SSL certificate to create a TLS secured server." default: "None" --ssl-password SSL_PASSWORD: description: "If your ssl-keyfile is protected by a password, you can specify it using this parameter." default: "None" --auto-reload: description: "Enable auto-reloading of modules containing Action subclasses." default: "False" Python Logging Options: -v, --verbose: description: "Be verbose. Sets logging level to INFO." default: "None" -vv, --debug: description: "Print lots of debugging statements. Sets logging level to DEBUG." default: "None" --quiet: description: "Be quiet! Sets logging level to WARNING." default: "None" --logging-config-file LOGGING_CONFIG_FILE: description: "If set, the name of the logging configuration file will be set to the given name." default: "None" ``` -------------------------------- ### Rasa Core Visualize Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.visualize module, part of the Rasa Core API. ```APIDOC rasa.core.visualize ``` -------------------------------- ### Initialize RasaSequenceLayer Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/utils/tensorflow/rasa_layers Creates a new `RasaSequenceLayer` object. ```APIDOC __init__(attribute: Text, attribute_signature: Dict[Text, List[FeatureSignature]], config: Dict[Text, Any]) -> None attribute: Text attribute_signature: Dict[Text, List[FeatureSignature]] config: Dict[Text, Any] ``` -------------------------------- ### Install All Rasa Dependencies (Full) Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/installation/installing-rasa-open-source This command installs Rasa Open Source along with all its optional dependencies, providing a complete setup for various configurations. It's a convenient option if you don't mind the additional packages. ```Python pip3 install 'rasa[full]' ``` -------------------------------- ### Rasa Engine Training Components Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.engine.training.components module, part of the Rasa Engine API. ```APIDOC rasa.engine.training.components ``` -------------------------------- ### Python API: process_synonyms Method Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/shared/nlu/training_data/formats/rasa_yaml Serializes the synonyms from a `TrainingData` object into a list of ordered dictionaries. ```APIDOC Method: process_synonyms Decorator: @classmethod Signature: def process_synonyms(cls, training_data: "TrainingData") -> List[OrderedDict] Description: Serializes the synonyms. ``` -------------------------------- ### Rasa Core Run Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.run module, part of the Rasa Core API. ```APIDOC rasa.core.run ``` -------------------------------- ### Rasa Core Utils Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.utils module, part of the Rasa Core API. ```APIDOC rasa.core.utils ``` -------------------------------- ### Initialize a new Rasa project Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/installation/installing-rasa-open-source Creates a new Rasa project directory with a basic structure and example files, providing a starting point for building a new conversational AI assistant. ```Shell rasa init ``` -------------------------------- ### Rasa Core Migrate Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.migrate module, part of the Rasa Core API. ```APIDOC rasa.core.migrate ``` -------------------------------- ### Rasa Engine Training Hooks Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.engine.training.hooks module, part of the Rasa Engine API. ```APIDOC rasa.engine.training.hooks ``` -------------------------------- ### Get Entity Examples Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/reference/rasa/shared/nlu/training_data/training_data Returns the list of examples that have entities. ```APIDOC @lazy_property def entity_examples() -> List[Message] ``` -------------------------------- ### Rasa Core, Engine, and Graph Components API Modules Overview Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/core/channels/slack Lists all available modules and sub-modules within the `rasa.core`, `rasa.engine`, and `rasa.graph_components` packages, providing an overview of the API structure. This serves as a quick reference for navigating the Rasa codebase. ```APIDOC rasa.core: training: generator interactive loading story_conflict structures training visualization agent config conversation domain exceptions exporter featurizers http_interpreter interpreter jobs lock lock_store migrate processor registry restore run slots test tracker_store trackers train utils visualize rasa.engine: recipes: default_recipe graph_recipe recipe runner: dask interface storage: local_model_storage resource storage training: components fingerprinting graph_trainer hooks caching exceptions graph loader validation rasa.graph_components: adders: nlu_prediction_to_history_adder converters: nlu_message_converter providers: domain_for_core_training_provider domain_provider domain_without_response_provider ``` -------------------------------- ### Rasa Core Trackers Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.trackers module, part of the Rasa Core API. ```APIDOC rasa.core.trackers ``` -------------------------------- ### Rasa Core Training Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.training.training module, part of the Rasa Core training utilities API. ```APIDOC rasa.core.training.training ``` -------------------------------- ### Get Response Examples Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/reference/rasa/shared/nlu/training_data/training_data Returns the list of examples that have a response. ```APIDOC @lazy_property def response_examples() -> List[Message] ``` -------------------------------- ### Initialize a new Rasa project Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/installation/installing-rasa-open-source Creates a new Rasa project with default files and structure, providing a ready-to-use template for building your first assistant. This command sets up the necessary directories and configuration files. ```Shell rasa init ``` -------------------------------- ### Get Intent Examples Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/reference/rasa/shared/nlu/training_data/training_data Returns the list of examples that have an intent. ```APIDOC @lazy_property def intent_examples() -> List[Message] ``` -------------------------------- ### Rasa Core Training Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.training.training` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on the core training process. ```APIDOC rasa.core.training.training ``` -------------------------------- ### Rasa Core Jobs Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.jobs module, part of the Rasa Core API. ```APIDOC rasa.core.jobs ``` -------------------------------- ### Rasa Core Training Visualization Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.training.visualization module, part of the Rasa Core training utilities API. ```APIDOC rasa.core.training.visualization ``` -------------------------------- ### Initialize a New Rasa Project Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/installation Command to create a new Rasa project after successful installation, setting up the basic project structure with example files and models. ```bash rasa init ``` -------------------------------- ### Rasa Story: Using Checkpoints for Modularization Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Illustrates how to use checkpoints to modularize and simplify Rasa training data by linking different story segments, allowing for reusable story parts. It shows an example of a flow broken into beginning, handling affirmation/denial, and finishing segments. ```YAML stories: - story: beginning of flow steps: - intent: greet - action: action_ask_user_question - checkpoint: check_asked_question - story: handle user affirm steps: - checkpoint: check_asked_question - intent: affirm - action: action_handle_affirmation - checkpoint: check_flow_finished - story: handle user deny steps: - checkpoint: check_asked_question - intent: deny - action: action_handle_denial - checkpoint: check_flow_finished - story: finish flow steps: - checkpoint: check_flow_finished - intent: goodbye - action: utter_goodbye ``` -------------------------------- ### Initialize a New Rasa Assistant Project Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/command-line-interface The `rasa init` command is used to quickly set up a complete Rasa assistant project with example training data. It creates a standard directory and file structure, providing a ready-to-use starting point for development. ```Shell rasa init ``` -------------------------------- ### ConcatenateSparseDenseFeatures Class API Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/utils/tensorflow/rasa_layers Combines multiple sparse and dense feature tensors into one dense tensor. This layer processes features from various featurisers into a single feature array per input example, ensuring all features are of the same type (sentence-level or sequence-level). ```APIDOC class ConcatenateSparseDenseFeatures(RasaCustomLayer) Description: Combines multiple sparse and dense feature tensors into one dense tensor. Purpose: This layer combines features from various featurisers into a single feature array per input example. All features must be of the same feature type, i.e. sentence-level or sequence-level (token-level). Process: 1. converting sparse tensors into dense ones 2. optionally, applying dropout to sparse tensors before and/or after the conversion 3. concatenating all tensors along the last dimension Arguments: attribute: Name of attribute (e.g. text or label) whose features will be processed. feature_type: Feature type to be processed -- sequence or sentence. feature_type_signature: A list of signatures for the given attribute and feature type. config: A model config for correctly parametrising the layer. Input shape: Tuple containing one list of N-D tensors, each with shape: (batch_size, ..., input_dim). All dense tensors must have the same shape, except possibly the last dimension. All sparse tensors must have the same shape, including the last dimension. Output shape: N-D tensor with shape: (batch_size, ..., units) where units is the sum of the last dimension sizes across all input tensors, with sparse tensors instead contributing 1 units each. Raises: ValueError if no feature signatures are provided. Attributes: output_dim: The last dimension size of the layer's output. __init__(attribute: Text, feature_type: Text, feature_type_signature: List[FeatureSignature], config: Dict[Text, Any]) -> None Description: Creates a new ConcatenateSparseDenseFeatures object. call(inputs: Tuple[List[Union[tf.Tensor, tf.SparseTensor]]], training: bool = False) -> tf.Tensor Description: Combines sparse and dense feature tensors into one tensor. Arguments: inputs: Contains the input tensors, all of the same rank. training: A flag indicating whether the layer should behave in training mode (applying dropout to sparse tensors if applicable) or in inference mode (not applying dropout). Returns: Single tensor with all input tensors combined along the last dimension. ``` -------------------------------- ### Server Started Event Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/telemetry/reference Triggered when a Rasa Open Source server gets started. ```APIDOC Event: Server Started Properties: input_channels (array): Names of the used input channels api_enabled (boolean): Indicator if the API is enabled or if only the input channel is running number_of_workers (integer): Amount of Sanic workers started as part of the server endpoints_nlg (string,null): Type of the used NLG endpoint endpoints_nlu (string,null): Type of the used NLU endpoint endpoints_action_server (string,null): Type of the used action server endpoints_model_server (string,null): Type of the used model server endpoints_tracker_store (string,null): Type of the used tracker store endpoints_lock_store (string,null): Type of the used lock store endpoints_event_broker (string,null): Type of the used event broker project (string,null): Hash of the deployed model the server is started with ``` -------------------------------- ### Rasa Core Training Visualization Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.training.visualization` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on visualizing training data and processes. ```APIDOC rasa.core.training.visualization ``` -------------------------------- ### Server Started Event Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/telemetry/reference Triggered when a Rasa Open Source server gets started. ```APIDOC Event properties: * `input_channels` (array): Names of the used input channels * `api_enabled` (boolean): Indicator if the API is enabled or if only the input channel is running * `number_of_workers` (integer): Amount of Sanic workers started as part of the server * `endpoints_nlg` (string,null): Type of the used NLG endpoint * `endpoints_nlu` (string,null): Type of the used NLU endpoint * `endpoints_action_server` (string,null): Type of the used action server * `endpoints_model_server` (string,null): Type of the used model server * `endpoints_tracker_store` (string,null): Type of the used tracker store * `endpoints_lock_store` (string,null): Type of the used lock store * `endpoints_event_broker` (string,null): Type of the used event broker * `project` (string,null): Hash of the deployed model the server is started with ``` -------------------------------- ### Rasa Core API Module Index Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/shared/nlu/training_data/message Lists all core modules and sub-modules available in the Rasa Core API, organized hierarchically to provide an overview of the package structure and its components. ```APIDOC rasa.core.channels: - webexteams rasa.core.evaluation: - marker - marker_base - marker_stats - marker_tracker_loader - markers rasa.core.events: - __init__ rasa.core.featurizers: - _single_state_featurizer - _tracker_featurizers - precomputation - single_state_featurizer - tracker_featurizers rasa.core.nlg: - callback - generator - interpolator - response - template rasa.core.policies: - _ensemble - _memoization - _policy - _rule_policy - _ted_policy - _unexpected_intent_policy - ensemble - fallback - form_policy - mapping_policy - memoization - policy - rule_policy - sklearn_policy - ted_policy - two_stage_fallback - unexpected_intent_policy rasa.core.training: - __init__ - data - converters: - responses_prefix_converter - story_markdown_to_yaml_converter - story_reader: - markdown_story_reader - story_reader - story_step_builder - yaml_story_reader - story_writer: - yaml_story_writer ``` -------------------------------- ### Rasa Engine Runner Interface Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.engine.runner.interface module, part of the Rasa Engine API. ```APIDOC rasa.engine.runner.interface ``` -------------------------------- ### Get Sorted Intent Examples Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/reference/rasa/nlu/training_data/training_data Sorts the intent examples within the training data first by intent name and then by response. ```APIDOC sorted_intent_examples() -> List[Message] Sorts the intent examples by the name of the intent and then response ``` -------------------------------- ### Rasa Core Training Loading Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.training.loading` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on loading training data. ```APIDOC rasa.core.training.loading ``` -------------------------------- ### Rasa NLU and Shared Core Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories This section outlines the structure and available modules within the `rasa.nlu` and `rasa.shared.core` packages, providing a guide to their organization and purpose. It covers various training data formats, utility functions, and core components for conversational AI development. ```APIDOC rasa.nlu: training_data: formats: - markdown - markdown_nlg - rasa - rasa_yaml - readerwriter - wit - entities_parser - loading - lookup_tables_parser - message - synonyms_parser - training_data - util utils: hugging_face: - hf_transformers - transformers_pre_post_processors - __init__ - _mitie_utils - _spacy_utils - bilou_utils - mitie_utils - pattern_utils - spacy_utils - components - config - convert - model - persistor - registry - run - test - train rasa.shared: core: training_data: story_reader: - markdown_story_reader - story_reader - story_step_builder - yaml_story_reader story_writer: - markdown_story_writer - story_writer - yaml_story_writer - loading - structures - visualization - constants - conversation ``` -------------------------------- ### Initializing a Rasa Project with `rasa init` Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/command-line-interface Explains the `rasa init` command, which sets up a complete Rasa assistant project with example training data. It creates a standard directory structure and essential configuration files, preparing the project for immediate training, shell interaction, and testing. ```Shell rasa init ``` ```Text . ├── actions │ ├── __init__.py │ └── actions.py ├── config.yml ├── credentials.yml ├── data │ ├── nlu.yml │ └── stories.yml ├── domain.yml ├── endpoints.yml ├── models │ └── .tar.gz └── tests └── test_stories.yml ``` -------------------------------- ### Rasa Core Training Interactive Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.training.interactive` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on interactive training functionalities. ```APIDOC rasa.core.training.interactive ``` -------------------------------- ### Server Started Event Properties Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/telemetry/reference Triggered when a Rasa Open Source server gets started. ```APIDOC Event: Server Started Description: Triggered when a Rasa Open Source server gets started. Properties: - input_channels (array): Names of the used input channels - api_enabled (boolean): Indicator if the API is enabled or if only the input channel is running - number_of_workers (integer): Amount of Sanic workers started as part of the server - endpoints_nlg (string,null): Type of the used NLG endpoint - endpoints_nlu (string,null): Type of the used NLU endpoint - endpoints_action_server (string,null): Type of the used action server - endpoints_model_server (string,null): Type of the used model server - endpoints_tracker_store (string,null): Type of the used tracker store - endpoints_lock_store (string,null): Type of the used lock store - endpoints_event_broker (string,null): Type of the used event broker - project (string,null): Hash of the deployed model the server is started with ``` -------------------------------- ### Example Rasa Story for Dialogue Training Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories This YAML snippet demonstrates the structure of a Rasa story, which is used to train an assistant's dialogue management model. It illustrates a conversation flow, mapping user intents (with optional entities) to the bot's corresponding actions, and includes comments for clarity and debugging. ```YAML stories: - story: collect restaurant booking info # name of the story - just for debugging steps: - intent: greet # user message with no entities - action: utter_ask_howcanhelp - intent: inform # user message with entities entities: - location: "rome" - price: "cheap" - action: utter_on_it # action that the bot should execute - action: utter_ask_cuisine - intent: inform entities: - cuisine: "spanish" - action: utter_ask_num_people ``` -------------------------------- ### Rasa Engine Training Components Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.engine.training.components` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on training components for the Rasa Engine. ```APIDOC rasa.engine.training.components ``` -------------------------------- ### OpenShift Specific Configuration for Rasa Deployment Fix Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/deploy/deploy-rasa This configuration snippet provides values to resolve common deployment failures on OpenShift related to security context and user permissions, specifically for PostgreSQL and Nginx components. Apply these values if 'oc get events' returns permission errors. ```YAML postgresql: volumePermissions: securityContext: runAsUser: "auto" securityContext: enabled: false shmVolume: chmod: enabled: false nginx: image: name: nginxinc/nginx-unprivileged port: 8080 ``` -------------------------------- ### Rasa Core, Engine, and Graph Components Module Index Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/shared/nlu/training_data/message Lists all accessible modules and sub-modules within the Rasa framework's core, engine, and graph components, providing an overview of the API structure. ```APIDOC rasa.core.training.generator rasa.core.training.interactive rasa.core.training.loading rasa.core.training.story_conflict rasa.core.training.structures rasa.core.training.training rasa.core.training.visualization rasa.core.agent rasa.core.config rasa.core.conversation rasa.core.domain rasa.core.exceptions rasa.core.exporter rasa.core.featurizers rasa.core.http_interpreter rasa.core.interpreter rasa.core.jobs rasa.core.lock rasa.core.lock_store rasa.core.migrate rasa.core.processor rasa.core.registry rasa.core.restore rasa.core.run rasa.core.slots rasa.core.test rasa.core.tracker_store rasa.core.trackers rasa.core.train rasa.core.utils rasa.core.visualize rasa.engine.recipes.default_recipe rasa.engine.recipes.graph_recipe rasa.engine.recipes.recipe rasa.engine.runner.dask rasa.engine.runner.interface rasa.engine.storage.local_model_storage rasa.engine.storage.resource rasa.engine.storage.storage rasa.engine.training.components rasa.engine.training.fingerprinting rasa.engine.training.graph_trainer rasa.engine.training.hooks rasa.engine.caching rasa.engine.exceptions rasa.engine.graph rasa.engine.loader rasa.engine.validation rasa.graph_components.adders.nlu_prediction_to_history_adder rasa.graph_components.converters.nlu_message_converter rasa.graph_components.providers.domain_for_core_training_provider rasa.graph_components.providers.domain_provider rasa.graph_components.providers.domain_without_response_provider ``` -------------------------------- ### Example GET Request from Rasa to Model Server Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/model-storage This `curl` command demonstrates an example `GET` request that Rasa Open Source sends to a configured model server. It includes an `If-None-Match` header for caching, containing the hash of the last downloaded model to optimize bandwidth. ```bash curl --header "If-None-Match: d41d8cd98f00b204e9800998ecf8427e" http://my-server.com/models/default ``` -------------------------------- ### Get Number of Examples in RasaModelData Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/reference/rasa/utils/tensorflow/model_data Calculates the total number of examples present in the provided data. It raises a ValueError if the number of examples differs across different features, ensuring data consistency. ```APIDOC number_of_examples(data: Optional[Data] = None) -> int Obtain number of examples in data. Arguments: data: The data. Raises: A ValueError if number of examples differ for different features. Returns: The number of examples in data. ``` -------------------------------- ### Initialize Rasa Project using CLI Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/installation/rasa-pro/installation This snippet provides an example of using the `rasa` command-line interface to initialize a new Rasa project after the license is set up. This is a common first step for developing Rasa assistants. ```bash rasa init ``` -------------------------------- ### Get NLU Training Examples Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/reference/rasa/shared/nlu/training_data/training_data Returns a list of examples that originated from NLU training data, excluding those from stories or domains. ```APIDOC @lazy_property def nlu_examples() -> List[Message] ``` -------------------------------- ### API: rasa.core.run.serve_application Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/reference/rasa/core/run Run the API entrypoint. ```APIDOC serve_application(model_path: Optional[Text] = None, channel: Optional[Text] = None, port: int = constants.DEFAULT_SERVER_PORT, credentials: Optional[Text] = None, cors: Optional[Union[Text, List[Text]]] = None, auth_token: Optional[Text] = None, enable_api: bool = true, response_timeout: int = constants.DEFAULT_RESPONSE_TIMEOUT, jwt_secret: Optional[Text] = None, jwt_method: Optional[Text] = None, endpoints: Optional[AvailableEndpoints] = None, remote_storage: Optional[Text] = None, log_file: Optional[Text] = None, ssl_certificate: Optional[Text] = None, ssl_keyfile: Optional[Text] = None, ssl_ca_file: Optional[Text] = None, ssl_password: Optional[Text] = None, conversation_id: Optional[Text] = uuid.uuid4().hex) -> None ``` -------------------------------- ### Rasa Core Train Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.train` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on the main training entry point for Rasa Core. ```APIDOC rasa.core.train ``` -------------------------------- ### Check Kubernetes/OpenShift CLI Client Version Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/deploy/deploy-rasa Verifies the installed client version of the Kubernetes or OpenShift command-line interface. This command helps confirm that the CLI tool is installed and accessible on your system. ```Shell kubectl version --short --client ``` -------------------------------- ### Get Number of Examples in Data (Python API) Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/utils/tensorflow/model_data Obtains the total number of examples within the provided data structure. This function validates consistency, raising a ValueError if the example count varies across different features. ```APIDOC number_of_examples(data: Optional[Data] = None) -> int Description: Obtain number of examples in data. Arguments: data (Optional[Data]): The data. Raises: ValueError: If number of examples differ for different features. Returns: int: The number of examples in data. ``` -------------------------------- ### Rasa Core Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/reference/rasa/api Lists the key modules and components within the `rasa.core` package, which handles dialogue management, agent configuration, and training processes in Rasa. ```APIDOC rasa.core: - training.training - agent - config - exceptions - exporter - interpreter - jobs - lock - lock_store - processor - registry - run - test - tracker_store - train - utils ``` -------------------------------- ### Check Helm CLI Version Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/deploy/deploy-rasa Verifies the installed version of the Helm command-line interface. This command is used to ensure Helm is installed and meets the minimum version requirement (>=3.5) for deploying Rasa with Helm charts. ```Shell helm version --short ``` -------------------------------- ### Rasa NLU Module API Index Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/deploy/deploy-rasa This snippet provides a structured index of the `rasa.nlu` module's API, listing its main sub-modules and their contained classes or functions. It serves as a quick reference for navigating the NLU components. ```APIDOC rasa.nlu.extractors: - mitie_entity_extractor - regex_entity_extractor - spacy_entity_extractor rasa.nlu.featurizers: - dense_featurizer: - _convert_featurizer - _lm_featurizer - convert_featurizer - dense_featurizer - lm_featurizer - mitie_featurizer - spacy_featurizer - sparse_featurizer: - _count_vectors_featurizer - _lexical_syntactic_featurizer - _regex_featurizer - count_vectors_featurizer - lexical_syntactic_featurizer - regex_featurizer - sparse_featurizer - featurizer rasa.nlu.schemas: - data_schema rasa.nlu.selectors: - _response_selector - response_selector rasa.nlu.tokenizers: - _jieba_tokenizer - _tokenizer - _whitespace_tokenizer - convert_tokenizer - jieba_tokenizer - lm_tokenizer - mitie_tokenizer - spacy_tokenizer - tokenizer - whitespace_tokenizer rasa.nlu.training_data: converters: - nlg_markdown_to_yaml_converter - nlu_markdown_to_yaml_converter formats: - dialogflow - luis ``` -------------------------------- ### Rasa Core Training Loading Module Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/stories Reference to the rasa.core.training.loading module, part of the Rasa Core training utilities API. ```APIDOC rasa.core.training.loading ``` -------------------------------- ### Get Number of Examples in Rasa Model Data Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/reference/rasa/utils/tensorflow/model_data Retrieves the total number of examples contained within the provided Rasa model data. It can raise a ValueError if the number of examples varies across different features, ensuring data consistency. ```APIDOC def number_of_examples(data: Optional[Data] = None) -> int data: The data. Raises: A ValueError if number of examples differ for different features. Returns: The number of examples in data. ``` -------------------------------- ### Install Rust Compiler for Python 3.10 (macOS) Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/installation/installing-rasa-open-source macOS users facing `tokenizers` installation issues with `rasa[full]` on Python 3.10 can resolve them by installing and initializing the Rust compiler using these commands. A console restart is recommended after setup. ```Shell brew install rustup rustup-init ``` ```Shell rustc --version ``` ```Shell export PATH="$HOME/.cargo/bin:$PATH" ``` -------------------------------- ### Rasa Core Utils Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.utils` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on various utility functions for Rasa Core. ```APIDOC rasa.core.utils ``` -------------------------------- ### Rasa Core Run Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.run` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on running the Rasa Core server. ```APIDOC rasa.core.run ``` -------------------------------- ### Configure External NLG Server Authentication in Rasa endpoints.yml Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/nlg This YAML snippet shows how to configure authentication parameters for an external Natural Language Generation (NLG) server in Rasa's `endpoints.yml` file. It allows specifying `headers`, a `token` (as a GET parameter), or `basic_auth` credentials (username and password) if the NLG server requires authentication. ```YAML nlg: url: http://localhost:5055/nlg # # You can also specify additional parameters, if you need them: # headers: # my-custom-header: value # token: "my_authentication_token" # will be passed as a GET parameter # basic_auth: # username: user ``` -------------------------------- ### API: `process_training_examples_by_key` static method for preparing NLU examples Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/reference/rasa/shared/nlu/training_data/formats/rasa_yaml Prepares various NLU training examples (intents, lookup tables, etc.) for writing to YAML, handling additional values like metadata. ```APIDOC Static Method: process_training_examples_by_key Signature: @staticmethod def process_training_examples_by_key( training_examples: Dict[Text, List[Union[Dict, Text]]], key_name: Text, key_examples: Text, example_extraction_predicate: Callable[[Dict[Text, Any]], Text] ) -> List[OrderedDict] Description: Prepares training examples to be written to YAML. This can be any NLU training data (intent examples, lookup tables, etc.) Parameters: training_examples: Multiple training examples. Mappings in case additional values were specified for an example (e.g. metadata) or just the plain value. key_name: The top level key which the examples belong to (e.g. `intents`). key_examples: The sub key which the examples should be added to (e.g. `examples`). example_extraction_predicate: Function to extract example value (e.g. the text for an intent example). Returns: List[OrderedDict]: NLU training data examples prepared for writing to YAML. ``` -------------------------------- ### Configure SQLTrackerStore in endpoints.yml Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/tracker-stores Provides examples for configuring the SQLTrackerStore in endpoints.yml, including a general setup for an SQL database and a specific setup for use with a PostgreSQL service in Docker Compose. ```YAML tracker_store: type: SQL dialect: "postgresql" # the dialect used to interact with the db url: "" # (optional) host of the sql db, e.g. "localhost" db: "rasa" # path to your db username: # username used for authentication password: # password used for authentication query: # optional dictionary to be added as a query string to the connection URL driver: my-driver ``` ```YAML tracker_store: type: SQL dialect: "postgresql" # the dialect used to interact with the db url: "postgres" db: "rasa" # path to your db username: # username used for authentication password: # password used for authentication query: # optional dictionary to be added as a query string to the connection URL driver: my-driver ``` -------------------------------- ### Rasa Core Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/shared/nlu/training_data/formats/rasa_yaml Detailed hierarchical listing of modules and sub-modules within the `rasa.core` library, providing an overview of its internal structure and available components for building conversational AI assistants. This includes modules for channels, evaluation, events, featurizers, natural language generation (NLG), policies, and training utilities. ```APIDOC rasa.core.channels.webexteams rasa.core.evaluation rasa.core.evaluation.marker rasa.core.evaluation.marker_base rasa.core.evaluation.marker_stats rasa.core.evaluation.marker_tracker_loader rasa.core.evaluation.markers rasa.core.events rasa.core.events rasa.core.featurizers rasa.core.featurizers._single_state_featurizer rasa.core.featurizers._tracker_featurizers rasa.core.featurizers.precomputation rasa.core.featurizers.single_state_featurizer rasa.core.featurizers.tracker_featurizers rasa.core.nlg rasa.core.nlg.callback rasa.core.nlg.generator rasa.core.nlg.interpolator rasa.core.nlg.response rasa.core.nlg.template rasa.core.policies rasa.core.policies._ensemble rasa.core.policies._memoization rasa.core.policies._policy rasa.core.policies._rule_policy rasa.core.policies._ted_policy rasa.core.policies._unexpected_intent_policy rasa.core.policies.ensemble rasa.core.policies.fallback rasa.core.policies.form_policy rasa.core.policies.mapping_policy rasa.core.policies.memoization rasa.core.policies.policy rasa.core.policies.rule_policy rasa.core.policies.sklearn_policy rasa.core.policies.ted_policy rasa.core.policies.two_stage_fallback rasa.core.policies.unexpected_intent_policy rasa.core.training rasa.core.training.converters rasa.core.training.converters.responses_prefix_converter rasa.core.training.converters.story_markdown_to_yaml_converter rasa.core.training.story_reader rasa.core.training.story_reader.markdown_story_reader rasa.core.training.story_reader.story_reader rasa.core.training.story_reader.story_step_builder rasa.core.training.story_reader.yaml_story_reader rasa.core.training.story_writer rasa.core.training.story_writer.yaml_story_writer rasa.core.training rasa.core.training.data ``` -------------------------------- ### Get First Data Example from RasaModelData Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/2.x/reference/rasa/utils/tensorflow/model_data Returns a simplified version of the data, containing only one feature example per key and sub-key, useful for quick inspection or debugging. ```APIDOC first_data_example() -> Data Return the data with just one feature example per key, sub-key. Returns: The simplified data. ``` -------------------------------- ### Rasa Framework Module Index Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/shared/nlu/training_data/formats/rasa_yaml A comprehensive listing of Python modules and their sub-components within the Rasa framework, detailing the structure of graph components, data importers, and NLU processing units. This index provides a high-level overview of the available API elements. ```APIDOC rasa.graph_components.providers: - nlu_training_data_provider - project_provider - rule_only_provider - story_graph_provider - training_tracker_provider rasa.graph_components.validators: - default_recipe_validator - finetuning_validator rasa.importers: - autoconfig - importer - multi_project - rasa rasa.nlu: rasa.nlu.classifiers: - _classifier - _diet_classifier - _fallback_classifier - _keyword_intent_classifier - _mitie_intent_classifier - _sklearn_intent_classifier - classifier - diet_classifier - fallback_classifier - keyword_intent_classifier - logistic_regression_classifier - mitie_intent_classifier - regex_message_handler - sklearn_intent_classifier rasa.nlu.emulators: - dialogflow - emulator - luis - no_emulator - wit rasa.nlu.extractors: - _crf_entity_extractor - _duckling_entity_extractor - _entity_synonyms - _extractor - _mitie_entity_extractor - _regex_entity_extractor - crf_entity_extractor - duckling_entity_extractor - duckling_http_extractor - entity_synonyms - extractor ``` -------------------------------- ### Rasa Core, Engine, and Graph Components API Modules Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/utils/tensorflow/rasa_layers Lists the available modules and sub-modules within the `rasa.core`, `rasa.engine`, and `rasa.graph_components` packages, providing a structured reference to the Rasa API. ```APIDOC rasa.core rasa.core.training rasa.core.training.generator rasa.core.training.interactive rasa.core.training.loading rasa.core.training.story_conflict rasa.core.training.structures rasa.core.training.training rasa.core.training.visualization rasa.core.agent rasa.core.config rasa.core.conversation rasa.core.domain rasa.core.exceptions rasa.core.exporter rasa.core.featurizers rasa.core.http_interpreter rasa.core.interpreter rasa.core.jobs rasa.core.lock rasa.core.lock_store rasa.core.migrate rasa.core.processor rasa.core.registry rasa.core.restore rasa.core.run rasa.core.slots rasa.core.test rasa.core.tracker_store rasa.core.trackers rasa.core.train rasa.core.utils rasa.core.visualize rasa.engine rasa.engine.recipes rasa.engine.recipes.default_recipe rasa.engine.recipes.graph_recipe rasa.engine.recipes.recipe rasa.engine.runner rasa.engine.runner.dask rasa.engine.runner.interface rasa.engine.storage rasa.engine.storage.local_model_storage rasa.engine.storage.resource rasa.engine.storage.storage rasa.engine.training rasa.engine.training.components rasa.engine.training.fingerprinting rasa.engine.training.graph_trainer rasa.engine.training.hooks rasa.engine.caching rasa.engine.exceptions rasa.engine.graph rasa.engine.loader rasa.engine.validation rasa.graph_components rasa.graph_components.adders rasa.graph_components.adders.nlu_prediction_to_history_adder rasa.graph_components.converters rasa.graph_components.converters.nlu_message_converter rasa.graph_components.providers rasa.graph_components.providers.domain_for_core_training_provider rasa.graph_components.providers.domain_provider rasa.graph_components.providers.domain_without_response_provider ``` -------------------------------- ### SessionStarted Event API and Example Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/next/action-server/sdk-events Documents the `SessionStarted` event class, used to indicate the start of a new conversation session. It details the constructor parameters and provides a Python example for instantiation. ```APIDOC SessionStarted(timestamp: Optional[float] = None) Underlying event: session_started Parameters: timestamp: Optional timestamp of the event ``` ```Python evt = SessionStarted() ``` -------------------------------- ### Rasa Backend Event: End-to-End Testing Started Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/telemetry/reference Details the 'End-to-End Testing Started' backend event, triggered at the beginning of an end-to-end testing session. It includes information about the test setup. ```APIDOC Event: End-to-End Testing Started Description: Triggered when end-to-end testing has been started. Properties: number_of_test_cases (integer): Number of test cases to be run. number_of_fixtures (integer): Number of fixtures defined globally. uses_fixtures (boolean): Indicates if any fixtures have been defined globally. ``` -------------------------------- ### Rasa Core Training Generator Module API Reference Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/action-server Provides a reference to the `rasa.core.training.generator` module within the Rasa framework. This entry serves as an index to its detailed API documentation, focusing on components related to training data generation. ```APIDOC rasa.core.training.generator ``` -------------------------------- ### Rasa NLU and Shared Core API Modules Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/reference/rasa/core/training/story_writer/yaml_story_writer Lists the available modules and their hierarchical structure within the `rasa.nlu` and `rasa.shared.core` packages, providing an overview of the API surface for these components. ```APIDOC - rasa.nlu.training_data.formats.markdown - rasa.nlu.training_data.formats.markdown_nlg - rasa.nlu.training_data.formats.rasa - rasa.nlu.training_data.formats.rasa_yaml - rasa.nlu.training_data.formats.readerwriter - rasa.nlu.training_data.formats.wit + rasa.nlu.training_data.entities_parser + rasa.nlu.training_data.loading + rasa.nlu.training_data.lookup_tables_parser + rasa.nlu.training_data.message + rasa.nlu.training_data.synonyms_parser + rasa.nlu.training_data.training_data + rasa.nlu.training_data.util * rasa.nlu.utils + rasa.nlu.utils.hugging_face - rasa.nlu.utils.hugging_face.hf_transformers - rasa.nlu.utils.hugging_face.transformers_pre_post_processors + rasa.nlu.utils + rasa.nlu.utils._mitie_utils + rasa.nlu.utils._spacy_utils + rasa.nlu.utils.bilou_utils + rasa.nlu.utils.mitie_utils + rasa.nlu.utils.pattern_utils + rasa.nlu.utils.spacy_utils * rasa.nlu.components * rasa.nlu.config * rasa.nlu.convert * rasa.nlu.model * rasa.nlu.persistor * rasa.nlu.registry * rasa.nlu.run * rasa.nlu.test * rasa.nlu.train - rasa.shared * rasa.shared.core + rasa.shared.core.training_data - rasa.shared.core.training_data.story_reader * rasa.shared.core.training_data.story_reader.markdown_story_reader * rasa.shared.core.training_data.story_reader.story_reader * rasa.shared.core.training_data.story_reader.story_step_builder * rasa.shared.core.training_data.story_reader.yaml_story_reader - rasa.shared.core.training_data.story_writer * rasa.shared.core.training_data.story_writer.markdown_story_writer * rasa.shared.core.training_data.story_writer.story_writer * rasa.shared.core.training_data.story_writer.yaml_story_writer - rasa.shared.core.training_data.loading - rasa.shared.core.training_data.structures - rasa.shared.core.training_data.visualization + rasa.shared.core.constants + rasa.shared.core.conversation ``` -------------------------------- ### Story Visualization Started Event Source: https://legacy-docs-oss.rasa.com/docs/rasa/installation/environment-set-up/rasa/telemetry/reference Triggered when stories are getting visualized. ```APIDOC Event: Story Visualization Started Properties: None ```