From e98a93c943fd53af936c70aaf31177fdb6b389c5 Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Mon, 14 Oct 2024 08:47:44 +0000 Subject: [PATCH] =?UTF-8?q?feat(model):=20=E5=88=87=E6=8D=A2=E8=87=B3?= =?UTF-8?q?=E5=B0=8F=E7=B1=B3=E5=86=85=E9=83=A8=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 1 + constant/card.ts | 2 +- routes/bot/groupAgent/index.ts | 4 +++- test/llm.ts | 2 +- utils/llm.ts | 6 ++++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a61e337..c9ef5af 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,7 @@ "Euqi", "groupchat", "Gruntfuggly", + "instuct", "langchain", "langfuse", "metas", diff --git a/constant/card.ts b/constant/card.ts index 1606d2b..cd36014 100644 --- a/constant/card.ts +++ b/constant/card.ts @@ -122,7 +122,7 @@ const resultReport = { }, cardComponent.commonNote, ], - header: cardComponent.pendingHeader, + header: cardComponent.successHeader, } const cardMap = { diff --git a/routes/bot/groupAgent/index.ts b/routes/bot/groupAgent/index.ts index 90c03c6..ac4a94c 100644 --- a/routes/bot/groupAgent/index.ts +++ b/routes/bot/groupAgent/index.ts @@ -46,7 +46,9 @@ const sendFunctionSelector = async ({ return cardGender.genErrorCard("Invalid targetChatId or targetChatName") } return cardGender.genCard("functionSelector", { - functions: genCardOptions({ 总结消息: "summary-gpt-4o|总结消息" }), + functions: genCardOptions({ + 总结消息: "summary-qwen-72b-instruct-int4|总结消息", + }), chatId, chatName, }) diff --git a/test/llm.ts b/test/llm.ts index 32bab21..4e4330b 100644 --- a/test/llm.ts +++ b/test/llm.ts @@ -13,7 +13,7 @@ const chatHistory = [ }, ] -const res = await llm.invoke("summary-gpt-4o", { +const res = await llm.invoke("summary-qwen-72b-instruct-int4", { chatHistory: JSON.stringify(chatHistory), time: new Date().toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" }), }) diff --git a/utils/llm.ts b/utils/llm.ts index 0dea775..6516b4b 100644 --- a/utils/llm.ts +++ b/utils/llm.ts @@ -37,6 +37,12 @@ const modelMap = { apiKey: "sk-EhbBTR0QjhH22iLr9aCb04D2B0F44f88A07c2924Eb54CfA4", baseURL: "https://api.gpt.ge/v1", }, + "qwen-72b-instruct-int4/v1": { + model: "qwen-72b-instruct-int4/v1", + apiKey: "xx", + baseURL: + "http://ms-13871-qwen-model-128k-9-1012195754.kscn-tj5-prod2-cloudml.xiaomi.srv/v1", + }, } /**