diff --git a/docs/PERMISSION_SYSTEM.md b/docs/architecture/PERMISSION_SYSTEM.md similarity index 100% rename from docs/PERMISSION_SYSTEM.md rename to docs/architecture/PERMISSION_SYSTEM.md diff --git a/docs/memory_system_design_v3.md b/docs/architecture/memory_system_design_v3.md similarity index 100% rename from docs/memory_system_design_v3.md rename to docs/architecture/memory_system_design_v3.md diff --git a/docs/plugins/image/quick-start/1750326700269.png b/docs/assets/1750326700269.png similarity index 100% rename from docs/plugins/image/quick-start/1750326700269.png rename to docs/assets/1750326700269.png diff --git a/docs/plugins/image/quick-start/1750332508760.png b/docs/assets/1750332508760.png similarity index 100% rename from docs/plugins/image/quick-start/1750332508760.png rename to docs/assets/1750332508760.png diff --git a/docs/image-1.png b/docs/assets/image-1.png similarity index 100% rename from docs/image-1.png rename to docs/assets/image-1.png diff --git a/docs/image.png b/docs/assets/image.png similarity index 100% rename from docs/image.png rename to docs/assets/image.png diff --git a/docs/CONTRIBUTE.md b/docs/development/CONTRIBUTE.md similarity index 100% rename from docs/CONTRIBUTE.md rename to docs/development/CONTRIBUTE.md diff --git a/docs/model_configuration_guide.md b/docs/guides/model_configuration_guide.md similarity index 94% rename from docs/model_configuration_guide.md rename to docs/guides/model_configuration_guide.md index 2753e92bd..e2df27d74 100644 --- a/docs/model_configuration_guide.md +++ b/docs/guides/model_configuration_guide.md @@ -43,12 +43,11 @@ retry_interval = 10 # 重试间隔(秒) | `name` | ✅ | 服务商名称,需要在模型配置中引用 | - | | `base_url` | ✅ | API服务的基础URL | - | | `api_key` | ✅ | API密钥,请替换为实际密钥 | - | -| `client_type` | ❌ | 客户端类型:`openai`(OpenAI格式)或 `gemini`(Gemini格式,现在支持不良好) | `openai` | +| `client_type` | ❌ | 客户端类型:`openai`(OpenAI格式)或 `aiohttp_gemini`(至少现在支持良好) | `openai` | | `max_retry` | ❌ | API调用失败时的最大重试次数 | 2 | | `timeout` | ❌ | API请求超时时间(秒) | 30 | | `retry_interval` | ❌ | 重试间隔时间(秒) | 10 | -**请注意,对于`client_type`为`gemini`的模型,`base_url`字段无效。** ### 2.3 支持的服务商示例 #### DeepSeek @@ -73,9 +72,9 @@ client_type = "openai" ```toml [[api_providers]] name = "Google" -base_url = "https://api.google.com/v1" +base_url = "https://api.google.com/v1" #在MoFox-Bot中, 使用aiohttp_gemini客户端的提供商可以自定义base_url api_key = "your-google-api-key" -client_type = "gemini" # 注意:Gemini需要使用特殊客户端 +client_type = "aiohttp_gemini" # 注意:Gemini需要使用特殊客户端 ``` ## 3. 模型配置 @@ -118,11 +117,11 @@ enable_thinking = false # 禁用思考 比如上面就是参考SiliconFlow的文档配置配置的`Qwen3`禁用思考参数。 -![SiliconFlow文档截图](image-1.png) +![SiliconFlow文档截图](../assets/image-1.png) 以豆包文档为另一个例子 -![豆包文档截图](image.png) +![豆包文档截图](../assets/image.png) 得到豆包`"doubao-seed-1-6-250615"`的禁用思考配置方法为 ```toml @@ -276,7 +275,7 @@ max_tokens = 800 | 任务类型 | 推荐模型类型 | 示例 | |----------|--------------|------| -| 高精度任务 | 大模型 | DeepSeek-V3, GPT-4 | +| 高精度任务 | 大模型 | DeepSeek-V3, GPT-5,Gemini-2.5-Pro | | 高频率任务 | 小模型 | Qwen3-8B | | 多模态任务 | 专用模型 | Qwen2.5-VL, SenseVoice | | 工具调用 | 支持Function Call的模型 | Qwen3-14B | @@ -285,7 +284,6 @@ max_tokens = 800 1. **分层使用**:核心功能使用高质量模型,辅助功能使用经济模型 2. **合理配置max_tokens**:根据实际需求设置,避免浪费 -3. **选择免费模型**:对于测试环境,优先使用price为0的模型 ## 6. 配置验证 diff --git a/docs/vector_db_usage_guide.md b/docs/guides/vector_db_usage_guide.md similarity index 100% rename from docs/vector_db_usage_guide.md rename to docs/guides/vector_db_usage_guide.md diff --git a/docs/Bing.md b/docs/integrations/Bing.md similarity index 100% rename from docs/Bing.md rename to docs/integrations/Bing.md diff --git a/docs/plugins/quick-start.md b/docs/plugins/quick-start.md index 34431f80b..ff32a43eb 100644 --- a/docs/plugins/quick-start.md +++ b/docs/plugins/quick-start.md @@ -90,7 +90,7 @@ class HelloWorldPlugin(BasePlugin): 在日志中你应该能看到插件被加载的信息。虽然插件还没有任何功能,但它已经成功运行了! -![1750326700269](image/quick-start/1750326700269.png) +![1750326700269](../assets/1750326700269.png) ### 5. 添加第一个功能:问候Action @@ -180,7 +180,7 @@ MoFox_Bot可能会选择使用你的问候Action,发送回复: 嗨!很开心见到你!😊 ``` -![1750332508760](image/quick-start/1750332508760.png) +![1750332508760](../assets/1750332508760.png) > **💡 小提示**:MoFox_Bot会智能地决定什么时候使用它。如果没有立即看到效果,多试几次不同的消息。 diff --git a/src/plugin_system/core/tool_use.py b/src/plugin_system/core/tool_use.py index 098337ec2..180085f6d 100644 --- a/src/plugin_system/core/tool_use.py +++ b/src/plugin_system/core/tool_use.py @@ -244,13 +244,14 @@ class ToolExecutor: function_name = tool_call.func_name function_args = tool_call.args or {} logger.info(f"{self.log_prefix} 正在执行工具: [bold green]{function_name}[/bold green] | 参数: {function_args}") - function_args["llm_called"] = True - + function_args["llm_called"] = True # 标记为LLM调用 + # 获取对应工具实例 tool_instance = tool_instance or get_tool_instance(function_name) if not tool_instance: logger.warning(f"未知工具名称: {function_name}") return None + # 执行工具并记录日志 logger.debug(f"{self.log_prefix}执行工具 {function_name},参数: {function_args}") result = await tool_instance.execute(function_args) if result: