mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-28 21:12:13 +00:00
20 lines
435 B
TypeScript
20 lines
435 B
TypeScript
import { useRequest } from 'ahooks';
|
|
import { sendGetRequest } from '@/utils/request';
|
|
|
|
export function useQueryDialog() {
|
|
const {
|
|
run: queryDialogueList,
|
|
data: dialogueList,
|
|
loading: loadingDialogList,
|
|
refresh: refreshDialogList,
|
|
} = useRequest(async () => await sendGetRequest('/v1/chat/dialogue/list'), {
|
|
manual: false,
|
|
});
|
|
|
|
return {
|
|
queryDialogueList,
|
|
dialogueList,
|
|
loadingDialogList,
|
|
refreshDialogList
|
|
};
|
|
} |