This commit is contained in:
archer
2023-07-18 16:26:57 +08:00
parent 2330186a09
commit a993eba7f0
13 changed files with 45 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ import type { NextApiRequest, NextApiResponse } from 'next';
import { jsonRes } from '@/service/response';
import { authUser, getSystemOpenAiKey } from '@/service/utils/auth';
import axios from 'axios';
import { axiosConfig } from '@/service/utils/tools';
import { axiosConfig } from '@/service/ai/openai';
export type Props = {
input: string;
@@ -33,7 +33,7 @@ export async function sensitiveCheck({ input }: Props) {
}
const response = await axios({
...axiosConfig(getSystemOpenAiKey()),
...axiosConfig(),
method: 'POST',
url: `/moderations`,
data: {

View File

@@ -17,6 +17,7 @@ export async function updateSystemEnv() {
...global.systemEnv,
...res
};
console.log(global.systemEnv);
} catch (error) {
console.log('update system env error');
}