feat: stop response call api (#340)

This commit is contained in:
Joel 2023-06-12 16:37:03 +08:00 • committed by GitHub
commit b16a7b0b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 8 deletions

View file

@ -15,6 +15,10 @@ export const sendChatMessage = async (appId: string, body: Record<string, any>,
}, { onData, onCompleted, onError, getAbortController })
}
export const stopChatMessageResponding = async (appId: string, taskId: string) => {
return post(`apps/${appId}/chat-messages/${taskId}/stop`)
}
export const sendCompletionMessage = async (appId: string, body: Record<string, any>, { onData, onCompleted, onError }: {
onData: IOnData
onCompleted: IOnCompleted