Main

agentsllmsvector-databaselancedbgptopenaiAImultimodal-aimachine-learningembeddingsfine-tuningexamplesdeep-learninggpt-4-visionllama-indexRASA_Customer-support-botragmultimodallangchainlancedb-recipes

RASA x LanceDB x LLM : Conversational chatbot

Rasa is an open-source framework for building intelligent, contextual, and scalable conversational agents. It provides robust tools for natural language understanding (NLU),dialogue management and custom actions, enabling the creation of sophisticated chatbots and virtual assistants tailored to specific business needs. With its flexible architecture, Rasa allows seamless integration with various APIs, databases, and machine learning models, facilitating the development of highly responsive and intelligent conversational experiences.

Explore RASA at : https://rasa.com/docs/rasa/

Explore LanceDB at : https://lancedb.github.io/lancedb/

Today we will be building an Advanced Customer Support Chatbot using Rasa, LanceDB, and OpenAI api to deliver a great customer service experience. This chatbot is designed to handle a wide range of customer inquiries, provide accurate information, and offer personalized assistance, all while maintaining a natural and engaging conversational flow.

[ ]
[ ]
/usr/local/lib/python3.10/dist-packages/rasa/core/tracker_store.py:1044: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
  Base: DeclarativeMeta = declarative_base()
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Rasa Open Source reports anonymous usage telemetry to help improve the product x
x for all its users.                                                             x
x                                                                                x
x If you'd like to opt-out, you can use `rasa telemetry disable`.                x
x To learn more, check out https://rasa.com/docs/rasa/telemetry/telemetry.       x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/validation.py:134: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
Welcome to Rasa! 🤖

To get started quickly, an initial project will be created.
If you need some help, check out the documentation at https://rasa.com/docs/rasa.

2024-12-30 20:25:43 INFO     root  - creating tests
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/tests/test_stories.yml -> ./tests
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/config.yml -> .
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/endpoints.yml -> .
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/credentials.yml -> .
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/domain.yml -> .
2024-12-30 20:25:43 INFO     root  - creating data
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/data/stories.yml -> ./data
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/data/nlu.yml -> ./data
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/data/rules.yml -> ./data
2024-12-30 20:25:43 INFO     root  - creating actions
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/actions/__init__.py -> ./actions
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/actions/actions.py -> ./actions
2024-12-30 20:25:43 INFO     root  - creating actions/__pycache__
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/actions/__pycache__/__init__.cpython-310.pyc -> ./actions/__pycache__
2024-12-30 20:25:43 INFO     root  - copying /usr/local/lib/python3.10/dist-packages/rasa/cli/initial_project/actions/__pycache__/actions.cpython-310.pyc -> ./actions/__pycache__
Created project directory at '/content'.
Finished creating project structure.
Training an initial model...
/usr/local/lib/python3.10/dist-packages/tensorflow/lite/python/util.py:52: DeprecationWarning: jax.xla_computation is deprecated. Please use the AOT APIs.
  from jax import xla_computation as _xla_computation
