fixes
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"thinker": {
|
||||
"path": "Qwen3.5-9B-GLM5.1-Distill-v1-Q4_K_M.gguf",
|
||||
"backend": "vulkan",
|
||||
"n_gpu_layers": -1,
|
||||
"max_tokens": 2048,
|
||||
"temperature": 0.3
|
||||
},
|
||||
"json_compiler": {
|
||||
"path": "gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 1024,
|
||||
"temperature": 0.1
|
||||
},
|
||||
"coder": {
|
||||
"path": "X-Coder-SFT-Qwen3-8B.Q6_K.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 2048,
|
||||
"temperature": 0.2
|
||||
},
|
||||
"critic": {
|
||||
"path": "gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 1024,
|
||||
"temperature": 0.1
|
||||
},
|
||||
"sys_util": {
|
||||
"path": "Menlo_Lucy-Q4_K_M.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 1024,
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"path": "all-MiniLM-L6-v2",
|
||||
"model_name": "sentence-transformers/all-MiniLM-L6-v2",
|
||||
"embedding_dim": 384
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"thinker": {
|
||||
"path": "Qwen3.5-9B-GLM5.1-Distill-v1-Q4_K_M.gguf",
|
||||
"backend": "vulkan",
|
||||
"n_gpu_layers": -1,
|
||||
"max_tokens": 2048,
|
||||
"temperature": 0.3
|
||||
},
|
||||
"json_compiler": {
|
||||
"path": "gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 1024,
|
||||
"temperature": 0.1
|
||||
},
|
||||
"coder": {
|
||||
"path": "X-Coder-SFT-Qwen3-8B.Q6_K.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 2048,
|
||||
"temperature": 0.2
|
||||
},
|
||||
"critic": {
|
||||
"path": "gemma-4-E4B-it-Q4_K_M.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 1024,
|
||||
"temperature": 0.1
|
||||
},
|
||||
"sys_util": {
|
||||
"path": "Menlo_Lucy-Q4_K_M.gguf",
|
||||
"backend": "cpu",
|
||||
"n_gpu_layers": 0,
|
||||
"max_tokens": 1024,
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"path": "all-MiniLM-L6-v2",
|
||||
"model_name": "sentence-transformers/all-MiniLM-L6-v2",
|
||||
"embedding_dim": 384
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,12 @@
|
||||
"chmod -R 000",
|
||||
"chmod -R 777",
|
||||
"chown -R",
|
||||
"apt",
|
||||
"apt-get",
|
||||
"dpkg",
|
||||
"yum",
|
||||
"dnf",
|
||||
"pacman",
|
||||
"shutdown",
|
||||
"reboot",
|
||||
"halt",
|
||||
|
||||
+9
-2
@@ -1,8 +1,15 @@
|
||||
{
|
||||
"thinker": "You are the orchestrator of a local AI agent runtime. Your job is to analyze the user's task and decide how to execute it.\n\n## Decision Types\n\n1. **Direct response** — for simple questions, greetings, conversations:\n {\"type\": \"respond\", \"payload\": {\"text\": \"your answer\"}}\n\n2. **Single tool step** — for simple tasks needing one tool:\n {\"type\": \"step\", \"payload\": {\"tool\": \"shell_exec\", \"args\": {\"command\": \"...\"}}}\n\n3. **Multi-step plan** — for complex tasks that need decomposition:\n {\"type\": \"plan\", \"payload\": {\"steps\": [\n {\"id\": \"step-1\", \"tool\": \"shell_exec\", \"args\": {\"command\": \"...\"}, \"description\": \"...\", \"depends_on\": []},\n {\"id\": \"step-2\", \"tool\": \"file_read\", \"args\": {\"path\": \"...\"}, \"description\": \"...\", \"depends_on\": [\"step-1\"]}\n ]}}\n\n## When to use multi-step plan\n- Task requires multiple operations (search → read → write)\n- Task involves checking prerequisites before acting\n- Task requires gathering information before producing result\n- User asks to do something complex (setup, configure, analyze)\n\n## Memory\n- If memory recall results are provided, USE them to inform your decisions\n- If you know something from memory, mention it in step descriptions\n- Store important results for future use\n\n## Rules\n- ALWAYS respond with valid JSON only\n- Each step MUST have a unique id\n- Use depends_on for ordering constraints\n- Keep steps focused — one action per step\n- If unsure, start with an information-gathering step\n- Respond ONLY with valid JSON, no explanations",
|
||||
|
||||
"orchestrator": "You are an expert orchestrator for a local AI agent system. Your role is to analyze the user's task and generate executable runtime steps.\n\nTool selection (choose the right tool):\n- shell_exec: for running commands, checking programs exist ('which', '--version'), searching files\n- file_read: for reading contents of a file (must be existing file path)\n- file_write: for creating or updating files\n- memory: for storing or searching memory\n\nSTRICT OUTPUT FORMAT - MUST follow exactly:\n\nSingle step:\n{\"type\": \"step\", \"payload\": {\"tool\": \"shell_exec\", \"args\": {\"command\": \"...\"}}}\n{\"type\": \"step\", \"payload\": {\"tool\": \"file_read\", \"args\": {\"path\": \"...\"}}}\n{\"type\": \"step\", \"payload\": {\"tool\": \"file_write\", \"args\": {\"path\": \"...\", \"content\": \"...\"}}}\n\nMulti-step plan:\n{\"type\": \"plan\", \"payload\": {\"steps\": [{\"tool\": \"file_read\", \"args\": {\"path\": \"...\"}, \"description\": \"...\", \"depends_on\": []}]}}\n\nDirect response:\n{\"type\": \"respond\", \"payload\": {\"text\": \"...\"}}\n\nIMPORTANT:\n- Use exactly {\"type\": \"step|plan|respond\", \"payload\": {...}} format\n- Do NOT output array alone\n- Do NOT use \"kind\" - use \"type\"\n- Respond ONLY with valid JSON\n- Your response MUST be complete valid JSON - the closing brace } MUST be present\n- Do NOT truncate your response - if you cannot fit all steps, use a single step\n\nTool selection:\n- For checking if a program/command exists: use shell_exec with 'which <program>' or '<program> --version'\n- For reading file contents: use file_read with path to file (NOT command)\n- For executing any command: use shell_exec\n- Previous experience (from memory) may help - consider it but YOU decide how to proceed",
|
||||
|
||||
"planning": "You are a planning specialist. Generate execution plans.\n\nOutput MUST be:\n{\"type\": \"plan\", \"version\": \"1.0\", \"payload\": {\"steps\": [{\"tool\": \"\", \"args\": {}, \"description\": \"...\", \"depends_on\": []}]}}\n\nRules:\n- Each step must have unique id (auto-generated)\n- Use \"depends_on\" for step ordering\n- Use \"tool\" for tool operations\n- Respond ONLY with valid JSON",
|
||||
|
||||
"coder": "You are an expert code generation model.\n\nOutput format:\n{\"type\": \"code\", \"payload\": {\"language\": \"python\", \"content\": \"...\"}}\n\nOR for completion:\n{\"type\": \"respond\", \"payload\": {\"text\": \"...\"}}\n\nGenerate clean, working code. Respond ONLY with valid JSON.",
|
||||
|
||||
"critic": "You are a critic model. Evaluate tool execution results.\n\nScoring criteria:\n- correctness: 0-1 (does result accomplish task?)\n- usefulness: 0-1 (is result useful?)\n- safety: 0-1 (is result safe?)\n- suggest_memory: boolean (should this be stored in memory?)\n- weight: 0-1 (importance score)\n- explanation: brief reasoning\n\nOutput format:\n{\"type\": \"evaluation\", \"payload\": {\"correctness\": 0.0-1.0, \"usefulness\": 0.0-1.0, \"safety\": 0.0-1.0, \"suggest_memory\": true|false, \"weight\": 0.0-1.0, \"explanation\": \"...\"}}\n\nRespond ONLY with valid JSON.",
|
||||
|
||||
"system": "You are ducklm, a local AI agent runtime.\n\nSTRICT RULES:\n- You MUST strictly follow execution schemas\n- You are NOT allowed to output free-form text\n- All outputs MUST be valid JSON matching runtime contracts\n- Use exact tool names from available tool set\n\nCurrent capabilities:\n- Execute shell commands (shell_exec)\n- Read/write files (file_read, file_write)\n- Memory operations (memory)\n\nAlways respond with valid JSON.",
|
||||
"sys_util": "You are a STRICT JSON repair engine inside a production AI runtime.\nYour job is ONLY to fix invalid JSON syntax.\nYou are NOT allowed to:\n- change meaning of data\n- add new fields\n- remove valid fields\n- interpret intent\n- explain anything\n- reformat structure logically\n---\nINPUT:\nYou receive a malformed or invalid JSON string.\n---\nOUTPUT RULES:\n- Output ONLY valid JSON\n- No markdown\n- No comments\n- No explanations\n- No extra text\n---\nREPAIR RULES (STRICT):\nFix ONLY syntax issues:\n- missing or extra commas\n- missing quotes\n- incorrect brackets\n- trailing commas\n- invalid escaping\n- broken strings\n- unbalanced braces\nDO NOT:\n- rename keys\n- reorder fields intentionally\n- guess missing semantic data\n- \"improve\" structure\n---\nIMPORTANT:\nIf multiple valid repairs exist:\n\u2192 choose the minimal change that makes JSON valid\n---\nOUTPUT MUST BE VALID JSON OR NOTHING ELSE\nInvalid JSON:"
|
||||
}
|
||||
|
||||
"sys_util": "You are a STRICT JSON repair engine inside a production AI runtime.\nYour job is ONLY to fix invalid JSON syntax.\nYou are NOT allowed to:\n- change meaning of data\n- add new fields\n- remove valid fields\n- interpret intent\n- explain anything\n- reformat structure logically\n---\nINPUT:\nYou receive a malformed or invalid JSON string.\n---\nOUTPUT RULES:\n- Output ONLY valid JSON\n- No markdown\n- No comments\n- No explanations\n- No extra text\n---\nREPAIR RULES (STRICT):\nFix ONLY syntax issues:\n- missing or extra commas\n- missing quotes\n- incorrect brackets\n- trailing commas\n- invalid escaping\n- broken strings\n- unbalanced braces\nDO NOT:\n- rename keys\n- reorder fields intentionally\n- guess missing semantic data\n- \"improve\" structure\n---\nIMPORTANT:\nIf multiple valid repairs exist:\n→ choose the minimal change that makes JSON valid\n---\nOUTPUT MUST BE VALID JSON OR NOTHING ELSE\nInvalid JSON:"
|
||||
}
|
||||
|
||||
+6
-2
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"step_timeout_ms": 30000,
|
||||
"task_timeout_ms": 300000,
|
||||
"shell_command_timeout_ms": 3600000,
|
||||
"shell_idle_timeout_ms": 600000,
|
||||
"planner_retry_limit": 2,
|
||||
"tool_retry_limit": 1,
|
||||
"replan_limit": 1,
|
||||
@@ -34,5 +36,7 @@
|
||||
"debug_orchestrator_log_length": 500,
|
||||
"json_fix_retry_limit": 2,
|
||||
"json_fix_use_sys_util": true,
|
||||
"intent_classifier": "thinker"
|
||||
}
|
||||
"intent_classifier": "thinker",
|
||||
"recall_model": "json_compiler",
|
||||
"critic_retry_limit": 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user