fix: rerank usage (#4751)

* remove invalid index

* perf: i18n

* fix: rerank usage
This commit is contained in:
Archer
2025-05-06 16:23:36 +08:00
committed by GitHub
parent 367ee517ec
commit ef537f391c
10 changed files with 38 additions and 34 deletions

View File

@@ -98,7 +98,7 @@ async function handler(req: ApiRequestProps<SearchTestProps>): Promise<SearchTes
const { totalPoints: embeddingTotalPoints } = pushGenerateVectorUsage({
teamId,
tmbId,
inputTokens: reRankInputTokens,
inputTokens: embeddingTokens,
model: dataset.vectorModel,
source: apikey ? UsageSourceEnum.api : UsageSourceEnum.fastgpt,

View File

@@ -161,17 +161,21 @@ const Dataset = () => {
description: t('dataset:common_dataset_desc'),
onClick: () => onSelectDatasetType(DatasetTypeEnum.dataset)
},
{
icon: 'core/dataset/externalDatasetColor',
label: t('dataset:api_file'),
description: t('dataset:external_file_dataset_desc'),
onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset)
},
{
icon: 'core/dataset/websiteDatasetColor',
label: t('dataset:website_dataset'),
description: t('dataset:website_dataset_desc'),
onClick: () => onSelectDatasetType(DatasetTypeEnum.websiteDataset)
}
]
},
{
children: [
{
icon: 'core/dataset/externalDatasetColor',
label: t('dataset:api_file'),
description: t('dataset:external_file_dataset_desc'),
onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset)
},
{
icon: 'core/dataset/feishuDatasetColor',

View File

@@ -120,7 +120,7 @@ export const useSpeech = (props?: OutLinkChatAuthProps & { appId?: string }) =>
if (!navigator?.mediaDevices?.getUserMedia) {
return toast({
status: 'warning',
title: t('common:speech.not support')
title: t('common:speech_not_support')
});
}
@@ -230,7 +230,7 @@ export const useSpeech = (props?: OutLinkChatAuthProps & { appId?: string }) =>
} catch (error) {
toast({
status: 'warning',
title: getErrText(error, t('common:speech.error tip'))
title: getErrText(error, t('common:speech_error_tip'))
});
}
setIsTransCription(false);