This project is a Retrieval-Augmented Generation (RAG) system designed for providing customer support using an A.I. model. The system integrates with Pinecone for vector search and utilizes a language model (LLaMA 13B) for generating responses based on user queries and relevant context.
- Retrieval-Augmented Generation (RAG): Combines query and relevant context to generate accurate responses.
- Vector Search: Uses Pinecone for efficient vector search and retrieval of relevant information.
- Language Model Integration: Leverages LLaMA 13B for natural language processing and response generation.
- Flask API: Provides a simple Flask-based API for interacting with the system.
-
Clone the repository:
git clone https://github.com/DaniyalAhm/A.I-Customer-Support.git cd A.I-Customer-Support
-
Create and activate a virtual environment:
python3 -m venv env source env/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file in the root directory and add the following environment variables:PINECONE_API_KEY=your-pinecone-api-key LLAMA_API_KEY=your-llama-api-key
-
Run the application:
python app.py
Once the application is running, you can interact with it via HTTP requests to the Flask API. The main endpoint is /response
, where you can send a query and receive a generated response.
curl "http://localhost:5000/response?value=How do I reset my password?"
{
"response": "To reset your password, go to the login page and click on 'Forgot Password'. Follow the instructions provided to reset your password."
}
- Pinecone Configuration: Ensure that your Pinecone index is properly configured with the required vectors and metadata.
- LLaMA API Configuration: Make sure you have access to the LLaMA API and that your API key is set in the
.env
file.
GET /response
:- Description: Takes a user query and returns a generated response based on the query and retrieved context.
- Parameters:
value
(string): The user query.
- Response: JSON object with the generated response.
A.I-Customer-Support/
│
├── app.py # Main Flask application file
├── requirements.txt # List of Python dependencies
├── .env # Environment variables file (not included in the repository)
├── README.md # Project README file
└── <additional-files> # Other scripts, modules, or assets
Contributions are welcome! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request. Make sure to follow the project's coding standards and include relevant tests.
This project is licensed under the MIT License. See the LICENSE file for details.