Grt1228 / chatgpt-java

ChatGPT Java SDK支持流式输出、Gpt插件、联网。支持OpenAI官方所有接口。ChatGPT的Java客户端。OpenAI GPT-3.5-Turb GPT-4 Api Client for Java
https://chatgpt-java.unfbx.com
Apache License 2.0
3.26k stars 809 forks source link

api新增返回字段后反序列化不兼容,Unrecognized field "usage" #259

Open li5m opened 6 months ago

li5m commented 6 months ago

java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "usage" (class com.unfbx.chatgpt.entity.assistant.run.RunStepResponse), not marked as ignorable (15 known properties: "cancelled_at", "completed_at", "created_at", "metadata", "thread_id", "status", "failed_at", "type", "id", "assistant_id", "expires_at", "object", "run_id", "last_error", "step_details"]) at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 28, column: 20] (through reference chain: com.unfbx.chatgpt.entity.assistant.AssistantListResponse["data"]->java.util.ArrayList[0]->com.unfbx.chatgpt.entity.assistant.run.RunStepResponse["usage"]) at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:46) at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:93) at io.reactivex.Single.blockingGet(Single.java:2870) at com.unfbx.chatgpt.OpenAiClient.runSteps(OpenAiClient.java:1402)