mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 16:45:08 +08:00
### What problem does this PR solve? Feat: Interrupt streaming #6515 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -17,7 +17,9 @@ import {
|
||||
} from 'react';
|
||||
|
||||
export const useSendQuestion = (kbIds: string[]) => {
|
||||
const { send, answer, done } = useSendMessageWithSse(api.ask);
|
||||
const { send, answer, done, stopOutputMessage } = useSendMessageWithSse(
|
||||
api.ask,
|
||||
);
|
||||
const { testChunk, loading } = useTestChunkRetrieval();
|
||||
const [sendingLoading, setSendingLoading] = useState(false);
|
||||
const [currentAnswer, setCurrentAnswer] = useState({} as IAnswer);
|
||||
@ -116,6 +118,7 @@ export const useSendQuestion = (kbIds: string[]) => {
|
||||
isFirstRender,
|
||||
selectedDocumentIds,
|
||||
isSearchStrEmpty: isEmpty(trim(searchStr)),
|
||||
stopOutputMessage,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user