fix: eco knowledge retrieval method (#6798)
This commit is contained in:
parent
0675c5f716
commit
0a744a73b3
4 changed files with 33 additions and 5 deletions
|
|
@ -8,7 +8,10 @@ export const useKnowledge = () => {
|
|||
return t(`dataset.indexingTechnique.${indexingTechnique}`)
|
||||
}, [t])
|
||||
|
||||
const formatIndexingMethod = useCallback((indexingMethod: string) => {
|
||||
const formatIndexingMethod = useCallback((indexingMethod: string, isEco?: boolean) => {
|
||||
if (isEco)
|
||||
return t('dataset.indexingMethod.invertedIndex')
|
||||
|
||||
return t(`dataset.indexingMethod.${indexingMethod}`)
|
||||
}, [t])
|
||||
|
||||
|
|
@ -16,7 +19,7 @@ export const useKnowledge = () => {
|
|||
let result = formatIndexingTechnique(indexingTechnique)
|
||||
|
||||
if (indexingMethod)
|
||||
result += ` · ${formatIndexingMethod(indexingMethod)}`
|
||||
result += ` · ${formatIndexingMethod(indexingMethod, indexingTechnique === 'economy')}`
|
||||
|
||||
return result
|
||||
}, [formatIndexingTechnique, formatIndexingMethod])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue