pip3 install -r requirements.txt
Complete the .env file with your own values
DASHSCOPE_API_KEY=your_dashscope_api_key
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=your_neo4j_username
NEO4J_PASSWORD=your_neo4j_password
THREATBOOK_API=your_threatbook_api
fastapi dev app.py
unicorn main:app --port 8000 --workers 4 --log-level info
Test the API at http://localhost:8000/hello/Dustin
Get response like this:
{"message": "Hello Dustin"}
Test the LLM with Neo4j at http://localhost:8000/llm/ask
Get request need a json body like this:
{"query": "Who is the director of Casino?"}
Get response like this:
{
"code": 200,
"status": "success",
"query": "Who is the director of Casino?",
"result": "Martin Scorsese is the director of Casino."
}
Access the FastAPI Docs at http://localhost:8000/docs