This commit is contained in:
vastxie
2024-07-31 14:12:56 +08:00
parent dd0e1dafd5
commit c831009379
366 changed files with 1881 additions and 1540 deletions

View File

@@ -72,11 +72,11 @@ let ModelsService = class ModelsService {
this.initCalcKey();
}
async getCurrentModelKeyInfo(model) {
const modelKeyInfo = await this.modelsEntity.findOne({
let modelKeyInfo = await this.modelsEntity.findOne({
where: { model: model },
});
if (!modelKeyInfo) {
throw new common_1.HttpException('当前调用模型的key未找到请重新选择模型', common_1.HttpStatus.BAD_REQUEST);
return null;
}
return modelKeyInfo;
}
@@ -92,7 +92,7 @@ let ModelsService = class ModelsService {
const modifiedModel = Object.assign(Object.assign({}, firstMatchModel), { model: modifiedModelName });
return modifiedModel;
}
async getBaseConfig(appId) {
async getBaseConfig() {
if (!this.modelTypes.length || !Object.keys(this.modelMaps).length)
return;
const { keyType, modelName, model, deductType, deduct, isFileUpload, modelAvatar, modelDescription, } = this.modelMaps[1][0];