From f620874251ba6bc98d92e403eb9806ea38122229 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Sun, 23 Feb 2025 22:52:50 +0800 Subject: [PATCH] chore: rename volcengine to volcark --- README.md | 1 + README_EN.md | 1 + README_JP.md | 1 + ...032_volcengine_config.py => m032_volcark_config.py} | 10 +++++----- pkg/core/stages/migrate.py | 2 +- pkg/provider/modelmgr/modelmgr.py | 2 +- .../{volcenginechatcmpl.py => volcarkchatcmpl.py} | 6 +++--- templates/provider.json | 4 ++-- templates/schema/provider.json | 4 ++-- 9 files changed, 17 insertions(+), 14 deletions(-) rename pkg/core/migrations/{m032_volcengine_config.py => m032_volcark_config.py} (56%) rename pkg/provider/modelmgr/requesters/{volcenginechatcmpl.py => volcarkchatcmpl.py} (70%) diff --git a/README.md b/README.md index 2052c59d..a2e47147 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ | [GiteeAI](https://ai.gitee.com/) | ✅ | 大模型接口聚合平台 | | [SiliconFlow](https://siliconflow.cn/) | ✅ | 大模型聚合平台 | | [阿里云百炼](https://bailian.console.aliyun.com/) | ✅ | 大模型聚合平台, LLMOps 平台 | +| [火山方舟](https://console.volcark.com/ark/region:ark+cn-beijing/model?vendor=Bytedance&view=LIST_VIEW) | ✅ | 大模型聚合平台, LLMOps 平台 | ## 😘 社区贡献 diff --git a/README_EN.md b/README_EN.md index 740d4daa..5bd30591 100644 --- a/README_EN.md +++ b/README_EN.md @@ -110,6 +110,7 @@ Directly use the released version to run, see the [Manual Deployment](https://do | [GiteeAI](https://ai.gitee.com/) | ✅ | LLM interface gateway(MaaS) | | [SiliconFlow](https://siliconflow.cn/) | ✅ | LLM gateway(MaaS) | | [Aliyun Bailian](https://bailian.console.aliyun.com/) | ✅ | LLM gateway(MaaS), LLMOps platform | +| [Volc Engine Ark](https://console.volcark.com/ark/region:ark+cn-beijing/model?vendor=Bytedance&view=LIST_VIEW) | ✅ | LLM gateway(MaaS), LLMOps platform | ## 🤝 Community Contribution diff --git a/README_JP.md b/README_JP.md index 7453c1f3..3e677e80 100644 --- a/README_JP.md +++ b/README_JP.md @@ -109,6 +109,7 @@ LangBotはBTPanelにリストされています。BTPanelをインストール | [GiteeAI](https://ai.gitee.com/) | ✅ | LLMインターフェースゲートウェイ(MaaS) | | [SiliconFlow](https://siliconflow.cn/) | ✅ | LLMゲートウェイ(MaaS) | | [Aliyun Bailian](https://bailian.console.aliyun.com/) | ✅ | LLMゲートウェイ(MaaS), LLMOpsプラットフォーム | +| [Volc Engine Ark](https://console.volcark.com/ark/region:ark+cn-beijing/model?vendor=Bytedance&view=LIST_VIEW) | ✅ | LLMゲートウェイ(MaaS), LLMOpsプラットフォーム | ## 🤝 コミュニティ貢献 diff --git a/pkg/core/migrations/m032_volcengine_config.py b/pkg/core/migrations/m032_volcark_config.py similarity index 56% rename from pkg/core/migrations/m032_volcengine_config.py rename to pkg/core/migrations/m032_volcark_config.py index cb641f7c..a07e5686 100644 --- a/pkg/core/migrations/m032_volcengine_config.py +++ b/pkg/core/migrations/m032_volcark_config.py @@ -3,22 +3,22 @@ from __future__ import annotations from .. import migration -@migration.migration_class("volcengine-requester-config", 32) -class VolcengineRequesterConfigMigration(migration.Migration): +@migration.migration_class("volcark-requester-config", 32) +class VolcArkRequesterConfigMigration(migration.Migration): """迁移""" async def need_migrate(self) -> bool: """判断当前环境是否需要运行此迁移""" - return 'volcengine-chat-completions' not in self.ap.provider_cfg.data['requester'] + return 'volcark-chat-completions' not in self.ap.provider_cfg.data['requester'] async def run(self): """执行迁移""" - self.ap.provider_cfg.data['keys']['volcengine'] = [ + self.ap.provider_cfg.data['keys']['volcark'] = [ "xxxxxxxx" ] - self.ap.provider_cfg.data['requester']['volcengine-chat-completions'] = { + self.ap.provider_cfg.data['requester']['volcark-chat-completions'] = { "base-url": "https://ark.cn-beijing.volces.com/api/v3", "args": {}, "timeout": 120 diff --git a/pkg/core/stages/migrate.py b/pkg/core/stages/migrate.py index aade7755..3e66e589 100644 --- a/pkg/core/stages/migrate.py +++ b/pkg/core/stages/migrate.py @@ -10,7 +10,7 @@ from ..migrations import m010_ollama_requester_config, m011_command_prefix_confi from ..migrations import m015_gitee_ai_config, m016_dify_service_api, m017_dify_api_timeout_params, m018_xai_config, m019_zhipuai_config from ..migrations import m020_wecom_config, m021_lark_config, m022_lmstudio_config, m023_siliconflow_config, m024_discord_config, m025_gewechat_config from ..migrations import m026_qqofficial_config, m027_wx_official_account_config, m028_aliyun_requester_config -from ..migrations import m029_dashscope_app_api_config, m030_lark_config_cmpl, m031_dingtalk_config, m032_volcengine_config +from ..migrations import m029_dashscope_app_api_config, m030_lark_config_cmpl, m031_dingtalk_config, m032_volcark_config @stage.stage_class("MigrationStage") diff --git a/pkg/provider/modelmgr/modelmgr.py b/pkg/provider/modelmgr/modelmgr.py index 2b4c651e..7aa6b99f 100644 --- a/pkg/provider/modelmgr/modelmgr.py +++ b/pkg/provider/modelmgr/modelmgr.py @@ -6,7 +6,7 @@ from . import entities, requester from ...core import app from . import token -from .requesters import bailianchatcmpl, chatcmpl, anthropicmsgs, moonshotchatcmpl, deepseekchatcmpl, ollamachat, giteeaichatcmpl, xaichatcmpl, zhipuaichatcmpl, lmstudiochatcmpl, siliconflowchatcmpl, volcenginechatcmpl +from .requesters import bailianchatcmpl, chatcmpl, anthropicmsgs, moonshotchatcmpl, deepseekchatcmpl, ollamachat, giteeaichatcmpl, volcarkchatcmpl, xaichatcmpl, zhipuaichatcmpl, lmstudiochatcmpl, siliconflowchatcmpl, volcarkchatcmpl FETCH_MODEL_LIST_URL = "https://api.qchatgpt.rockchin.top/api/v2/fetch/model_list" diff --git a/pkg/provider/modelmgr/requesters/volcenginechatcmpl.py b/pkg/provider/modelmgr/requesters/volcarkchatcmpl.py similarity index 70% rename from pkg/provider/modelmgr/requesters/volcenginechatcmpl.py rename to pkg/provider/modelmgr/requesters/volcarkchatcmpl.py index a0b8c807..d0c13eaf 100644 --- a/pkg/provider/modelmgr/requesters/volcenginechatcmpl.py +++ b/pkg/provider/modelmgr/requesters/volcarkchatcmpl.py @@ -7,8 +7,8 @@ from .. import requester from ....core import app -@requester.requester_class("volcengine-chat-completions") -class VolcengineChatCompletions(chatcmpl.OpenAIChatCompletions): +@requester.requester_class("volcark-chat-completions") +class VolcArkChatCompletions(chatcmpl.OpenAIChatCompletions): """火山方舟大模型平台 ChatCompletion API 请求器""" client: openai.AsyncClient @@ -18,4 +18,4 @@ class VolcengineChatCompletions(chatcmpl.OpenAIChatCompletions): def __init__(self, ap: app.Application): self.ap = ap - self.requester_cfg = self.ap.provider_cfg.data['requester']['volcengine-chat-completions'] + self.requester_cfg = self.ap.provider_cfg.data['requester']['volcark-chat-completions'] diff --git a/templates/provider.json b/templates/provider.json index 34a7884d..cceb3b68 100644 --- a/templates/provider.json +++ b/templates/provider.json @@ -29,7 +29,7 @@ "bailian": [ "sk-xxxxxxx" ], - "volcengine": [ + "volcark": [ "xxxxxxxx" ] }, @@ -91,7 +91,7 @@ "base-url": "https://dashscope.aliyuncs.com/compatible-mode/v1", "timeout": 120 }, - "volcengine-chat-completions": { + "volcark-chat-completions": { "args": {}, "base-url": "https://ark.cn-beijing.volces.com/api/v3", "timeout": 120 diff --git a/templates/schema/provider.json b/templates/schema/provider.json index 9a9e2822..ae799b2c 100644 --- a/templates/schema/provider.json +++ b/templates/schema/provider.json @@ -91,7 +91,7 @@ }, "default": [] }, - "volcengine": { + "volcark": { "type": "array", "title": "火山引擎大模型平台 API 密钥", "items": { @@ -325,7 +325,7 @@ } } }, - "volcengine-chat-completions": { + "volcark-chat-completions": { "type": "object", "title": "火山方舟大模型平台 API 请求配置", "description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",