chat().createAndPoll()执行完成之后程序不会结束
- Lenguaje dominante
- Java
- Estrellas
- 214
- Forks
- 98
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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();
}
`

Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 32/100