Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "completion_tokens_details" (class com.plexpt.chatgpt.entity.billing.Usage), not marked as ignorable (3 known properties: "prompt_tokens", "completion_tokens", "total_tokens"]) #320

Open
165149324 opened this issue Sep 13, 2024 · 8 comments

Comments

@165149324
Copy link

Exception in thread "main" java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "completion_tokens_details" (class com.plexpt.chatgpt.entity.billing.Usage), not marked as ignorable (3 known properties: "prompt_tokens", "completion_tokens", "total_tokens"])
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 22, column: 35] (through reference chain: com.plexpt.chatgpt.entity.chat.ChatCompletionResponse["usage"]->com.plexpt.chatgpt.entity.billing.Usage["completion_tokens_details"])
at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:45)
at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:90)

@OleksandrMiadelets
Copy link

I have the same issue

@PlexPt
Copy link
Owner

PlexPt commented Sep 13, 2024

show your code

@wanggang1997
Copy link

api 更新了,我之前一直正确使用,现在也出现这个错误了:
java.lang.RuntimeException: API调用异常: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "completion_tokens_details" (class com.plexpt.chatgpt.entity.billing.Usage), not marked as ignorable (3 known properties: "prompt_tokens", "completion_tokens", "total_tokens"])
at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 22, column: 35] (through reference chain: com.plexpt.chatgpt.entity.chat.ChatCompletionResponse["usage"]->com.plexpt.chatgpt.entity.billing.Usage["completion_tokens_details"])

@OleksandrMiadelets
Copy link

Looks like ChatGPT started returning an extra field completion_tokens_details in entity Usage

@PlexPt
Copy link
Owner

PlexPt commented Sep 13, 2024

updating

@PlexPt
Copy link
Owner

PlexPt commented Sep 13, 2024

fixed

已修复, 5.1.1

@wanggang1997
Copy link

maven仓库多久更新呢?目前还获取不到

@PlexPt
Copy link
Owner

PlexPt commented Sep 14, 2024

数小时延迟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants