From ebe8cc1dc756dbffa4041cb3c6ffc9d8033db1f3 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Thu, 28 Dec 2023 23:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmidjourney=E7=BB=98=E5=9B=BE?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/midjourney/[...path]/route.ts | 2 +- app/store/config.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/midjourney/[...path]/route.ts b/app/api/midjourney/[...path]/route.ts index ce40a8aa3..2adc39ae0 100644 --- a/app/api/midjourney/[...path]/route.ts +++ b/app/api/midjourney/[...path]/route.ts @@ -70,7 +70,7 @@ async function handle( }, cache: "no-store", method: req.method, - body: cloneBody, + body: cloneBody == "" ? null : cloneBody, signal: controller.signal, //@ts-ignore // duplex: "half", diff --git a/app/store/config.ts b/app/store/config.ts index 4a5e40c36..fbe4a360c 100644 --- a/app/store/config.ts +++ b/app/store/config.ts @@ -58,8 +58,8 @@ export const DEFAULT_CONFIG = { presence_penalty: 0, frequency_penalty: 0, sendMemory: true, - historyMessageCount: 4, - compressMessageLengthThreshold: 2000, + historyMessageCount: 5, + compressMessageLengthThreshold: 4000, enableInjectSystemPrompts: true, template: DEFAULT_INPUT_TEMPLATE, }, @@ -137,7 +137,7 @@ export const useAppConfig = createPersistStore( }), { name: StoreKey.Config, - version: 3.891, + version: 3.892, migrate(persistedState, version) { const state = persistedState as ChatConfig; @@ -168,7 +168,7 @@ export const useAppConfig = createPersistStore( if (version < 3.8) { state.lastUpdate = Date.now(); } - if (version < 3.891) { + if (version < 3.892) { state.lastUpdate = Date.now(); return { ...DEFAULT_CONFIG }; }