mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 05:23:57 +00:00
i18n perf (#3770)
* model config * feat: normalization embedding * perf: mark ui * perf: i18n * fix: rerank error tip
This commit is contained in:
@@ -25,6 +25,9 @@ export function reRankRecall({
|
||||
if (!model) {
|
||||
return Promise.reject('no rerank model');
|
||||
}
|
||||
if (documents.length === 0) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
const { baseUrl, authorization } = getAxiosConfig();
|
||||
|
||||
|
@@ -635,7 +635,7 @@ export async function searchDatasetData(
|
||||
return true;
|
||||
});
|
||||
try {
|
||||
return datasetDataReRank({
|
||||
return await datasetDataReRank({
|
||||
query: reRankQuery,
|
||||
data: filterSameDataResults
|
||||
});
|
||||
|
@@ -142,7 +142,7 @@ export const checkQuoteQAValue = (quoteQA?: SearchDataResponseItemType[]) => {
|
||||
if (quoteQA.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (quoteQA.some((item) => !item.q)) {
|
||||
if (quoteQA.some((item) => typeof item !== 'object' || !item.q)) {
|
||||
return undefined;
|
||||
}
|
||||
return quoteQA;
|
||||
|
Reference in New Issue
Block a user