lite-agent

Install Dependencies

Need Python 3.10

pip3 install -r requirements.txt

Setup Env

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

Run

Development

fastapi dev app.py

Production

unicorn main:app --port 8000 --workers 4 --log-level info

Test

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."
}

Docs

Access the FastAPI Docs at http://localhost:8000/docs