mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
4.8.8 test fix (#2143)
* perf: transcriptions api * perf: variable picker tip * perf: variable picker tip * perf: chat select app * feat: router to app detail * perf: variable avoid space * perf: variable picker * perf: doc2x icon and params * perf: sandbox support countToken * feat: sandbox support delay and countToken
This commit is contained in:
@@ -21,3 +21,16 @@ export const getAIApi = (props?: {
|
||||
maxRetries: 2
|
||||
});
|
||||
};
|
||||
|
||||
export const getAxiosConfig = (props?: { userKey?: UserModelSchema['openaiAccount'] }) => {
|
||||
const { userKey } = props || {};
|
||||
|
||||
const baseUrl =
|
||||
userKey?.baseUrl || global?.systemEnv?.oneapiUrl || process.env.ONEAPI_URL || openaiBaseUrl;
|
||||
const apiKey = userKey?.key || global?.systemEnv?.chatApiKey || process.env.CHAT_API_KEY || '';
|
||||
|
||||
return {
|
||||
baseUrl,
|
||||
authorization: `Bearer ${apiKey}`
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user