[GH-ISSUE #2047] [BUG]: How connect and querry data from sql endpoint #1335

Closed
opened 2026-02-22 18:24:19 -05:00 by yindo · 2 comments
Owner

Originally created by @sonnt-dna on GitHub (Aug 5, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2047

How are you running AnythingLLM?

Docker (local)

What happened?

I cann't connect and getting data from postgres database.
I got some message such as:

2024-08-05 17:20:46 [backend] info: [AgentHandler] End cb059fb5-1c98-4a34-acac-143f3c0dfb24::ollama:llama3.1:latest
2024-08-05 17:20:53 [backend] info: [TELEMETRY SENT] {"event":"sent_chat","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"multiUserMode":true,"LLMSelection":"ollama","Embedder":"native","VectorDbSelection":"lancedb","multiModal":false,"runtime":"docker"}}
2024-08-05 17:20:53 [backend] info: [Event Logged] - sent_chat
2024-08-05 17:20:53 [backend] info: [AgentHandler] Start 7f07136e-81d3-42f7-b36f-0643d8027123::ollama:llama3.1:latest
2024-08-05 17:20:53 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_started","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached websocket plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached chat-history plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attaching user and default agent to Agent cluster.
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached rag-memory plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached document-summarizer plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached web-scraping plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached save-file-to-browser plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached create-chart plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-list-databases plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-list-tables plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-get-table-schema plugin to Agent cluster
2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-query plugin to Agent cluster
2024-08-05 17:20:59 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:20:59 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:21:07 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:21:46 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:21:46 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:21:59 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:22:38 [backend] info: Client took too long to respond, chat thread is dead after 300000ms
2024-08-05 17:23:52 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:23:52 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:24:04 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:24:35 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:24:35 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:24:46 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:25:29 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:25:29 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:25:42 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:29:09 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:29:09 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:29:20 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:29:32 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call..
2024-08-05 17:29:32 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs.
2024-08-05 17:29:43 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}}
2024-08-05 17:29:53 [backend] info: [AgentHandler] End 7f07136e-81d3-42f7-b36f-0643d8027123::ollama:llama3.1:latest

Please guide me for working!
Thanks you!

Are there known steps to reproduce?

No response

Originally created by @sonnt-dna on GitHub (Aug 5, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2047 ### How are you running AnythingLLM? Docker (local) ### What happened? I cann't connect and getting data from postgres database. I got some message such as: 2024-08-05 17:20:46 [backend] info: [AgentHandler] End cb059fb5-1c98-4a34-acac-143f3c0dfb24::ollama:llama3.1:latest 2024-08-05 17:20:53 [backend] info: [TELEMETRY SENT] {"event":"sent_chat","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"multiUserMode":true,"LLMSelection":"ollama","Embedder":"native","VectorDbSelection":"lancedb","multiModal":false,"runtime":"docker"}} 2024-08-05 17:20:53 [backend] info: [Event Logged] - sent_chat 2024-08-05 17:20:53 [backend] info: [AgentHandler] Start 7f07136e-81d3-42f7-b36f-0643d8027123::ollama:llama3.1:latest 2024-08-05 17:20:53 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_started","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached websocket plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached chat-history plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attaching user and default agent to Agent cluster. 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached rag-memory plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached document-summarizer plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached web-scraping plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached save-file-to-browser plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached create-chart plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-list-databases plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-list-tables plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-get-table-schema plugin to Agent cluster 2024-08-05 17:20:53 [backend] info: [AgentHandler] Attached sql-agent:sql-query plugin to Agent cluster 2024-08-05 17:20:59 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:20:59 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:21:07 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:21:46 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:21:46 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:21:59 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:22:38 [backend] info: Client took too long to respond, chat thread is dead after 300000ms 2024-08-05 17:23:52 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:23:52 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:24:04 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:24:35 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:24:35 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:24:46 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:25:29 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:25:29 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:25:42 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:29:09 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:29:09 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:29:20 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:29:32 [backend] info: [AgentLLM - llama3.1:latest] Invalid function tool call: Missing name or arguments in function call.. 2024-08-05 17:29:32 [backend] info: [AgentLLM - llama3.1:latest] Will assume chat completion without tool call inputs. 2024-08-05 17:29:43 [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"a49ed698-1096-459f-b32a-82379360a32f","properties":{"runtime":"docker"}} 2024-08-05 17:29:53 [backend] info: [AgentHandler] End 7f07136e-81d3-42f7-b36f-0643d8027123::ollama:llama3.1:latest Please guide me for working! Thanks you! ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:24:19 -05:00
yindo closed this issue 2026-02-22 18:24:19 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 5, 2024):

Invalid function tool call: Missing name or arguments in function call..

Your LLM is attempt to call the tool, but it is returning JSON schema in an invalid format that does not specifically match what we need to call a tool. https://docs.anythingllm.com/agent-not-using-tools

Returning valid JSON (we do a lot of the legwork here anyway) is one thing, returning it in the proper schema is fully model side and can be helped with running the Q8 version of a model (most times).

@timothycarambat commented on GitHub (Aug 5, 2024): > Invalid function tool call: Missing name or arguments in function call.. Your LLM is attempt to call the tool, but it is returning JSON schema in an invalid format that does not _specifically match what we need_ to call a tool. https://docs.anythingllm.com/agent-not-using-tools Returning valid JSON (we do a lot of the legwork here anyway) is one thing, returning it in the _proper schema_ is fully model side and can be helped with running the Q8 version of a model (most times).
Author
Owner

@sonnt-dna commented on GitHub (Aug 5, 2024):

Thanks for your sharing, that is mean, I can get result on JSON format, which is easy for processing in next step!

@sonnt-dna commented on GitHub (Aug 5, 2024): Thanks for your sharing, that is mean, I can get result on JSON format, which is easy for processing in next step!
yindo changed title from [BUG]: How connect and querry data from sql endpoint to [GH-ISSUE #2047] [BUG]: How connect and querry data from sql endpoint 2026-06-05 14:40:13 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1335