Chatbot using custom text file.
These instructions will help you set up the project on your local machine.
- Python 3.6 or higher
- pip (Python package installer)
- virtualenv (Python environment builder)
Follow these steps to set up your development environment:
-
Create a virtual environment:
virtualenv venv
This command creates a virtual environment named 'venv' in your project directory.
-
Activate the virtual environment:
venv\scripts\activate
This command activates the virtual environment. You should see '(venv)' at the beginning of your command prompt once it's activated.
-
Install the required packages:
pip install -r req.text
This command installs the packages listed in the 'req.text' file. Make sure you have this file in your project directory and it lists all the necessary packages.
-
Set the 'OPENAI_API_KEY' environment variable: You need to set the 'OPENAI_API_KEY' in your environment variables. The method to do this depends on your operating system.
-
Train your model: Train your model on your custom text file and create an embedding. The specific command depends on the code you're using for training.
-
Run the code: Run your code by defining your custom question. The specific command depends on how your code is structured.