feat: set the object-fit attribute of the chunk image to contain so that the image is not stretched and if the chunk number of the knowledge base is greater than 0, set the embedding model to disabled (#160)

* feat: if the chunk number of the knowledge base is greater than 0, set the embedding model to disabled

* feat: set the object-fit attribute of the chunk image to contain so that the image is not stretched
This commit is contained in:
balibabu
2024-03-28 11:42:40 +08:00
committed by GitHub
parent 44541a8c33
commit 37cc673098
7 changed files with 21 additions and 12 deletions

View File

@ -41,8 +41,6 @@ export const useSubmitKnowledgeConfiguration = () => {
};
export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
// const [form] = Form.useForm();
const knowledgeDetails = useSelectKnowledgeDetails();
const parserList = useSelectParserList();
const embeddingModelOptions = useSelectLlmOptions();
@ -69,7 +67,11 @@ export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
});
}, [form, knowledgeDetails]);
return { parserList, embeddingModelOptions };
return {
parserList,
embeddingModelOptions,
disabled: knowledgeDetails.chunk_num > 0,
};
};
export const useSelectKnowledgeDetailsLoading = () =>