mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: create a chat assistant and extract SimilaritySlider (#67)
* feat: extract SimilaritySlider * feat: create a chat assistant
This commit is contained in:
@ -124,3 +124,22 @@ export const useFetchKnowledgeBaseConfiguration = () => {
|
||||
fetchKnowledgeBaseConfiguration();
|
||||
}, [fetchKnowledgeBaseConfiguration]);
|
||||
};
|
||||
|
||||
export const useFetchKnowledgeList = (): IKnowledge[] => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const knowledgeModel = useSelector((state: any) => state.knowledgeModel);
|
||||
const { data = [] } = knowledgeModel;
|
||||
|
||||
const fetchList = useCallback(() => {
|
||||
dispatch({
|
||||
type: 'knowledgeModel/getList',
|
||||
});
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchList();
|
||||
}, [fetchList]);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user