Skip to content

AndrewBorst/appointment-rasa

Repository files navigation

Appointment Rasa - Appointment Booking Chatbot

A conversational AI chatbot built with Rasa for handling appointment bookings through natural language interactions.

Overview

This project implements an intelligent chatbot assistant that can help users:

  • Book new appointments
  • View existing appointments
  • Modify appointment details
  • Cancel appointments
  • Check availability

Technology Stack

  • Rasa: 3.6.21
  • Python: 3.10.19
  • Rasa SDK: 3.6.2
  • OS: Ubuntu (Linux)

Prerequisites

  • Ubuntu 20.04 LTS or later
  • Python 3.10
  • Minimum 4GB RAM
  • 10GB free disk space

Installation

1. Clone the Repository

git clone https://github.com/AndrewBorst/appointment-rasa.git
cd appointment-rasa

2. Set Up Virtual Environment

python3.10 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install --upgrade pip

# Option 1: Install exact versions (RECOMMENDED for team consistency)
pip install -r requirements.txt

# Option 2: Install just Rasa (may get different dependency versions)
pip install -r requirements-main.txt

Important: All developers should use Option 1 (requirements.txt) to ensure everyone has the exact same package versions and avoid "works on my machine" issues.

4. Verify Installation

rasa --version

Project Structure

appointment-rasa/
├── actions/              # Custom action code
│   ├── __init__.py
│   └── actions.py        # Custom action implementations
├── data/                 # Training data
│   ├── nlu.yml          # NLU training examples
│   ├── rules.yml        # Conversation rules
│   └── stories.yml      # Conversation stories
├── models/              # Trained models (excluded from git)
├── tests/               # Test conversations
│   └── test_stories.yml
├── config.yml           # Model configuration
├── domain.yml           # Bot's domain definition
├── endpoints.yml        # Endpoints configuration
├── credentials.yml      # External service credentials
├── instructions.md      # Detailed setup instructions
└── README.md           # This file

Usage

Training the Model

Train or retrain the model after making changes to training data:

rasa train

Testing the Chatbot

Interactive Shell

Test the chatbot in interactive mode:

rasa shell

Type your messages and press Enter. Use /stop to exit.

NLU Testing

Test only the NLU component:

rasa shell nlu

Validate Training Data

Check your training data for inconsistencies:

rasa data validate

Running the Chatbot

Development Mode

Start the Rasa server:

rasa run --enable-api --cors "*"

With Custom Actions

If you have custom actions, run the action server in a separate terminal:

# Terminal 1: Action Server
rasa run actions

# Terminal 2: Rasa Server
rasa run --enable-api --cors "*"

Development

Adding Training Data

Edit the files in the data/ directory:

  • nlu.yml: Add intent examples
  • stories.yml: Add conversation flows
  • rules.yml: Add conversation rules

Customizing the Bot

  1. Domain (domain.yml): Define intents, entities, slots, responses, and actions
  2. Config (config.yml): Configure the NLU pipeline and policies
  3. Actions (actions/actions.py): Implement custom action logic

Database Integration (Coming Soon)

The chatbot will integrate with a database to:

  • Store appointment records
  • Track customer information
  • Manage availability
  • Handle booking conflicts

Planned Features

  • Book new appointments
  • Cancel existing appointments
  • Modify appointment details
  • Check available time slots
  • View customer appointments
  • Email/SMS confirmations
  • Calendar integration
  • Multi-language support

Testing

Running Tests

Recommended method (avoids Rasa bug):

./run_tests.sh

Alternative methods:

# Explicit paths (avoids results/ directory scanning issue)
rasa test --stories tests --nlu data/nlu.yml

# Test only NLU
rasa test nlu --nlu data/nlu.yml

# Test only Core/Stories
rasa test core --stories tests

Known Issue: rasa test Bug

⚠️ Note: Running rasa test without arguments may fail with a TypeError due to a Rasa bug where it tries to parse JSON report files in the results/ directory as training data.

Workaround:

  • Use ./run_tests.sh script (recommended)
  • Or delete the results/ directory before running tests
  • Or use explicit paths as shown above

Test Results

Test results are saved to the results/ directory:

  • intent_report.json - NLU classification report
  • story_report.json - Story evaluation report
  • failed_test_stories.yml - Any failed test stories
  • Various confusion matrices and visualizations

Troubleshooting

Common Issues

Model training fails

  • Check YAML syntax in training data files
  • Ensure training data is balanced across intents

Actions not working

  • Make sure action server is running (rasa run actions)
  • Check endpoint configuration in endpoints.yml

Python version issues

  • This project requires Python 3.10
  • Use python3.10 --version to verify

Debug Mode

Run in debug mode to see detailed logs:

rasa shell --debug

Contributing

This is a private repository. For questions or suggestions, please contact the repository owner.

Resources

License

Private - All Rights Reserved

Author

AndrewBorst

Project Status

🚧 In Development - Basic setup complete, appointment booking features in progress.


Last Updated: October 10, 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors