Skip to content

Conversation

Advayp
Copy link
Contributor

@Advayp Advayp commented Aug 26, 2025

Description

  • According to OpenAI's specification, OutputItem should be a tagged union. This PR updates that struct to align with OpenAI's specification
  • A nice benefit of this is that streaming with tool calls is now supported

Copy link
Owner

@64bit 64bit left a comment

Choose a reason for hiding this comment

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

Looks like this PR is updating incorrect type, the Response object output field type is OutputContent

https://github.com/64bit/async-openai/blob/main/async-openai/src/types/responses.rs#L1371

@Advayp
Copy link
Contributor Author

Advayp commented Sep 1, 2025

Looks like this PR is updating incorrect type, the Response object output field type is OutputContent

https://github.com/64bit/async-openai/blob/main/async-openai/src/types/responses.rs#L1371

The OutputContent type is already correct. I'm updating OutputItem because that's the output type used in streaming events. Though, after taking another look now, both OutputContent and OutputItem are the same. Because of this, I think we can remove the OutputItem type entirely and replace it with OutputContent. What do you think?

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.

2 participants