From 7cf55d0d611af57a02f49c94c848ecad9dce9669 Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Sun, 30 Nov 2025 11:07:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E5=AE=8C=E5=96=84=20Gemini=20?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=85=8D=E7=BD=AE=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 Google API 的 `base_url` 更新为正确的 `v1beta` 端点。 - 新增了 Gemini 模型的完整配置示例,方便用户参考。 - 在示例中包含了新的 `thinking_level` 和 `thinking_budget` 参数,并附有使用说明。 - 修正了注释中的拼写错误 (Gimini -> Gemini)。 --- template/model_config_template.toml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/template/model_config_template.toml b/template/model_config_template.toml index 059cce89d..fc0fea76b 100644 --- a/template/model_config_template.toml +++ b/template/model_config_template.toml @@ -1,5 +1,5 @@ [inner] -version = "1.4.0" +version = "1.4.1" # 配置文件版本号迭代规则同bot_config.toml @@ -21,9 +21,9 @@ max_retry = 2 timeout = 30 retry_interval = 10 -[[api_providers]] # 特殊:Google的Gimini使用特殊API,与OpenAI格式不兼容,需要配置client为"aiohttp_gemini" +[[api_providers]] # 特殊:Google的Gemini使用特殊API,与OpenAI格式不兼容,需要配置client为"aiohttp_gemini" name = "Google" -base_url = "https://api.google.com/v1" +base_url = "https://generativelanguage.googleapis.com/v1beta" api_key = ["your-google-api-key-1", "your-google-api-key-2"] client_type = "aiohttp_gemini" # 官方的gemini客户端现在已经死了 max_retry = 2 @@ -112,6 +112,17 @@ api_provider = "SiliconFlow" price_in = 4.0 price_out = 16.0 +[[models]] # Gemini 模型配置示例 +model_identifier = "gemini-2.5-pro" # 或使用 "gemini-2.5-pro", "gemini-3-pro-preview" 等 +name = "gemini-2.5-pro" +api_provider = "Google" +price_in = 0.0 +price_out = 0.0 +[models.extra_params] +# 思考配置(二选一,不能同时使用,否则会返回 400 错误): +#thinking_level = "medium" # Gemini3新版参数,可选值: "low", "medium", "high" +thinking_budget = 256 # Gemini2.5系列旧版参数,不同模型范围不同(如 gemini-2.5-flash: 1-24576, gemini-2.5-pro: 128-32768) + [model_task_config.utils] # 在麦麦的一些组件中使用的模型,例如表情包模块,取名模块,关系模块,是麦麦必须的模型 model_list = ["siliconflow-deepseek-ai/DeepSeek-V3.2-Exp"] # 使用的模型列表,每个子项对应上面的模型名称(name) temperature = 0.2 # 模型温度,新V3建议0.1-0.3