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

fix(cli/audio): handle non-json response format #1557

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

aurishhammadhafeez
Copy link
Contributor

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

  • Modified the ``print_modelfunction inopenai/cli/_utils.py` to handle string responses appropriately.
  • Added a type check in print_model to print the response directly if it is a string, avoiding the model_dump_json call.

Additional context & links

Fixes #1035

@aurishhammadhafeez aurishhammadhafeez requested a review from a team as a code owner July 17, 2024 06:31
@RobertCraigie RobertCraigie changed the base branch from main to next July 22, 2024 10:05
@RobertCraigie RobertCraigie changed the title Fix handling of --response-format in audio transcriptions create command fix(cli/audio): handle non-json response format Jul 22, 2024
Copy link
Collaborator

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

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

Thanks!

@RobertCraigie RobertCraigie merged commit bb7431f into openai:next Jul 22, 2024
@stainless-app stainless-app bot mentioned this pull request Jul 22, 2024
stainless-app bot pushed a commit that referenced this pull request Jul 22, 2024
* Fix handling of --response-format in audio transcriptions create command

* handle the string case in audio directly

---------

Co-authored-by: Robert Craigie <[email protected]>
megamanics pushed a commit to devops-testbed/openai-python that referenced this pull request Aug 14, 2024
* Fix handling of --response-format in audio transcriptions create command

* handle the string case in audio directly

---------

Co-authored-by: Robert Craigie <[email protected]>
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.

openai api audio.transcriptions.create not working when response format is not json
2 participants