mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
fix: rerank usage (#4751)
* remove invalid index * perf: i18n * fix: rerank usage
This commit is contained in:
@@ -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,
|
||||
|
||||
|
@@ -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',
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user