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.34k stars 816 forks source link

获取账单时会报错,Subscription类需要增加一个布尔类型的字段primary #185

Closed scit1977 closed 1 year ago

scit1977 commented 1 year ago

{ "msg": "com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"primary\" (class com.unfbx.chatgpt.entity.billing.Subscription), not marked as ignorable (19 known properties: \"access_until\", \"tax_ids\", \"soft_limit\", \"hard_limit\", \"plan\", \"soft_limit_usd\", \"hard_limit_usd\", \"billing_address\", \"business_address\", \"delinquent\", \"billing_email\", \"canceled\", \"account_name\", \"system_hard_limit_usd\", \"object\", \"po_number\", \"system_hard_limit\", \"canceled_at\", \"has_payment_method\"])\n at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 18, column: 18] (through reference chain: com.unfbx.chatgpt.entity.billing.Subscription[\"primary\"])", "code": 500 }

返回的字段多了一个primary字段,jackson报错了 "hard_limit_usd": 120.0, "system_hard_limit_usd": 120.0, "plan": { "title": "Pay-as-you-go", "id": "payg" }, "primary": true, "account_name": "Cynthia Anderson", "po_number": null,

ontak commented 1 year ago

1.0.14已经有了

Grt1228 commented 1 year ago

@scit1977 更新1.0.14版本。 1.0.14以上版本后续openai接口更新会忽略新加属性,不会再报错。