mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-01 05:35:06 +08:00
### What problem does this PR solve? fix: Embedding error in file parsing #1835 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
4ae9de76d4
commit
3c19e3125b
@ -1,8 +1,9 @@
|
|||||||
|
import { LlmModelType } from '@/constants/knowledge';
|
||||||
import {
|
import {
|
||||||
useFetchKnowledgeBaseConfiguration,
|
useFetchKnowledgeBaseConfiguration,
|
||||||
useUpdateKnowledge,
|
useUpdateKnowledge,
|
||||||
} from '@/hooks/knowledge-hooks';
|
} from '@/hooks/knowledge-hooks';
|
||||||
import { useSelectLlmOptions } from '@/hooks/llm-hooks';
|
import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks';
|
||||||
import { useNavigateToDataset } from '@/hooks/route-hook';
|
import { useNavigateToDataset } from '@/hooks/route-hook';
|
||||||
import { useSelectParserList } from '@/hooks/user-setting-hooks';
|
import { useSelectParserList } from '@/hooks/user-setting-hooks';
|
||||||
import {
|
import {
|
||||||
@ -38,7 +39,7 @@ export const useSubmitKnowledgeConfiguration = (form: FormInstance) => {
|
|||||||
|
|
||||||
export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
||||||
const parserList = useSelectParserList();
|
const parserList = useSelectParserList();
|
||||||
const embeddingModelOptions = useSelectLlmOptions();
|
const allOptions = useSelectLlmOptionsByModelType();
|
||||||
|
|
||||||
const { data: knowledgeDetails } = useFetchKnowledgeBaseConfiguration();
|
const { data: knowledgeDetails } = useFetchKnowledgeBaseConfiguration();
|
||||||
|
|
||||||
@ -62,7 +63,7 @@ export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
parserList,
|
parserList,
|
||||||
embeddingModelOptions,
|
embeddingModelOptions: allOptions[LlmModelType.Embedding],
|
||||||
disabled: knowledgeDetails.chunk_num > 0,
|
disabled: knowledgeDetails.chunk_num > 0,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user