HTTP server that uses the Mistral API to answer question from the La Boulangerie Wiki.
Using Langchain , Mistral and FastAPI.
- Clone the repository
- Install the dependencies with
pip install -r requirements.txt
- Add .env file with the following variables:
MISTRAL_API_KEY=YOUR_MISTRAL_API_KEY
WIKI_URL=YOUR_WIKI_URL (e.g. https://laboulangerie.fandom.com/fr/)
SECRET_KEY=YOUR_SECRET
PORT=3333 (optional, default is 8000)
- Run the server with
python3 src/app.py
Simple curl request to test the server:
curl -X POST \
-H "Content-Type: application/json" \
-d '{"request": "Quelle est la capitale de Goast ?"}' \
-u SECRET_KEY: \
http://localhost:8000/ask
Should return something like "La capitale de Goast est Tharass."