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)