Closed sprathod369 closed 1 month ago
I've setup AnythingLLM using docker compose and running the latest available AnythingLLM version 1.2.1 (not sure why the documentation site says v1.6.4 is live but I cannot find this docker image tag)
v1.6.4 is for desktop - the Docker version is 1.2.1 currently.
After setting up a SQL Connector (PostgreSQL) the agent is unaware of this active connection to the database. The connection is named “mydatabase”. The details provided and configured to the SQL agent is fine as I am able to connect to the same postgresql database using VS. Code. The PostgreSQL database is running as a docker container on another VM.
The issue here sounds like the connection string is not valid for the PG connection. Since you are communicating docker<>docker the issue might be if you are using localhost
as the host
in the connection string. However, before looking into that further the main issues seems agent JSON generation.
[backend] info: [AgentLLM - llama3.1:8b-instruct-q8_0] Invalid function tool call: Missing name or arguments in function call.. [backend] info: [AgentLLM - llama3.1:8b-instruct-q8_0] Will assume chat completion without tool call inputs.
This implies the agent "sees" the tool, but cannot form a valid JSON call - we can add some debugging here to more easily tail the issues but the valid JSON response to list-tables
looks like
{
"name": "sql-list-tables",
"arguments": {
"database_id": "mydatabase",
}
}
Sometimes, with OSS LLM debugging can also be done by clearing the chat window + asking a super direct question to agent.
eg:
@agent List all of the tables for the mydatabase db
@agent List all connected databases you can access
(calls func with no params - will test just connection string)
typically a bad connection issue due to connection string would throw a different answer, but this looks to be just agents not being "smart" enough to detect a valid tool.
Closing for now until a bug is uncovered - seems behavior oriented right now.
How are you running AnythingLLM?
Docker (local)
What happened?
This is a very interesting tool and project, especially the agent functionality. I've setup AnythingLLM using docker compose and running the latest available AnythingLLM version 1.2.1 (not sure why the documentation site says v1.6.4 is live but I cannot find this docker image tag) I also have Ollama docker setup on the same machine and llama3.1:8b-instruct-q8_0 model running successfully.
After setting up a SQL Connector (PostgreSQL) the agent is unaware of this active connection to the database. The connection is named “mydatabase”. The details provided and configured to the SQL agent is fine as I am able to connect to the same postgresql database using VS. Code. The PostgreSQL database is running as a docker container on another VM.
If I ask the agent for the list of the tables of the database, it just hallucinates or mentions below response . It’s seems agent is not coming into play nor are any tools invoked looking at the logs.
Prompt @agent Using mydatabase give me the names of any 5 tables from dtrack database
Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early.
Response To access the database, I’ll need to use some tools. It seems like you want me to interact with a database named dtrack. However, I don’t have direct access to your local database. But if you’d like, we can simulate this using a text-based interface…….
The following are the logs from AnythingLLM :
Any inputs / suggestions will be appreciated.
Are there known steps to reproduce?
No response