mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +00:00
fix: request config
This commit is contained in:
@@ -85,7 +85,7 @@ export const openaiCreateEmbedding = async ({
|
||||
},
|
||||
{
|
||||
timeout: 60000,
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
)
|
||||
.then((res) => ({
|
||||
|
@@ -85,12 +85,12 @@ export const authOpenApiKey = async (req: NextApiRequest) => {
|
||||
};
|
||||
|
||||
/* openai axios config */
|
||||
export const axiosConfig = {
|
||||
export const axiosConfig = () => ({
|
||||
httpsAgent: global.httpsAgent,
|
||||
headers: {
|
||||
auth: process.env.OPENAI_BASE_URL_AUTH || ''
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
/* delete invalid symbol */
|
||||
const simplifyStr = (str: string) =>
|
||||
|
Reference in New Issue
Block a user