Make CreateTranscriptionResponse a oneOf with string and verbose json #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This would resolve openai/openai-node#221.
I don't actually recommend merging this until our SDK codegen can generate overloads that correctly map the
response_format
request param to the appropriate response schema (OpenAPI does not have a feature for this, so we'll need to invent anx-stainless
workaround of some kind).If we were to merge this in the short term, all Node users who are creating transcriptions with the Node SDK with the default response type would get a type error on upgrade, and be forced to manually specify which union member their response is, which can be confusing. I'd rather we not regress the default integration path for now.
That said, this is technically more accurate, and it's all OpenAPI can support, so it'd be okay to merge it too if you like.
At the minimum, the existence of this PR maybe helpful to other developers trying to understand what the
verbose_json
format is.