chat().createAndPoll()执行完成之后程序不会结束
- 主要言語
- Java
- スター
- 214
- フォーク
- 98
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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();
}
`

コントリビューションガイド
調査の方向性
Start by running the supplied Java main example with chat().createAndPoll(req, 3000L), then inspect the lifecycle around createAndPoll and coze.shutdownExecutor(). Confirm whether the process remains alive after the response is printed and define done as the program exiting cleanly after polling completes.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 32/100