Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Repository of OpenClassrooms' AI Engineer path, project #10 : create a flight booking chatbot, integrate and deploy it as a web app

License

Notifications You must be signed in to change notification settings

fleuryc/OC_AI-Engineer_P10_Flights-booking-chatbot

Fly Me : flights booking chatbot

Python application CodeQL Codacy Badge Codacy Badge


Repository of OpenClassrooms' AI Engineer path, project #10 .

Goal : use Azure Cognitive Services (LUIS), Azure Web App and Azure Application Insights, to build a flights booking chatbot, integrate it in a web application, and monitor its quality.

You can see the results here :

This is the project architecture in production :

center-img h:450px

Goals


Installation

Prerequisites

Virtual environment

# python -m venv env
# > or just :
make venv
source env/bin/activate

Dependencies

# pip install -r notebooks/requirements.txt -r bot/requirements.txt
# > or :
# pip install -r requirements.txt
# > or just :
make install

Environment variables

Set environment variable values in (copy or rename .env.example) :

Usage

Download data

Download, and extract the Language Understanding Model (LUIS) training files from Frames Dataset :

make dataset

EDA (Exploratory Data Analysis)

The main notebook presents the result of the EDA (exploratory data analysis) :

jupyter-lab notebooks/main.ipynb

Create a LUIS app in the LUIS portal

Follow the official documentation : Create a LUIS app in the LUIS portal

Train LUIS Model

The luis notebook formats the data, runs the LUIS training and tests the model :

jupyter-lab notebooks/luis.ipynb

Test and debug with the Emulator

Run the bot locally :

make bot-start

Follow the official documentation : Test and debug with the Emulator

Tutorial: Provision a bot in Azure

Follow the official documentation : Tutorial: Provision a bot in Azure

Deploy Bot to Azure Web App

Build and deploy the bot to Azure Web App integrating the Bot Service, LUIS and Application Insights :

make bot-deploy

Quality Assurance

# make isort
# make format
# make lint
# make bandit
# make mypy
# make test
# > or just :
make qa

This will run tests on the bot tests/test_bot.py :

  • test the LUIS service integration
  • test a dialog where the bot gathers the flight informations from the user
  • test a dialog where the user gives all the flight informations at once

Troubleshooting

No known issues...

About

Repository of OpenClassrooms' AI Engineer path, project #10 : create a flight booking chatbot, integrate and deploy it as a web app

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project