Edit model card
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Hotel Assistant Chatbot

Welcome to the Hotel Assistant Chatbot project! This repository contains a conversational AI powered by the Rasa framework, integrating Language Model capabilities from OpenAI. The chatbot assists users with various hotel-related queries, leveraging both structured data and natural language understanding.

Table of Contents

Introduction

The Hotel Assistant Chatbot leverages state-of-the-art Natural Language Processing (NLP) techniques to provide an intelligent conversational interface for hotel-related inquiries. This chatbot is built using the Rasa framework, which combines rule-based dialogue management with machine learning models for natural language understanding (NLU).

Key Features

  • NLP and Transformers: Utilizes advanced NLP models and transformer architectures, including BERT and SpaCy, to understand and process user queries with high accuracy.
  • Custom Components: Includes custom pipeline components, such as a spell-checker, to enhance user input handling and improve the overall chatbot performance.
  • Flexible and Extensible: Designed to be easily extendable, allowing the integration of additional services and customization to fit specific hotel requirements.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/hotel-assistant-bot.git
    cd hotel-assistant-bot
    
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Usage

Training the Model

To train the Rasa model with your current data, run:

make train

This command will train the Rasa model using the domain, data, and configuration files, and save the trained model in the models directory.

Running the Action Server

To start the action server, which handles custom actions, run:

make run-actions

Interacting with the Bot

You can interact with the bot using Rasa Shell:

make shell

This will start the action server and open the Rasa shell, allowing you to chat with the bot in the terminal.

Alternatively, you can run the bot and interact with it via HTTP API:

make run

Configuration

  • Domain File: configs/domain.yml contains the intents, entities, slots, responses, and forms used by the bot.
  • Training Data: data directory contains the NLU and Core training data.
  • Config File: configs/config.yml specifies the pipeline and policies for training the model.
  • Endpoints File: configs/endpoints.yml defines the endpoints for the action server and other external services.

File Structure

hotel-assistant-rasa-bot/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ data/                       # Training data for Rasa
β”‚   β”‚   β”œβ”€β”€ nlu/                    # NLU training data
β”‚   β”‚   β”œβ”€β”€ stories/                # Core training data (conversation stories)
β”‚   β”‚   └── rules/                  # Rule-based data for conversation handling
β”‚   β”œβ”€β”€ configs/                    # Configuration files for Rasa and other services
β”‚   β”‚   β”œβ”€β”€ config_supervised.yml   # Configuration for supervised learning
β”‚   β”‚   β”œβ”€β”€ config_custom.yml       # Configuration using custom pipelines
β”‚   β”‚   β”œβ”€β”€ config_bert.yml         # Configuration using BERT embeddings
β”‚   β”‚   └── config_spacy.yml        # Configuration using SpaCy
β”‚   β”œβ”€β”€ actions/                    # Custom action server files
β”‚   β”‚   └── actions.py              # Custom action implementation
β”‚   β”œβ”€β”€ tests/                      # Directory for testing scripts or unit tests
β”‚   β”‚   └── ...                     # Unit tests and testing scripts
β”‚   β”œβ”€β”€ resources/                  # Additional resources used in the project
β”‚   β”‚   └── ...                     # Any additional resource files
β”‚   β”œβ”€β”€ domain.yml                  # Domain file defining intents, entities, and actions
β”‚   β”œβ”€β”€ endpoints.yml               # Endpoints configuration for Rasa and external services
β”‚   β”œβ”€β”€ components/                 # Custom pipeline components for Rasa
β”‚   β”‚   └── spell_checker.py        # Custom spell-checker component
β”‚   β”œβ”€β”€ requirements.txt            # Python dependencies
β”‚   └── deb-requirements.txt        # Debian-based system dependencies
β”œβ”€β”€ docker/
β”‚   β”œβ”€β”€ docker-compose.yml          # Docker Compose configuration for deployment
β”‚   β”œβ”€β”€ Dockerfile.rasa             # Dockerfile for building the Rasa server image
β”‚   └── Dockerfile.action           # Dockerfile for building the action server image
β”œβ”€β”€ scripts/                        # Shell and batch scripts for automation
β”‚   β”œβ”€β”€ init.sh                     # Initialization script for setting up directories
β”‚   β”œβ”€β”€ init.bat                    # Batch file for setting up directories (Windows)
β”‚   β”œβ”€β”€ start.sh                    # Script to build and start Docker containers
β”‚   β”œβ”€β”€ start.bat                   # Batch file to build and start Docker containers (Windows)
β”‚   β”œβ”€β”€ startSql.sh                 # Script to start SQL database access
β”‚   β”œβ”€β”€ startSql.bat                # Batch file to start SQL database access (Windows)
β”‚   β”œβ”€β”€ stop.sh                     # Script to stop Docker containers
β”‚   └── stop.bat                    # Batch file to stop Docker containers (Windows)
β”œβ”€β”€ server.sh                       # Server start script
β”œβ”€β”€ app.json                        # App configuration file
β”œβ”€β”€ heroku.yml                      # Heroku deployment configuration
β”œβ”€β”€ Makefile                        # Makefile for automating tasks and commands
β”œβ”€β”€ LICENSE                         # License information for the project
└── README.md                       # Detailed documentation and instructions

Makefile Commands

Here are some useful commands to manage and run your Hotel Assistant Chatbot:

  • make init: Initialize permissions and folder structure.
  • make docker-start: Start Docker containers.
  • make docker-stop: Stop Docker containers.
  • make docker-up: Bring up Docker containers.
  • make docker-down: Bring down Docker containers.
  • make docker-rm: Remove Docker containers.
  • make docker-clean: Clean Docker resources.
  • make sql: Start SQL database access.
  • make train: Train the full Rasa model.
  • make train-nlu: Train only the NLU model.
  • make run-actions: Start the action server for handling custom actions.
  • make shell: Start the action server and open Rasa shell for interaction.
  • make run: Start the action server and Rasa server with API enabled.
  • make validate: Validate the Rasa configuration and training data.
  • make help: Display help information with available targets.

Contributing

Contributions are welcome! Please create a new issue or submit a pull request if you have any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Unable to determine this model's library. Check the docs .