mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-21 03:44:21 +00:00
feat: session 返回接口方式做显示判断
This commit is contained in:
@@ -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 })
|
||||
|
Reference in New Issue
Block a user