A. Testen met Uvicorn
Als je FastAPI gebruikt, kun je Uvicorn lokaal draaien:
- Zorg dat je virtuele omgeving (venv) actief is: venv\Scripts\activate
- Voer het volgende commando uit:
uvicorn main:app --reload
- Open je browser of Postman om je endpoints te testen:
- Bijvoorbeeld:
http://127.0.0.1:8000/
- Bijvoorbeeld:
Code voor NLP Generatie:
curl -k -X POST “https://ckba-main-fastapi-production.up.railway.app/answer” -H “Content-Type: application/json” -d “{\”question\”: \”Wat is FastAPI?\”}”