This is a simple chatbot that uses the OpenAI API to provide answers to questions.
To get started, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/Ai-Services.git- Install the required dependencies:
pip install -r requirements.txt- Set up the environment variables:
export GROQ_API_KEY=YOUR_API_KEY- Run the application:
python app.py- Access the application at http://localhost:8000/
To use the application, you can send a POST request to the /chat endpoint with a JSON body containing the following properties:
prompt: The prompt to send to the chatbot.user: The user's name.
For example, to send a prompt to the chatbot, you can make a POST request to the /chat endpoint with the following JSON body:
{
"prompt": "What is the capital of France?",
"user": "John"
}The response will be a JSON object containing the chatbot's response, including the user's name and the time the response was generated.
Contributions are welcome! If you have any suggestions or improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
{ "name": "Test", "email": "test@gmail.com", "preferences": { "kpis": [ "GMV", "CAC", "LTV" ], "marketplaces": [ "Amazon", "Flipkart" ], "categories": [ "Electronics", "Fashion" ] }, "_id": "699b05031cf6d24081475c08", "createdAt": "2026-02-22T13:30:43.794Z", "updatedAt": "2026-02-22T13:30:43.794Z", "__v": 0 }