feat: content check

This commit is contained in:
archer
2023-05-21 22:12:02 +08:00
parent 98444fd04b
commit 51a5d450b7
15 changed files with 310 additions and 65 deletions

View File

@@ -31,9 +31,11 @@ export const clearCookie = (res: NextApiResponse) => {
};
/* openai axios config */
export const axiosConfig = () => ({
export const axiosConfig = (apikey: string) => ({
baseURL: process.env.OPENAI_BASE_URL || 'https://api.openai.com/v1',
httpsAgent: global.httpsAgent,
headers: {
Authorization: `Bearer ${apikey}`,
auth: process.env.OPENAI_BASE_URL_AUTH || ''
}
});