Skip to content
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

Make CreateTranscriptionResponse a oneOf with string and verbose json #84

Closed

Conversation

rattrayalex
Copy link
Contributor

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 an x-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.

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.

1 participant