mirror of
https://github.com/langgenius/dify.git
synced 2026-07-24 04:58:32 +08:00
24 lines
887 B
TypeScript
24 lines
887 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { IndexMethodEnum, RetrievalSearchMethodEnum } from '../types'
|
|
|
|
export const useSettingsDisplay = () => {
|
|
const { t } = useTranslation()
|
|
|
|
return {
|
|
[IndexMethodEnum.QUALIFIED]: t(($) => $['stepTwo.qualified'], { ns: 'datasetCreation' }),
|
|
[IndexMethodEnum.ECONOMICAL]: t(($) => $['form.indexMethodEconomy'], { ns: 'datasetSettings' }),
|
|
[RetrievalSearchMethodEnum.semantic]: t(($) => $['retrieval.semantic_search.title'], {
|
|
ns: 'dataset',
|
|
}),
|
|
[RetrievalSearchMethodEnum.fullText]: t(($) => $['retrieval.full_text_search.title'], {
|
|
ns: 'dataset',
|
|
}),
|
|
[RetrievalSearchMethodEnum.hybrid]: t(($) => $['retrieval.hybrid_search.title'], {
|
|
ns: 'dataset',
|
|
}),
|
|
[RetrievalSearchMethodEnum.keywordSearch]: t(($) => $['retrieval.keyword_search.title'], {
|
|
ns: 'dataset',
|
|
}),
|
|
}
|
|
}
|