feat: create a chat assistant and extract SimilaritySlider (#67)

* feat: extract SimilaritySlider

* feat: create a chat assistant
This commit is contained in:
balibabu
2024-02-20 18:10:20 +08:00
committed by GitHub
parent a8294f2168
commit 8c4ec9955e
26 changed files with 716 additions and 196 deletions

View File

@ -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;
};