From 95724845cf7429b3ba3df43a7e862d0ebecca5bd Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Fri, 17 Mar 2023 09:36:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20session=20=E8=BF=94=E5=9B=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=B9=E5=BC=8F=E5=81=9A=E6=98=BE=E7=A4=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/src/index.ts | 4 ++-- src/components/common/Setting/About.vue | 15 ++++++++++++--- src/store/modules/auth/index.ts | 15 +++++++++++++-- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/service/src/index.ts b/service/src/index.ts index a14b843..467c2b3 100644 --- a/service/src/index.ts +++ b/service/src/index.ts @@ -1,6 +1,6 @@ import express from 'express' import type { ChatContext, ChatMessage } from './chatgpt' -import { chatConfig, chatReplyProcess } from './chatgpt' +import { chatConfig, chatReplyProcess, currentModel } from './chatgpt' import { auth } from './middleware/auth' import { isNotEmptyString } from './utils/is' @@ -50,7 +50,7 @@ router.post('/session', async (req, res) => { try { const AUTH_SECRET_KEY = process.env.AUTH_SECRET_KEY const hasAuth = isNotEmptyString(AUTH_SECRET_KEY) - res.send({ status: 'Success', message: '', data: { auth: hasAuth } }) + res.send({ status: 'Success', message: '', data: { auth: hasAuth, model: currentModel() } }) } catch (error) { res.send({ status: 'Fail', message: error.message, data: null }) diff --git a/src/components/common/Setting/About.vue b/src/components/common/Setting/About.vue index 4314415..3edb317 100644 --- a/src/components/common/Setting/About.vue +++ b/src/components/common/Setting/About.vue @@ -1,8 +1,9 @@