Is there any way to get back usage tokens from responses? #172
Answered
by
jxnl
bradenkinard
asked this question in
Q&A
-
Really liking the library, its very slick. However, I'd like to be able to get back the usage tokens OpenAI returns in the response, or more generally, the metadata beyond just the response message. The Pydantic validation and automatic retries this library offers is incredibly useful, but once that is done, having access to the raw OpenAI response would also be nice, at least in my case. |
Beta Was this translation helpful? Give feedback.
Answered by
jxnl
Nov 13, 2023
Replies: 1 comment 1 reply
-
its not very documented but |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jxnl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
its not very documented but
Model.resp._raw_response
is the raw response. I'll improve the documentation there: