From 474570c1a7098dc50fcf5aa00a2852d98c84424d Mon Sep 17 00:00:00 2001 From: ivamp Date: Wed, 18 Sep 2024 22:02:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E8=AF=9D=E8=AF=AD?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E6=80=A7=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/swagger.yaml | 28 +++++++++++++++++++ src/components/settings/AssistantSettings.vue | 17 +++++++++-- src/config/config.ts | 2 +- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 3245f9f..e19f701 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -20,6 +20,8 @@ definitions: type: string prompt: type: string + temperature: + type: number updated_at: type: string user_id: @@ -297,6 +299,19 @@ definitions: prompt: maxLength: 512 type: string + temperature: + enum: + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 1 + type: number required: - description - name @@ -336,6 +351,19 @@ definitions: prompt: maxLength: 512 type: string + temperature: + enum: + - 0.1 + - 0.2 + - 0.3 + - 0.4 + - 0.5 + - 0.6 + - 0.7 + - 0.8 + - 0.9 + - 1 + type: number type: object schema.ChatCreateRequest: properties: diff --git a/src/components/settings/AssistantSettings.vue b/src/components/settings/AssistantSettings.vue index 16134c6..ea9e652 100644 --- a/src/components/settings/AssistantSettings.vue +++ b/src/components/settings/AssistantSettings.vue @@ -109,6 +109,18 @@ 允许助理 API 读取记忆 + +
+ 话语随机性 (Temperature) + +
+ + @@ -157,8 +169,9 @@ Completion API。 - 我们的 API 端点是:{{ config.backend }}/api/openai-compatible/v1 - 。密钥为下方的 API Key。 + 我们的 API 端点是:{{ + config.backend + }}/api/openai-compatible/v1 。密钥为下方的 API Key。 diff --git a/src/config/config.ts b/src/config/config.ts index a601ecf..d2c8e61 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -16,7 +16,7 @@ if (process.env.NODE_ENV === "production") { config.oauth_client_id = "16"; } -config.backend = "https://amber-api.leaflow.cn"; +// config.backend = "https://amber-api.leaflow.cn"; // console.log("api endpoint: " + config.backend);