This project aims to build a conversational AI chatbot using FastAPI and deploy it on AWS Elastic Beanstalk. The chatbot leverages OpenAI's GPT-3 for generating responses and uses FAISS for efficient similarity search.
the bot in build using AWS Elastic Beanstalk in here
- Real-time conversation with the AI chatbot base on GPT-3.5
- PDF document upload for contextual conversations
- Chat interface
- Deployed on AWS Elastic Beanstalk
- Python 3.8 or upper
- FastAPI
- Uvicorn
- OpenAI API Key
- AWS Elastic Beanstalk CLI
- Clone the repository:
git clone https://github.com/ScottLL/AI-Chatbot.git
- Navigate to the project directory:
cd AI-Chatbot
- Install the required packages:
pip install -r requirements.txt
- Create a
.env
file and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
- Run the FastAPI application:
uvicorn app:app --host 0.0.0.0 --port 8000
- Open your browser and navigate to
http://localhost:8000
.
POST /upload/
: Upload PDF files for contextual conversations- Replace
ScottBot.pdf
with your own promp file (PDF).
- Replace
POST /ask/
: Send a question to the chatbot- need to adjust fetch address
http://localhost:8000/ask/"
inscript.js
when you deploy the app.
- need to adjust fetch address
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Scott - scott.lai@duke.edu