Welcome to the ChatGPT Custom Knowledge Chatbot! This project uses the OpenAI GPT-3.5 model to build a chatbot that can answer questions based on a custom knowledge base.
Getting Started
To get started with this project, follow these steps:
- Clone this repository: Click on the Code button and copy the URL. In your terminal, run
git clone https://github.com/robindekoster/chatgpt-custom-knowledge-chatbot.git
. - Install the necessary packages: Navigate to the project directory and run
pip install -r requirements.txt
to install all required dependencies. - Set your OpenAI API key: Run
export OPENAI_API_KEY=your-api-key
to set your OpenAI API key as an environment variable. - Add your text documents: Place the text, csv, and pdf documents you want the chatbot to use in the knowledge directory.
- Run the project: Start the chatbot by running
python main.py
in your terminal.
Technologies Used
This project uses the following technologies:
Understanding the Code Through an Analogy
Imagine you’re building a library for a community. Each step in setting up this chatbot project is like preparing that library:
- **Cloning the repository**: Think of this as laying the foundation of your library by getting the right building blocks (the code).
- **Installing packages**: This step is akin to collecting all the books and resources you’ll need to stock the library shelves (installing dependencies).
- **Setting the API key**: This is like getting a library card that gives you access to the exclusive collections (authorizing the OpenAI API).
- **Adding documents**: Imagine putting your collection of books, journals, and articles into the library (loading your own knowledge base).
- **Running the project**: Finally, this is like opening the doors of your library to the public for the first time (running your chatbot).
How to Contribute
We welcome and appreciate any contributions to improve and expand the project. To contribute, please:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes.
- Submit a pull request with a clear description of your changes.
Troubleshooting
If you encounter any issues while setting up or running the chatbot, here are some troubleshooting tips:
- Ensure your OpenAI API key is correctly set and has the necessary permissions.
- Check that your document formats are supported (text, csv, pdf) and placed in the right directory.
- Verify that all required packages are installed without any errors.
- If the chatbot isn’t responding as expected, look at the logs for any error messages that can provide clues.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
This project was created by Robin de Koster. You can find me on GitHub at @robindekoster.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions.
Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.