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

Set the 'Include Usage' parameter under 'Stream Options' to true in the 'chat-completion-accumulating' example #125

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

bytesizedwizard
Copy link

Summary

This pull request adds the missingStreamOptions.IncludeUsage option in the example code that should be set to true to retrieve accurate token usage information from the API. Without this parameter, the example currently returns a token usage of 0.

Changes Made

  • Updated the relevant example request options to include the missing parameter with a value of true.

Issue Reference

Fixes #124

Testing

  • Ran the example after adding the parameter and confirmed that token usage is now reported accurately.

Additional Context

This change ensures users get accurate usage data when using the example code.

@jacobzim-stl
Copy link
Collaborator

Thanks, we'll merge this.

@bytesizedwizard
Copy link
Author

Hello @jacobzim-stl, any update on when this would be merged?

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

Successfully merging this pull request may close these issues.

Missing request option in example code results in incorrect token usage reporting
2 participants