Skip to content

Conversation

@xrmx
Copy link
Member

@xrmx xrmx commented Mar 19, 2025

What does this pull request do?

This change StreamWrapper to intherit from ObjectProxy so we have whatever attribute the callers expect. Then we need to handle the case when the response of the api call is a LegacyAPIResponse that needs to parsed.

Related issues

Refs #61

So we have whatever attribute the callers expect.
@xrmx xrmx force-pushed the stream-wrapper-rewrite branch from 898cbf2 to 1e24fd4 Compare March 19, 2025 16:08
@xrmx xrmx marked this pull request as draft March 19, 2025 16:08
@xrmx xrmx changed the title openai: inherint StreamWrapper from wrapt's ObjectProxy openai: fix instrumentation of with_raw_response Mar 21, 2025
And move the check for a raw response to an helper
@xrmx xrmx marked this pull request as ready for review March 21, 2025 13:27
Copy link
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one

@codefromthecrypt codefromthecrypt merged commit 29cc440 into main Mar 21, 2025
14 checks passed
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.

3 participants