Skip to content

Commit 3a2f276

Browse files
authored
Merge pull request #26 from seymourtang/convoai-1.4
feat:Adapt to conversational AI 1.4 features
2 parents ff82b29 + 47e96ee commit 3a2f276

File tree

4 files changed

+956
-37
lines changed

4 files changed

+956
-37
lines changed

agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/api/InterruptConvoAIAPI.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package io.agora.rest.services.convoai.api;
22

3+
import java.util.HashMap;
4+
import java.util.Map;
5+
36
import io.agora.rest.core.Context;
47
import io.agora.rest.exception.AgoraNeedRetryException;
58
import io.agora.rest.services.convoai.res.InterruptConvoAIRes;
@@ -14,7 +17,9 @@ public InterruptConvoAIAPI(Context context, String pathPrefix, Integer maxAttemp
1417

1518
public Mono<InterruptConvoAIRes> handle(String agentId) {
1619
String path = String.format("%s/agents/%s/interrupt", pathPrefix, agentId);
17-
return this.context.sendRequest(path, HttpMethod.POST, null, InterruptConvoAIRes.class)
20+
// use empty map as body
21+
Map<String, Object> body = new HashMap<>();
22+
return this.context.sendRequest(path, HttpMethod.POST, body, InterruptConvoAIRes.class)
1823
.retryWhen(customRetry(e -> e instanceof AgoraNeedRetryException));
1924
}
2025
}

0 commit comments

Comments
 (0)