feat(ChatKnowledge): Support Financial Report Analysis (#1702)

Co-authored-by: hzh97 <2976151305@qq.com>
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
Co-authored-by: licunxing <864255598@qq.com>
This commit is contained in:
Aries-ckt
2024-07-26 13:40:54 +08:00
committed by GitHub
parent 22e0680a6a
commit 167d972093
160 changed files with 89339 additions and 795 deletions

View File

@@ -52,6 +52,13 @@ const useChat = ({ queryAgentURL = '/api/v1/chat/completions' }: Props) => {
if (response.ok && response.headers.get('content-type') === EventStreamContentType) {
return;
}
if (response.headers.get('content-type') === 'application/json') {
response.json().then((data) => {
onMessage?.(data);
onDone?.();
ctrl.abort();
});
}
},
onclose() {
ctrl.abort();