Skip to content

Commit ae28669

Browse files
fix(openai): Only wrap types with _iterator for streamed responses (getsentry#5917)
Only wrap streaming responses when the `_iterator` attribute is defined on the returned object to avoid an unhandled exception when the user requests a raw response. Create separate functions for wrapping synchronous and asynchronous Completions and Responses APIs. Closes getsentry#5890.
1 parent 2d91800 commit ae28669

1 file changed

Lines changed: 276 additions & 211 deletions

File tree

0 commit comments

Comments
 (0)