Server with an AI agent powered by a LLM (Large Language Model).
The models have access to various tools:
- Internet search
- Wikipedia search
- RAG with database access
Clone the repository and install the dependencies:
git clone <repo>
cd <repo>
pip install -r requirements.txtPlace your .txt files containing texts for the RAG knowledge base into the data folder.
To start the server, execute:
python main.pyTo rebuild the database, run:
python ./app/engine/generate.pyAfter starting the server, send POST requests to http://127.0.0.1:8000/api/
Request the AI in chat format, with access to the database and tools:
curl -X POST "http://127.0.0.1:8000/api/chat/request" -H "accept: application/json" -H "Content-Type: application/json" -d '{"messages":[{"role":"user","content":"What are the consequences for someone who steals intellectual property?"}]}'Request the AI:
curl -X POST "http://127.0.0.1:8000/api/query/complete" -H "Content-Type: application/json" -d '{"query": "What are the consequences for someone who steals intellectual property?"}'Request the AI with database access:
curl -X POST "http://127.0.0.1:8000/api/query/request-to-stored-index" -H "Content-Type: application/json" -d '{"query": "What are the consequences for someone who steals intellectual property?"}'Request the AI with database and tools access:
curl -X POST "http://127.0.0.1:8000/api/query/request-agent" -H "Content-Type: application/json" -d '{"query": "What are the consequences for someone who steals intellectual property?"}'