This project is a web application developed with Flask that allows you to configure and use a chatbot based on LangChain. The chatbot answers questions using information provided by the user and processes queries through OpenAI.
git clone https://github.com/your_user/your_repository.git cd your_repository
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
.env
file in the directory root and add your OpenAI API key:OPENAI_API_KEY=your_api_key_here
python app.py
http://127.0.0.1:5010
.POST /setup-db
Sets the content that will be used to answer queries.
Parameters:
content
(string): The text that contains the base information for the responses.
Request example:
{ "content": "The Python programming language is versatile and popular." }
{ "message": "Content successfully set" }
POST /chat
Sends a query to the chatbot.
Parameters:
message
(string): The user's question or query.
Request example:
{ "message": "What is Python?" }
{ "question": "What is Python?", "response": "The Python programming language is versatile and popular." }
.
├── app.py # Main application file
├── templates
│ └── index.html # HTML file for the main interface
├── requirements.txt # Project dependencies
└── .env.example # Example environment variables file
The main dependencies of the project are listed in requirements.txt
and include:
If you would like to contribute to this project:
git checkout -b your-branch-name
git commit -m "Description of your changes"
git push origin your-branch-name
This project is licensed under the MIT License. See the LICENSE
file for more information.
Thank you for using this project! If you have any questions or suggestions, feel free to open an issue in the repository.
There are no datasets linked
There are no datasets linked