You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Artem-Darius Weber
87e95826e7
|
1 month ago | |
---|---|---|
app | 1 month ago | |
.env | 1 month ago | |
README.md | 1 month ago | |
app.db | 1 month ago | |
main.py | 1 month ago | |
requirements.txt | 1 month ago |
README.md
Langchain multi-tool LLM service
Run
First, configure
.env
file for your LM Studio MODEL and HOST!
uvicorn app.main:app --reload
API
List of the Tools
GET /tools
Content-Type: application/json
Response:
[
{
"id": 0,
"name": "string",
"description": "string"
}
]
Create a Tool
POST /tools
Content-Type: application/json
{
"name": "Calculator",
"description": "Useful for performing mathematical calculations. Input should be a valid mathematical expression.",
"function_code": "def tool_function(input: str) -> str:\n try:\n aeval = Interpreter()\n result = aeval(input)\n return str(result)\n except Exception as e:\n return f\"Error evaluating expression: {e}\""
}
Response:
{
"id": 0,
"name": "string",
"description": "string"
}
Get the Tool
GET /tools/{id}
Content-Type: application/json
Response:
{
"id": 0,
"name": "string",
"description": "string"
}
Submit a Query
POST /query
Content-Type: application/json
{
"input": "What is the capital of France and what is 15 multiplied by 3?"
}
Response:
{
"output": "Your request is being processed."
}
Get processed Answer
GET /answer/{question_id}
Content-Type: application/json
Response:
{
"id": 0,
"query": "string",
"answer": "string",
"timestamp": "string"
}