From 2361ab74f7299c02a2b03eb9e68cb1e28de8d60d Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 24 Apr 2025 18:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/default.json | 25 +++++++++---------------- constants/aiModels.js | 28 ++++++++++++++++++++++++++++ models/ollama/ollamaChat.js | 2 +- 3 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 constants/aiModels.js diff --git a/config/default.json b/config/default.json index fde452b..f3eebb5 100644 --- a/config/default.json +++ b/config/default.json @@ -2,21 +2,11 @@ "debug": true, "core": true, "mode": "deepseek", - "model_type": "deepseek-ai/DeepSeek-V3", - "model_list": { - "deepseek-ai/DeepSeek-V3": "V3", - "deepseek-ai/DeepSeek-R1": "R1", - "deepseek-ai/DeepSeek-R1-Distill-Llama-8B": "L8b", - "Qwen/Qwen2.5-7B-Instruct": "Q7b", - "internlm/internlm2_5-7b-chat": "I7b", - "THUDM/glm-4-9b-chat": "G9b", - "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B": "Q14b", - "deepseek-ai/DeepSeek-R1-Distill-Llama-70B": "L70b", - "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B": "Q32b" - }, - "default_history_length": 3, - "default_max_length": 3, - "default_temperature": 1, + "modelType": "deepseek-ai/DeepSeek-V3", + "historyLength": 3, + "maxLength": 3, + "chatTemperature": 1, + "pluginTemperature": 0.5, "nickName": "寄气人", "checkChat": { "rdNum": 2, @@ -27,7 +17,10 @@ "blackGroups": [ 114, 514 + ], + "enableGroups": [ + 11115 ] }, - "max_message_length": 100 + "maxMessageLength": 100 } \ No newline at end of file diff --git a/constants/aiModels.js b/constants/aiModels.js new file mode 100644 index 0000000..544e947 --- /dev/null +++ b/constants/aiModels.js @@ -0,0 +1,28 @@ +const aiModels = { + openai: { + gpt3: 'text-davinci-003', + gpt4: 'gpt-4', + gpt35_turbo: 'gpt-3.5-turbo', + }, + + deepseek: { + r1: 'deepseek-ai/DeepSeek-R1', + v3: 'deepseek-ai/DeepSeek-V3', + r1_distill_Qwen_32b: 'deepseek-ai/DeepSeek-R1-Distill-Qwen-32B', //1.26 + r1_distill_Qwen_14b: 'deepseek-ai/DeepSeek-R1-Distill-Qwen-14B', //0.7 + }, + + THUDM: { + GLM4_32b: 'THUDM/GLM-4-32B-0414', // 1.89/M tokens + GLMZ1_32b: 'THUDM/GLM-Z1-32B-0414', // 4/M tokens + GLM4_9b: 'THUDM/GLM-4-9B-0414', //free + }, + + Qwen: { + Qwen25VL_32b: 'Qwen/Qwen2.5-VL-32B-Instruct', // 视觉 + QwenQ_32b: 'Qwen/QwQ-32B', //4/M tokens + Qwen25_72b: 'Qwen/Qwen2.5-72B-Instruct-128K', //4.13 + }, +}; + +export default aiModels; diff --git a/models/ollama/ollamaChat.js b/models/ollama/ollamaChat.js index 252bab9..972163e 100644 --- a/models/ollama/ollamaChat.js +++ b/models/ollama/ollamaChat.js @@ -45,7 +45,7 @@ class OllamaChat { }, }); - const aiResponse = response.data?.choices[o]?.text || ''; + const aiResponse = response.data?.choices[0]?.text || ''; return { success: true,