2024-12-30 20:25:49 INFO     numexpr.utils  - NumExpr defaulting to 2 threads.
The configuration for policies and pipeline was chosen automatically. It was written into the config file at 'config.yml'.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Starting to train component 'RegexFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Finished training component 'RegexFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Starting to train component 'LexicalSyntacticFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Finished training component 'LexicalSyntacticFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Starting to train component 'CountVectorsFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer  - 80 vocabulary items were created for text attribute.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Finished training component 'CountVectorsFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Starting to train component 'CountVectorsFeaturizer'.
2024-12-30 20:25:53 INFO     rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer  - 697 vocabulary items were created for text attribute.
2024-12-30 20:25:53 INFO     rasa.engine.training.hooks  - Finished training component 'CountVectorsFeaturizer'.
2024-12-30 20:25:54 INFO     rasa.engine.training.hooks  - Starting to train component 'DIETClassifier'.
Epochs: 100% 100/100 [00:42<00:00,  2.33it/s, t_loss=1.15, i_acc=1]
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Finished training component 'DIETClassifier'.
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Starting to train component 'EntitySynonymMapper'.
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Finished training component 'EntitySynonymMapper'.
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Starting to train component 'ResponseSelector'.
2024-12-30 20:26:50 INFO     rasa.nlu.selectors.response_selector  - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents.
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Finished training component 'ResponseSelector'.
Processed story blocks: 100% 3/3 [00:00<00:00, 2026.89it/s, # trackers=1]
Processed story blocks: 100% 3/3 [00:00<00:00, 971.43it/s, # trackers=3]
Processed story blocks: 100% 3/3 [00:00<00:00, 265.83it/s, # trackers=12]
Processed story blocks: 100% 3/3 [00:00<00:00, 70.43it/s, # trackers=39]
Processed rules: 100% 2/2 [00:00<00:00, 2641.25it/s, # trackers=1]
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Starting to train component 'MemoizationPolicy'.
Processed trackers: 100% 3/3 [00:00<00:00, 1329.27it/s, # action=12]
Processed actions: 12it [00:00, 5129.08it/s, # examples=12]
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Finished training component 'MemoizationPolicy'.
2024-12-30 20:26:50 INFO     rasa.engine.training.hooks  - Starting to train component 'RulePolicy'.
Processed trackers: 100% 2/2 [00:00<00:00, 1590.86it/s, # action=5]
Processed actions: 5it [00:00, 11137.29it/s, # examples=4]
Processed trackers: 100% 3/3 [00:00<00:00, 1967.92it/s, # action=12]
Processed trackers: 100% 2/2 [00:00<00:00, 1624.44it/s]
Processed trackers: 100% 5/5 [00:00<00:00, 1416.71it/s]
2024-12-30 20:26:51 INFO     rasa.engine.training.hooks  - Finished training component 'RulePolicy'.
2024-12-30 20:26:51 INFO     rasa.engine.training.hooks  - Starting to train component 'TEDPolicy'.
Processed trackers: 100% 120/120 [00:00<00:00, 1240.87it/s, # action=30]
Epochs: 100% 100/100 [00:22<00:00,  4.52it/s, t_loss=1.96, loss=1.8, acc=1]
2024-12-30 20:27:14 INFO     rasa.engine.training.hooks  - Finished training component 'TEDPolicy'.
2024-12-30 20:27:14 INFO     rasa.engine.training.hooks  - Starting to train component 'UnexpecTEDIntentPolicy'.
2024-12-30 20:27:14 WARNING  rasa.shared.utils.common  - The UnexpecTED Intent Policy is currently experimental and might change or be removed in the future 🔬 Please share your feedback on it in the forum (https://forum.rasa.com) to help us make this feature ready for production.
Processed trackers: 100% 120/120 [00:00<00:00, 3661.95it/s, # intent=12]
Epochs: 100% 100/100 [00:23<00:00,  4.17it/s, t_loss=0.134, loss=0.0164, acc=1]
2024-12-30 20:27:42 INFO     rasa.engine.training.hooks  - Finished training component 'UnexpecTEDIntentPolicy'.
Your Rasa model is trained and saved at 'models/20241230-202552-figurative-chronology.tar.gz'.
If you want to speak to the assistant, run 'rasa shell' at any time inside the project directory.

Quick overview of RASA x LanceDB Integration Workflow

Step 1 : Define knowledge_data and store it in LanceDB:

  • Use LanceDB to store and manage structured knowledge data relevant to customer support.

Step 2 : Configure Rasa Files:

  • nlu.yml: Train intent recognition and entity extraction.
  • stories.yml & rules.yml: Define conversational flows and rules.
  • domain.yml: Specify intents, entities, actions, and responses.
  • config.yml: Set up the NLP pipeline and policies.

Step 3 : Implement Custom Actions (actions.py):

  • Create actions that query LanceDB for relevant information based on user intents.
  • Integrate OpenAI’s LLM to generate nuanced and context-aware responses.

Step 4 : Train the Model (rasa train):

  • Compile and optimize the Rasa model based on the latest configurations and training data.

Step 5 : Run Servers:

  • Action Server: Executes custom actions.
  • Rasa Server: Handles user interactions and manages dialogue using the trained model.

Step 6 : Deploy and Test:

  • Interact with the chatbot to ensure it accurately understands queries, retrieves information from LanceDB, and generates appropriate responses via OpenAI’s LLM.

Creating and storing the Knowledge base of Company Support in a Lance Table

Let's create a dataset containing customer support information. We will use this data to populate LanceDB table.

It contains a list of dictionaries where each dictionary represents a piece of knowledge or an FAQ entry. Each entry has a "content" key corresponding to the support information.

[ ]

Let's set up a robust knowledge base for an advanced customer support chatbot by leveraging LanceDB for efficient data storage and retrieval, and a Sentence Transformer model for generating vector embeddings.

We will be using pre-trained Sentence Transformer model (BAAI/bge-small-en-v1.5) to convert textual support data into vector embeddings. You can change it accordingly.

Then we will create a table - "knowledge_base" in the DB and insert all the customer support information in this table.

[ ]
[ ]
Overwrited data to the existing table 'knowledge_base'.

Configure Rasa Files

domain.yml

The domain.yml file serves as the core configuration for your Rasa chatbot. It defines the chatbot’s intents, entities, slots, responses, actions, forms, and policies.

It has the following Components -

  1. Intents: Represents the purposes behind user messages (e.g., greetings, inquiries about account deletion).
  2. Entities: Specific pieces of information extracted from user inputs (e.g., project names, dates).
  3. Responses: Predefined messages the chatbot can send back to users.
  4. Actions: Lists both built-in and custom actions that the chatbot can perform.
  5. Slots: Variables that store information during a conversation to maintain context and continuity.
[ ]
Overwriting domain.yml

endpoints.yml

The endpoints.yml file configures various backend services that Rasa interacts with, such as action servers, event brokers, and tracker stores. It specifies the URLs and connection details for services like the custom action server (actions.py), enabling Rasa to communicate with it.

Following configurations are relevant to this use-case -

  1. Action Endpoint: Defines where Rasa should send requests to execute custom actions, typically pointing to the server running actions.py.
  2. Tracker Store: (Optional) Configures how conversation states are stored, which can be essential for maintaining session information in more complex setups.
[ ]
Overwriting endpoints.yml

stories.yml

The stories.yml file contains training stories that define example conversational paths your chatbot can take. These stories help Rasa understand how to manage dialogues by learning from example interactions. It provides Rasa with sequences of user intents and corresponding actions, teaching it how to handle various conversational scenarios.

[ ]
Overwriting data/stories.yml

rules.yml

The rules.yml file defines rule-based conversations that specify exact steps the chatbot should follow in certain situations. Unlike stories, rules are strict paths that Rasa should follow without deviation. It ensures that in specific scenarios, the chatbot responds in a predefined manner, which is crucial for critical interactions like error handling or confirmations.

It works alongside stories to cover fixed conversational flows that require precise control, such as security checks or policy confirmations.

[ ]
Overwriting data/rules.yml

nlu.yml

The nlu.yml file contains Natural Language Understanding (NLU) training data. It includes examples of user inputs categorized by intents and annotated with entities to train Rasa’s NLU component.

It has the following role in the project -

  1. Intent Recognition: Enables Rasa to accurately identify the user’s intent from their message.
  2. Entity Extraction: Allows Rasa to extract specific information from user inputs, which can be used in custom actions to query LanceDB or generate responses via OpenAI’s LLM.
  3. Training Data Quality: The quality and diversity of examples in nlu.yml directly impact the chatbot’s ability to understand and respond appropriately to a wide range of user queries.
[ ]
Overwriting data/nlu.yml

config.yml

The config.yml file defines the pipeline and policies used by Rasa for processing natural language inputs and managing dialogue workflows.

Let us understand the components of the config.yml file

  1. NLP Pipeline: Defines the components that handle preprocessing, feature extraction, intent classification, and entity recognition.
  2. Policies: Dictate how the chatbot selects actions based on the current dialogue state, using rules, machine learning models, or a combination of both.
  3. Endpoint Integrations: Can include configurations for connecting to external services or APIs, enhancing the chatbot’s capabilities.

It specifies the sequence of components (like tokenizers, featurizers, classifiers) that process user inputs for intent recognition and entity extraction. Then it determines how Rasa decides the next action based on the conversation state and the trained model.

[ ]
Overwriting config.yml

Implement Custom Actions (actions.py) file

The actions.py file is where you define custom actions for your Rasa chatbot. Custom actions are Python functions that can execute arbitrary logic, such as querying a database, calling external APIs, processing data, or integrating with services like LanceDB and OpenAI’s LLMs.

We will be doing the following in this file -

  1. Get user input: Processes user inputs and proceed to next step.
  2. Interacting with Databases: Queries LanceDB to retrieve relevant information based on user queries. 3.Enhancing Responses with LLMs: Utilizes OpenAI’s API to generate detailed, contextually relevant responses that go beyond predefined replies.
[ ]
Overwriting actions/actions.py

Training RASA Model

The rasa train command is used to train the Rasa model based on the data and configurations defined in your project files (nlu.yml, stories.yml, rules.yml, etc.)

It compiles the training data into a machine learning model that Rasa uses to interpret user inputs and manage conversations. The training process optimizes the model’s ability to accurately recognize intents, extract entities, and decide on appropriate actions, which is crucial for integrating seamless interactions with LanceDB and generating responses via LLMs.

[ ]
/usr/local/lib/python3.10/dist-packages/rasa/core/tracker_store.py:1044: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
  Base: DeclarativeMeta = declarative_base()
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/validation.py:134: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/usr/local/lib/python3.10/dist-packages/pkg_resources/__init__.py:3154: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
2024-12-30 21:14:02 INFO     rasa.cli.train  - Started validating domain and training data...
/usr/local/lib/python3.10/dist-packages/tensorflow/lite/python/util.py:52: DeprecationWarning: jax.xla_computation is deprecated. Please use the AOT APIs.
  from jax import xla_computation as _xla_computation
2024-12-30 21:14:07 INFO     numexpr.utils  - NumExpr defaulting to 2 threads.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/domain.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/data/nlu.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/data/rules.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/data/stories.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
2024-12-30 21:14:08 INFO     rasa.validator  - Validating intents...
2024-12-30 21:14:08 INFO     rasa.validator  - Validating uniqueness of intents and stories...
2024-12-30 21:14:08 INFO     rasa.validator  - Validating utterances...
2024-12-30 21:14:08 INFO     rasa.validator  - Story structure validation...
Processed story blocks: 100% 4/4 [00:00<00:00, 1979.38it/s, # trackers=1]
2024-12-30 21:14:08 INFO     rasa.core.training.story_conflict  - Considering all preceding turns for conflict analysis.
2024-12-30 21:14:08 INFO     rasa.validator  - No story structure conflicts found.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/domain.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/data/rules.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/data/stories.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/shared/utils/io.py:99: UserWarning: Training data file /content/data/nlu.yml has a lower format version than your Rasa Open Source installation: 3.0 < 3.1. Rasa Open Source will read the file as a version 3.1 file. Please update your version key to 3.1. See https://rasa.com/docs/rasa/training-data-format.
/usr/local/lib/python3.10/dist-packages/rasa/engine/recipes/recipe.py:35: FutureWarning: From Rasa Open Source 4.0.0 onwards it will be required to specify a recipe in your model configuration. Defaulting to recipe 'default.v1'.
  rasa.shared.utils.io.raise_deprecation_warning(
2024-12-30 21:14:11 INFO     rasa.engine.training.hooks  - Restored component 'CountVectorsFeaturizer' from cache.
2024-12-30 21:14:11 INFO     rasa.engine.training.hooks  - Restored component 'CountVectorsFeaturizer' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'DIETClassifier' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'EntitySynonymMapper' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'LexicalSyntacticFeaturizer' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'RegexFeaturizer' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'ResponseSelector' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'RulePolicy' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'TEDPolicy' from cache.
2024-12-30 21:14:12 INFO     rasa.engine.training.hooks  - Restored component 'UnexpecTEDIntentPolicy' from cache.
Your Rasa model is trained and saved at 'models/20241230-211410-synchronic-diff.tar.gz'.

Running Servers

The Rasa Server is the core component that handles user interactions. It processes incoming messages, interprets user intents, manages conversations, and generates appropriate responses based on the trained model and defined dialogue flows.

[ ]

The Action Server is a separate service that executes Custom Actions defined in your project (actions.py). These actions perform specialized tasks such as querying databases, processing data, or integrating with external APIs.

[ ]

Let's test out chatbot

[ ]
User: Hi
Assistant: Hello! How can I assist you today?

User: How do I reset my password? Explain in french
Assistant: Bonjour,
Pour supprimer votre compte, veuillez contacter notre équipe d'assistance à l'adresse suivante : support@yourcompany.com. Assurez-vous d'indiquer dans l'objet de votre message "Demande de suppression de compte". Nous vous assisterons rapidement dans cette démarche.
Si vous avez d'autres questions ou si vous avez besoin d'une aide supplémentaire, n'hésitez pas à nous le faire savoir.
Cordialement,  
L'équipe de support

User: Standard shipping details. Hinglish mein btao
Assistant: Aapka swaagat hai! Humein khushi hai ki aapne humse sampark kiya. 
Hamara standard shipping policy yeh hai ki agar aapka order $75 se zyada hai, toh aapko standard shipping par koi bhi charges nahi dene honge, yani shipping free hai. Lekin agar aapka order is amount se kam hai, toh aapko standard shipping fees deni padegi.
Agar aapko aur koi sawaal hai ya madad chahiye, toh zaroor puchhiye!

User: What is the weather today?
Assistant: I'm sorry, I don't have an answer to that question.

User: Bye
Assistant: Goodbye! Have a great day!

For debugging purposes

[ ]
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
node         6 root   21u  IPv6  19762      0t0  TCP *:8080 (LISTEN)
node         6 root   27u  IPv4  21268      0t0  TCP 11757d4d820b:56654->11757d4d820b:6000 (ESTABLISHED)
node         6 root   28u  IPv6  68552      0t0  TCP 11757d4d820b:8080->172.28.0.1:49662 (ESTABLISHED)
node         6 root   29u  IPv6 142453      0t0  TCP 11757d4d820b:8080->172.28.0.1:43440 (ESTABLISHED)
node         6 root   31u  IPv6  72491      0t0  TCP 11757d4d820b:8080->172.28.0.1:46072 (ESTABLISHED)
node         6 root   34u  IPv6 143833      0t0  TCP 11757d4d820b:8080->172.28.0.1:43708 (ESTABLISHED)
kernel_ma   26 root    3u  IPv4  19626      0t0  TCP 11757d4d820b:6000 (LISTEN)
kernel_ma   26 root    6u  IPv4  21269      0t0  TCP 11757d4d820b:6000->11757d4d820b:56654 (ESTABLISHED)
kernel_ma   26 root    7u  IPv4  20263      0t0  TCP 11757d4d820b:41868->11757d4d820b:9000 (ESTABLISHED)
kernel_ma   26 root    8u  IPv4  21271      0t0  TCP 11757d4d820b:46128->11757d4d820b:9000 (ESTABLISHED)
kernel_ma   26 root    9u  IPv4  21384      0t0  TCP 11757d4d820b:6000->172.28.0.1:58950 (ESTABLISHED)
colab-fil   73 root    3u  IPv4  19800      0t0  TCP localhost:3453 (LISTEN)
jupyter-n   90 root    7u  IPv4  20838      0t0  TCP 11757d4d820b:9000 (LISTEN)
jupyter-n   90 root    8u  IPv4  20866      0t0  TCP 11757d4d820b:9000->11757d4d820b:41868 (ESTABLISHED)
jupyter-n   90 root   18u  IPv4  21272      0t0  TCP 11757d4d820b:9000->11757d4d820b:46128 (ESTABLISHED)
dap_multi   91 root    9u  IPv4  68985      0t0  TCP localhost:58084->localhost:38429 (ESTABLISHED)
python3   1728 root   21u  IPv4  68701      0t0  TCP localhost:37327 (LISTEN)
python3   1728 root   34u  IPv4  68878      0t0  TCP localhost:44974->localhost:41041 (ESTABLISHED)
python3   1728 root   51u  IPv4 106476      0t0  TCP 11757d4d820b:42606->server-3-171-171-65.atl59.r.cloudfront.net:443 (CLOSE_WAIT)
python3   1728 root   52u  IPv4 106845      0t0  TCP 11757d4d820b:46718->server-3-171-171-65.atl59.r.cloudfront.net:443 (CLOSE_WAIT)
python3   1728 root   54u  IPv4 108879      0t0  TCP 11757d4d820b:34598->server-54-230-253-56.atl56.r.cloudfront.net:443 (CLOSE_WAIT)
python3   1753 root    3u  IPv4  68533      0t0  TCP localhost:38429 (LISTEN)
python3   1753 root    4u  IPv4  68875      0t0  TCP localhost:38429->localhost:58084 (ESTABLISHED)
python3   1753 root    5u  IPv4  68534      0t0  TCP localhost:41041 (LISTEN)
python3   1753 root    6u  IPv4  68876      0t0  TCP localhost:41041->localhost:44974 (ESTABLISHED)
rasa      6257 root   14u  IPv4 140831      0t0  TCP *:5005 (LISTEN)
rasa      6434 root   29u  IPv4 139178      0t0  TCP *:5055 (LISTEN)
rasa      6434 root   32u  IPv4 140924      0t0  TCP 11757d4d820b:51776->server-3-171-171-6.atl59.r.cloudfront.net:443 (ESTABLISHED)
[ ]
/bin/bash: line 1: kill: (7966) - No such process
[ ]