From 7b388b287ac3d5eaee7be92e59b434eaf124e76c Mon Sep 17 00:00:00 2001 From: Coder-Wjt <33034805+Coder-Wjt@users.noreply.github.com> Date: Wed, 7 Aug 2024 18:05:41 +0800 Subject: [PATCH] Adjust the parameters of gpt-40-mini model, custom for QA mode Add chunkSize setting input (#2139) * Adjust the parameters of gpt-40-mini model, custom for QA mode Add chunkSize setting input * Adjust the parameters of gpt-40-mini model --- projects/app/data/config.json | 2 +- .../pages/dataset/detail/components/Import/Context.tsx | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/app/data/config.json b/projects/app/data/config.json index a945ac402db8..fcba250ebb8a 100644 --- a/projects/app/data/config.json +++ b/projects/app/data/config.json @@ -14,7 +14,7 @@ "name": "gpt-4o-mini", // 模型别名 "avatar": "/imgs/model/openai.svg", // 模型的logo "maxContext": 125000, // 最大上下文 - "maxResponse": 4000, // 最大回复 + "maxResponse": 16000, // 最大回复 "quoteMaxToken": 120000, // 最大引用内容 "maxTemperature": 1.2, // 最大温度 "charsPointsPrice": 0, // n积分/1k token(商业版) diff --git a/projects/app/src/pages/dataset/detail/components/Import/Context.tsx b/projects/app/src/pages/dataset/detail/components/Import/Context.tsx index 44c7a70f315d..602d18346091 100644 --- a/projects/app/src/pages/dataset/detail/components/Import/Context.tsx +++ b/projects/app/src/pages/dataset/detail/components/Import/Context.tsx @@ -201,12 +201,13 @@ const DatasetImportContextProvider = ({ children }: { children: React.ReactNode uploadRate: 150 }, [TrainingModeEnum.qa]: { + chunkSizeField: 'embeddingChunkSize' as ChunkSizeFieldType, chunkOverlapRatio: 0, - maxChunkSize: 8000, - minChunkSize: 3000, + maxChunkSize: 4096, + minChunkSize: 512, autoChunkSize: agentModel.maxContext * 0.55 || 6000, - chunkSize: agentModel.maxContext * 0.55 || 6000, - showChunkInput: false, + chunkSize: embeddingChunkSize || agentModel.maxContext * 0.55 || 6000, + showChunkInput: true, showPromptInput: true, charsPointsPrice: agentModel.charsPointsPrice, priceTip: t('core.dataset.import.QA Estimated Price Tips', {