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

TranslationVerbose duration shouldn't be string? #1814

Open
1 task done
ricklamers opened this issue Oct 23, 2024 · 1 comment
Open
1 task done

TranslationVerbose duration shouldn't be string? #1814

ricklamers opened this issue Oct 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ricklamers
Copy link

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

As per title

To Reproduce

Screenshot 2024-10-23 at 4 04 31 PM

Code snippets

No response

OS

macOS

Python version

Python 3.11

Library version

1.52.1

@Programmer-RD-AI
Copy link

Hi,

Thank you for pointing this out! Based on the current implementation:

class TranslationVerbose(BaseModel):  
    duration: str  
    """The duration of the input audio."""  

It seems the duration field is indeed expected as a string. This might be an oversight in either the documentation or the code itself—I'm not entirely sure yet.

To address this, I’ve created #2034, which updates the TranslationVerbose model to support both string and integer types for the duration field. This change ensures flexibility and aligns better with expected usage.

Please take a look at the PR and let me know your thoughts or any feedback you might have. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants