You can read further here, here and here.
This repo contains the code for Scoopsie, a custom chatbot that answers ice-cream-related questions and fetches information from a fictional ice-cream store's API. Using LangChain and OpenAI's text model, alongside a Flask web service, Scoopsie can provide users with details on flavors, toppings, and store offers. Everything is put together with Chainlit for easy web application integration.
- Python 3.8 or later
- An OpenAI API key
- Clone the Repository
git clone [email protected]:tahreemrasul/simple_chatbot_langchain.git cd ./simple_chatbot_langchain
- Set Up a Conda Environment (Recommended)
- If you don't have Conda, install it first.
- Create a new Conda environment:
conda create -n chatbot_langchain python=3.8
- Activate the environment:
conda activate chatbot_langchain
- Install Dependencies
- Install the required packages using the
requirements.txt
file:pip install -r requirements.txt
- Set Up Your OpenAI API Key
- Create a .env file in the root directory of the project.
- Add your OpenAI API key to the
.env
file:OPENAI_API_KEY='Your-OpenAI-API-Key-Here'
To run the fictional store's API, execute the following command:
python ice_cream_store_app.py
The fictional store's API will be accessible at http://localhost:5000/{endpoint_name}
Make sure the fictional store's application is running before running the chatbot. To run Scoopsie,
simply execute the chatbot.py
script:
chainlit run chatbot.py -w --port 8000
To run the chatbot application, navigate to http://localhost:8000