This project is a virtual assistant that answers frequently asked questions from an online store.
It is developed in Python using LangChain and OpenAI, and simulates a basic chatbot with no memory, using predefined fixed answers.
- The user can write typical questions such as:
- "What are your opening hours?"
- "Do you ship internationally?"
- The assistant responds clearly, using only the predefined information.
- The chat runs in a loop and ends when the user types
salir
(exit).
- Python (recommended: 3.10+)
- LangChain
- LangChain Community
- OpenAI
- python-dotenv โ to load API keys from a
.env
file
Follow these steps to run the project in your local environment:
git clone https://github.com/your_username/chat_faq.git cd chat_faq 2. Create and activate a virtual environment
python -m venv venv .\venv\Scripts\Activate # on Windows
source venv/bin/activate # on Mac/Linux 3. Install dependencies
pip install langchain langchain-community openai python-dotenv ๐ Configuration Create a .env file in the root of the project with your OpenAI key:
OPENAI_API_KEY=your_key_here You can get your key from: https://platform.openai.com/account/api-keys
python app.py Then type your questions. To exit, type salir (exit).