feat: openai base url

This commit is contained in:
archer
2023-04-25 20:02:35 +08:00
parent ce68791c3c
commit fb08f61eb5
21 changed files with 47 additions and 385 deletions

View File

@@ -84,9 +84,10 @@ export const authOpenApiKey = async (req: NextApiRequest) => {
}
};
/* 代理 */
export const httpsAgent = (fast: boolean) =>
fast ? global.httpsAgentFast : global.httpsAgentNormal;
/* openai axios config */
export const axiosConfig = {
httpsAgent: global.httpsAgent
};
/* delete invalid symbol */
const simplifyStr = (str: string) =>