Skip to content

Commit

Permalink
fix: Embedding error in file parsing #1835 (#1839)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
cike8899 authored Aug 7, 2024
1 parent 4ae9de7 commit 3c19e31
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { LlmModelType } from '@/constants/knowledge';
import {
useFetchKnowledgeBaseConfiguration,
useUpdateKnowledge,
} from '@/hooks/knowledge-hooks';
import { useSelectLlmOptions } from '@/hooks/llm-hooks';
import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks';
import { useNavigateToDataset } from '@/hooks/route-hook';
import { useSelectParserList } from '@/hooks/user-setting-hooks';
import {
Expand Down Expand Up @@ -38,7 +39,7 @@ export const useSubmitKnowledgeConfiguration = (form: FormInstance) => {

export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
const parserList = useSelectParserList();
const embeddingModelOptions = useSelectLlmOptions();
const allOptions = useSelectLlmOptionsByModelType();

const { data: knowledgeDetails } = useFetchKnowledgeBaseConfiguration();

Expand All @@ -62,7 +63,7 @@ export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {

return {
parserList,
embeddingModelOptions,
embeddingModelOptions: allOptions[LlmModelType.Embedding],
disabled: knowledgeDetails.chunk_num > 0,
};
};
Expand Down

0 comments on commit 3c19e31

Please sign in to comment.