From 25ba4ac4766c1f2d90cf0660781adc959a2ad879 Mon Sep 17 00:00:00 2001 From: Joel Date: Mon, 29 Jan 2024 16:03:50 +0800 Subject: [PATCH] feat: show agent show --- service/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/base.ts b/service/base.ts index 16dd112..bd37f3b 100644 --- a/service/base.ts +++ b/service/base.ts @@ -258,7 +258,7 @@ export const upload = (fetchOptions: any): Promise => { }) } -export const ssePost = (url: string, fetchOptions: any, { onData, onCompleted, onError }: IOtherOptions) => { +export const ssePost = (url: string, fetchOptions: any, { onData, onCompleted, onThought, onFile, onMessageEnd, onMessageReplace, onError }: IOtherOptions) => { const options = Object.assign({}, baseOptions, { method: 'POST', }, fetchOptions) @@ -290,7 +290,7 @@ export const ssePost = (url: string, fetchOptions: any, { onData, onCompleted, o onData?.(str, isFirstMessage, moreInfo) }, () => { onCompleted?.() - }) + }, onThought, onMessageEnd, onMessageReplace, onFile) }).catch((e) => { Toast.notify({ type: 'error', message: e }) onError?.(e)