feat: add llm Select to KeywordExtractForm #918 (#1492)

### What problem does this PR solve?

feat: add llm Select to KeywordExtractForm #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-12 17:22:01 +08:00
committed by GitHub
parent a5a617b7a3
commit 0c9a7caa9d
8 changed files with 42 additions and 7 deletions

View File

@ -365,6 +365,7 @@ export const useSaveGraphBeforeOpeningDebugDrawer = (show: () => void) => {
const { id } = useParams();
const { saveGraph } = useSaveGraph();
const { resetFlow } = useResetFlow();
const { refetch } = useFetchFlow();
const { send } = useSendMessageWithSse(api.runCanvas);
const handleRun = useCallback(async () => {
const saveRet = await saveGraph();
@ -373,6 +374,7 @@ export const useSaveGraphBeforeOpeningDebugDrawer = (show: () => void) => {
const resetRet = await resetFlow();
// After resetting, all previous messages will be cleared.
if (resetRet?.retcode === 0) {
refetch();
// fetch prologue
const sendRet = await send({ id });
if (receiveMessageError(sendRet)) {
@ -382,7 +384,7 @@ export const useSaveGraphBeforeOpeningDebugDrawer = (show: () => void) => {
}
}
}
}, [saveGraph, resetFlow, id, send, show]);
}, [saveGraph, resetFlow, id, send, show, refetch]);
return handleRun;
};