mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 11:58:38 +00:00
configmap
This commit is contained in:
@@ -17,6 +17,9 @@ export type InitDateResponse = {
|
||||
};
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (!global.feConfigs) {
|
||||
await getInitConfig();
|
||||
}
|
||||
jsonRes<InitDateResponse>(res, {
|
||||
data: {
|
||||
systemEnv: global.systemEnv,
|
||||
@@ -39,6 +42,6 @@ export async function getInitConfig() {
|
||||
global.qaModels = res.QAModels;
|
||||
global.vectorModels = res.VectorModels;
|
||||
} catch (error) {
|
||||
console.log('get init config error');
|
||||
return Promise.reject('get init config error');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user