From abf79bf60c1229dbd90006f86f59c6fac9fa5729 Mon Sep 17 00:00:00 2001 From: vision Date: Sat, 21 Dec 2024 17:24:32 +0800 Subject: [PATCH 1/2] add gitee-ai model resources that are compatible with openai format --- bot/chatgpt/chat_gpt_session.py | 2 +- common/const.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/chatgpt/chat_gpt_session.py b/bot/chatgpt/chat_gpt_session.py index 7adaa3e41..b5fc6fdf8 100644 --- a/bot/chatgpt/chat_gpt_session.py +++ b/bot/chatgpt/chat_gpt_session.py @@ -83,7 +83,7 @@ def num_tokens_from_messages(messages, model): tokens_per_message = 3 tokens_per_name = 1 else: - logger.warn(f"num_tokens_from_messages() is not implemented for model {model}. Returning num tokens assuming gpt-3.5-turbo.") + logger.debug(f"num_tokens_from_messages() is not implemented for model {model}. Returning num tokens assuming gpt-3.5-turbo.") return num_tokens_from_messages(messages, model="gpt-3.5-turbo") num_tokens = 0 for message in messages: diff --git a/common/const.py b/common/const.py index c002d01fe..0abd3be4c 100644 --- a/common/const.py +++ b/common/const.py @@ -82,6 +82,8 @@ CLAUDE_3_HAIKU = "claude-3-haiku-20240307" +GITEE_AI_MODEL_LIST = ["Yi-34B-Chat", "InternVL2-8B", "deepseek-coder-33B-instruct", "InternVL2.5-26B", "Qwen2-VL-72B", "Qwen2.5-32B-Instruct", "glm-4-9b-chat", "codegeex4-all-9b", "Qwen2.5-Coder-32B-Instruct", "Qwen2.5-72B-Instruct", "Qwen2.5-7B-Instruct", "Qwen2-72B-Instruct", "Qwen2-7B-Instruct", "code-raccoon-v1", "Qwen2.5-14B-Instruct"] + MODEL_LIST = [ GPT35, GPT35_0125, GPT35_1106, "gpt-3.5-turbo-16k", O1, O1_MINI, GPT_4o, GPT_4O_0806, GPT_4o_MINI, GPT4_TURBO, GPT4_TURBO_PREVIEW, GPT4_TURBO_01_25, GPT4_TURBO_11_06, GPT4, GPT4_32k, GPT4_06_13, GPT4_32k_06_13, @@ -96,6 +98,7 @@ LINKAI_35, LINKAI_4_TURBO, LINKAI_4o ] +MODEL_LIST = MODEL_LIST + GITEE_AI_MODEL_LIST # channel FEISHU = "feishu" DINGTALK = "dingtalk" From ef3c61a29793ee542eca8ec10b2720b095cdec57 Mon Sep 17 00:00:00 2001 From: vision Date: Tue, 24 Dec 2024 19:57:26 +0800 Subject: [PATCH 2/2] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf43a19b5..2d6c677ba 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ 最新版本支持的功能如下: - ✅ **多端部署:** 有多种部署方式可选择且功能完备,目前已支持微信公众号、企业微信应用、飞书、钉钉等部署方式 -- ✅ **基础对话:** 私聊及群聊的消息智能回复,支持多轮会话上下文记忆,支持 GPT-3.5, GPT-4o-mini, GPT-4o, GPT-4, Claude-3.5, Gemini, 文心一言, 讯飞星火, 通义千问,ChatGLM-4,Kimi(月之暗面), MiniMax +- ✅ **基础对话:** 私聊及群聊的消息智能回复,支持多轮会话上下文记忆,支持 GPT-3.5, GPT-4o-mini, GPT-4o, GPT-4, Claude-3.5, Gemini, 文心一言, 讯飞星火, 通义千问,ChatGLM-4,Kimi(月之暗面), MiniMax, GiteeAI - ✅ **语音能力:** 可识别语音消息,通过文字或语音回复,支持 azure, baidu, google, openai(whisper/tts) 等多种语音模型 - ✅ **图像能力:** 支持图片生成、图片识别、图生图(如照片修复),可选择 Dall-E-3, stable diffusion, replicate, midjourney, CogView-3, vision模型 - ✅ **丰富插件:** 支持个性化插件扩展,已实现多角色切换、文字冒险、敏感词过滤、聊天记录总结、文档总结和对话、联网搜索等插件