SuperAPI AI 工具集

local-llm-bridge

智能体与模型

查看项目

更新于 10-16 08:00

技能介绍

用途:把范围明确的小任务直接派发给本地运行的 Gemma 4 12B 模型,绕过携带大量系统提示的路由代理,从而降低延迟。任务通过 run_agent.py 路由器以 cli=llama 分发到 http://localhost:8089/v1/chat/completions。

主要能力:支持代码审查、重构建议、架构评审、diff 摘要、单条指令问答等有界任务;内置 agents/ 下的 persona(security-auditor.md、refactor-expert.md、architect-review.md);scripts/ 提供 run_agent.py、kv_cache_orchestrator.py、run_server.py、test_run_agent.py。默认 max_tokens=120,可用 --max-tokens 覆盖。

使用方式:先确保 llama-server 在 8089 端口运行,检查 curl http://localhost:8089/health,必要时执行 python ./scripts/run_server.py。调用示例:python ./scripts/run_agent.py <PERSONA_FILE> <INPUT_FILE> <OUTPUT_FILE> "<INSTRUCTION>" --cli llama --max-tokens 120。无输入文件时用 /dev/null。

适用场景:M1 Mac 16GB 等本地硬件上的轻量、短输出任务,如列出代码前三个问题、两句话总结 diff。

限制:需本地服务在线;服务端已关闭思考(--reasoning off);上下文 32768 tokens 单槽;提示应精简(persona 100–300 tokens、源文件尽量低于 2000 tokens、指令 1–3 句),避免粘贴完整文件树或长对话历史。routing_proxy.py 不包含在本技能执行路径中。其他收费、平台与效果信息暂未提供。