feat: rerank modal select and weight (#4164)
This commit is contained in:
@@ -5,7 +5,7 @@ import { findModelFromAlldata } from '@fastgpt/service/core/ai/model';
|
||||
import {
|
||||
EmbeddingModelItemType,
|
||||
LLMModelItemType,
|
||||
ReRankModelItemType,
|
||||
RerankModelItemType,
|
||||
STTModelType,
|
||||
TTSModelType
|
||||
} from '@fastgpt/global/core/ai/model.d';
|
||||
@@ -151,7 +151,7 @@ const testSTTModel = async (model: STTModelType, headers: Record<string, string>
|
||||
addLog.info(`STT result: ${text}`);
|
||||
};
|
||||
|
||||
const testReRankModel = async (model: ReRankModelItemType, headers: Record<string, string>) => {
|
||||
const testReRankModel = async (model: RerankModelItemType, headers: Record<string, string>) => {
|
||||
await reRankRecall({
|
||||
model,
|
||||
query: 'Hi',
|
||||
|
||||
@@ -27,13 +27,6 @@ async function handler(
|
||||
const dbModel = await MongoSystemModel.findOne({ model }).lean();
|
||||
const modelData = findModelFromAlldata(model);
|
||||
|
||||
if (metadata) {
|
||||
delete metadata.isActive;
|
||||
delete metadata.isDefault;
|
||||
delete metadata.isDefaultDatasetTextModel;
|
||||
delete metadata.isDefaultDatasetImageModel;
|
||||
}
|
||||
|
||||
const metadataConcat: Record<string, any> = {
|
||||
...modelData, // system config
|
||||
...dbModel?.metadata, // db config
|
||||
|
||||
Reference in New Issue
Block a user