Closed nicho2 closed 5 months ago
docker log:
[AgentHandler] Start c52c6ce7-cb59-4c44-8caf-4e3566ce20f3::ollama:llama3:8b-instruct-q8_0
[TELEMETRY SENT] {
event: 'agent_chat_started',
distinctId: '98297666-e886-4011-9303-5720b1f81b92',
properties: { runtime: 'docker' }
}
[AgentHandler] Attached websocket plugin to Agent cluster
[AgentHandler] Attached chat-history plugin to Agent cluster
[AgentHandler] Attaching user and default agent to Agent cluster.
[AgentHandler] Attached rag-memory plugin to Agent cluster
[AgentHandler] Attached document-summarizer plugin to Agent cluster
[AgentHandler] Attached web-scraping plugin to Agent cluster
[AgentHandler] Attached web-browsing plugin to Agent cluster
[AgentHandler] Attached sql-agent:sql-list-databases plugin to Agent cluster
[AgentHandler] Attached sql-agent:sql-list-tables plugin to Agent cluster
[AgentHandler] Attached sql-agent:sql-get-table-schema plugin to Agent cluster
[AgentHandler] Attached sql-agent:sql-query plugin to Agent cluster
[AgentHandler] Attached create-chart plugin to Agent cluster
[AgentHandler] Attached save-file-to-browser plugin to Agent cluster
[AgentLLM - llama3:8b-instruct-q8_0] Invalid function tool call: Missing name or arguments in function call..
[AgentLLM - llama3:8b-instruct-q8_0] Will assume chat completion without tool call inputs.
[TELEMETRY SENT] {
event: 'agent_chat_sent',
distinctId: '98297666-e886-4011-9303-5720b1f81b92',
properties: { runtime: 'docker' }
}
[AgentHandler] End c52c6ce7-cb59-4c44-8caf-4e3566ce20f3::ollama:llama3:8b-instruct-q8_0
Also sometimes (with a differents user prompt) , i can have something as this:
{"model":"llama3:8b-instruct-q8_0","created_at":"2024-06-06T11:22:33.802299259Z","message":{"role":"assistant","content":"{\n \"name\": \"sql-list-tables\",\n \"database_id\": \"odbc\"\n}"},"done_reason":"stop","done":true,"total_duration":8570483975,"load_duration":7048436750,"prompt_eval_count":1310,"prompt_eval_duration":836772000,"eval_count":22,"eval_duration":585033000}
or this:
{"model":"llama3:8b-instruct-q8_0","created_at":"2024-06-06T09:37:00.558348692Z","message":{"role":"assistant","content":"I can help you with that!\n\nHere is the JSON response:\n\n{\n \"name\": \"sql-list-tables\",\n \"database_id\": \"odbc\"\n}\n
\nThis function will list all available tables in the ODBC database. Let me know if you'd like to proceed with this query!"},"done_reason":"stop","done":true,"total_duration":12991065971,"load_duration":10319062185,"prompt_eval_count":1302,"prompt_eval_duration":837425000,"eval_count":65,"eval_duration":1785383000}
is it possible to parse the message to extract the json if the json is not alone in the message ?
is it possible to parse the message to extract the json if the json is not alone in the message ?
We do this actually already because the JSON output from OSS LLMs is so unreliable. function safeJsonParse(jsonString, fallback = null) {
Output of that text from Replit using that function.
Oddly this line in the logs:
[AgentLLM - llama3:8b-instruct-q8_0] Invalid function tool call: Missing name or arguments in function call..
Is what is going awry. So it seems like even when we do the parse, no tool call is found. The reason is that the real format from the response needs to be:
{ "name": "sql-list-tables", "arguments":{ "database_id": "odbc"}}
// You are getting this, which fails to parse.
{ "name": "sql-list-tables", "database_id": "odbc"}}
arguments
is missing from output. Closing for the moment, but we can continue to discuss on this thread.
Just experienced this after watching your youtube link and using this too :) Going to experiment with other models.
How are you running AnythingLLM?
Docker (local)
What happened?
i want use sql agent and llama3 8b instruct q8 and the llm model don't send back a good JSON.
the answer content only one key and not the key "name"
In the system prompt, there is never a complete example.
Can we have an access to modify the system prompt ?
Are there known steps to reproduce?
No response