xiaoli-cli bot
|
3f7df28423
|
feat: 通用深度思考适配 - 原生API + 提示词兜底
原生支持 (API参数):
- DeepSeek/MiMo: enable_thinking + reasoning_effort
- OpenAI o-series: reasoning.effort
- Claude: thinking.type + budget_tokens (按等级分配2k/8k/32k)
- Grok: thinking.enabled
- Gemini thinking: 模型名自带
不支持原生的模型 (提示词注入):
- low: 无额外提示词
- medium: 逐步思考提示 (分析→因素→方案→选择)
- high: 工程级深度推理框架 (问题分解→多角度分析→方案设计→验证优化)
所有模型统一 /engine.openai think [on|off|low|medium|high] 控制
|
2026-06-23 09:59:08 +00:00 |
|
xiaoli-cli bot
|
75194a9da7
|
feat: OpenAI 引擎支持 MiMo 深度思考
MiMo 使用 DeepSeek 兼容格式:
- enable_thinking: true (v2.5-pro 默认开启)
- reasoning_content 返回思维链
- reasoning_effort: low/medium/high
|
2026-06-23 09:50:26 +00:00 |
|
xiaoli-cli bot
|
a6f6962184
|
feat: OpenAI 引擎支持深度思考开关
新增:
- /engine.openai think [on|off|low|medium|high] 命令
- deep_think 配置项 (config.json)
- reasoning_effort 参数 (low/medium/high)
支持模型:
- DeepSeek: enable_thinking + reasoning_content
- OpenAI o-series: reasoning.effort
- 通用: reasoning_effort 参数
深度思考开启后:
- 自动注入思考参数到请求体
- 返回的思维链(reasoning_content)显示在终端
- info 命令显示当前思考状态
|
2026-06-23 09:37:34 +00:00 |
|
shuiyu1123
|
6de5c6f202
|
feat: Function Calling 兼容
新增 xcli_core/fc_tools.py:
- MCP 定义 → OpenAI FC 格式转换
- FC 响应解析 (tool_calls 提取)
- 自动收集所有插件 FC 定义
- 400 错误自动降级为普通模式
引擎层改动 (openai_engine + ollama_engine):
- generate_response 新增 tools 参数
- 请求体自动注入 tools/tool_choice
- 响应检测 tool_calls 并返回 FC 标记
- 对话历史支持 tool 角色消息和 assistant.tool_calls
- _build_messages_with_history 兼容 FC 消息格式
cli_core.py 集成:
- _handle_fc_response: FC 响应 → 工具执行 → 结果回传
- _execute_tool_by_name: FC 调用路径的安全检查+工具分发
- process_conversation 循环自动处理 FC 工具调用
- TUI/CLI 双模式 FC 支持
|
2026-04-27 00:29:34 +08:00 |
|
xiaoli-cli
|
ea534c5b88
|
refactor: 移除所有非ollama引擎,新增OpenAI兼容格式引擎
- 删除: mimo_engine, GLM_http_engine, qwq_engine, xfyun_spark_engine, iflow_api_engine, maas_http_engine, SDK_openAI
- 保留: ollama_engine (本地Ollama引擎)
- 新增: openai_engine (通用OpenAI API兼容引擎,支持DeepSeek/Grok/硅基流动/vLLM等)
- 新增: config.json.example 配置模板
- 更新: README.md / README.en.md 引擎说明
|
2026-04-26 05:27:40 +08:00 |
|