feat: admin set env

This commit is contained in:
archer
2023-06-10 22:56:57 +08:00
parent 7dd8e7bea1
commit b8a75921ed
18 changed files with 243 additions and 58 deletions

View File

@@ -201,7 +201,7 @@ export async function appKbSearch({
searchPrompts: [
{
obj: ChatRoleEnum.System,
value: `知识库:${systemPrompt}`
value: `知识库:<${systemPrompt}>`
},
guidePrompt
]

View File

@@ -8,7 +8,7 @@ import { axiosConfig } from '@/service/utils/tools';
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
try {
if (process.env.SENSITIVE_CHECK !== '1') {
if (global.systemEnv.sensitiveCheck) {
return jsonRes(res);
}