-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
chat().createAndPoll()执行完成之后程序不会结束。程序一直挂在那,貌似有什么线程卡住了。
`
public static void main(String[] args) throws Exception {
String cozeAPIToken = "cozeAPIToken";
String cozeAPIBase = Consts.COZE_CN_BASE_URL;
CozeAPI coze = new CozeAPI.Builder().auth(new TokenAuth(cozeAPIToken)).baseURL(cozeAPIBase).build();
CreateChatReq req =
CreateChatReq.builder()
.botID("botID")
.userID("123")
.messages(Collections.singletonList(Message.buildUserQuestionText("翻译\"你好,世界!\"")))
.build();
ChatPoll chat2 = coze.chat().createAndPoll(req, 3000L);
System.out.println(chat2.getMessages().get(0).getContent());
coze.shutdownExecutor();
}
`
Metadata
Metadata
Assignees
Labels
No labels