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
Usage Stream in Cancelled Streams #1403
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
I'm unsure whether this should be a feature request or a bug report. But the behavior of the stream's usage in cases where a stream is cancelled is unclear. That is, there are many scenarios in which the response is discarded before it's completed, such as an interruption in a conversation. In these contexts, the stream can be cancelled using
However, in these cases, I'm unable to read the usage of the stream. How should this be interpreted?
From a developer's standpoint, using the library, it would be more convenient if the usage is available in the response once the response is completed, rather than having to subscribe to the chunks once they're cancelled. That is,
stream.response.usage.
Additional context
No response
The text was updated successfully, but these errors were encountered: