From 1b1b3dd322a5f310d5dcdaa156cd09c4159c7574 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Wed, 27 Mar 2024 10:43:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=8C=87=E5=AE=9A=E7=BB=98?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E6=99=BA=E8=83=BD=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/controllers/chat.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/api/controllers/chat.ts b/src/api/controllers/chat.ts index 6ca82e5..b29fec6 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -369,21 +369,19 @@ async function createCompletionStream( } async function generateImages( - model = MODEL_NAME, + model = '65a232c082ff90a2ad2f15e2', prompt: string, refreshToken: string, retryCount = 0 ) { return (async () => { const messages = [{ role: "user", content: prompt }]; - // 官方AI绘图的智能体ID - const assistantId = "65a232c082ff90a2ad2f15e2"; // 请求流 const token = await acquireToken(refreshToken); const result = await axios.post( "https://chatglm.cn/chatglm/backend-api/assistant/stream", { - assistant_id: assistantId, + assistant_id: model, conversation_id: "", messages: messagesPrepare(messages, []), meta_data: {