How to get OpenAI with_structured_output token usage with Pydantic Schema #28704
Unanswered
zahidekilic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checked other resources
Commit to Help
Example Code
Description
Outputs:
Here are the outputs I received:
System Info
Problem:
I want to achieve the output in the second format (structured output matching the user input), but when I use the second method, I am unable to access
input_tokens
or token usage details.Request:
Can you provide guidance or an example that demonstrates how to:
input_tokens
at the same time?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions