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

(feat): Add timestamp_granularities parameter to transcription API #6457

Conversation

BrunooShow
Copy link
Contributor

Title

Add timestamp_granularities parameter to transcription API

Type

🆕 New Feature

Changes

This PR adds support for the timestamp_granularities parameter in the transcription API, allowing users to specify the granularity level of timestamps in transcription results.

Added

  • New optional parameter timestamp_granularities that accepts a list of either "word" or "segment" granularity levels
  • Updated test cases to verify functionality with different timestamp granularity settings
    Modified Files
  • litellm/main.py: Added timestamp_granularities parameter to transcription function
  • litellm/utils.py: Added timestamp_granularities to get_optional_params_transcription
  • tests/local_testing/test_whisper.py: Added test coverage for timestamp_granularities parameter

Testing

Added parametrized tests for both word-level and segment-level timestamp granularities

Copy link

vercel bot commented Oct 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 27, 2024 9:18pm

@BrunooShow
Copy link
Contributor Author

@ishaan-jaff Let me know if there's any other change needed I'm happy to contribute

@BrunooShow BrunooShow changed the title Add timestamp_granularities parameter to transcription API (feat): Add timestamp_granularities parameter to transcription API Nov 10, 2024
@BrunooShow
Copy link
Contributor Author

@krrishdholakia Possibly you could have a look on this pr?

@antoinebcx
Copy link

I would love to have this feature! 🔥

@krrishdholakia krrishdholakia changed the base branch from main to litellm_dev_11_19_2024 November 19, 2024 23:04
@krrishdholakia krrishdholakia merged commit e89dccc into BerriAI:litellm_dev_11_19_2024 Nov 19, 2024
2 checks passed
krrishdholakia added a commit that referenced this pull request Nov 20, 2024
* fix(anthropic/chat/transformation.py): add json schema as values: json_schema

fixes passing pydantic obj to anthropic

Fixes #6766

* (feat): Add timestamp_granularities parameter to transcription API (#6457)

* Add timestamp_granularities parameter to transcription API

* add param to the local test

* fix(databricks/chat.py): handle max_retries optional param handling for openai-like calls

Fixes issue with calling finetuned vertex ai models via databricks route

* build(ui/): add team admins via proxy ui

* fix: fix linting error

* test: fix test

* docs(vertex.md): refactor docs

* test: handle overloaded anthropic model error

* test: remove duplicate test

* test: fix test

* test: update test to handle model overloaded error

---------

Co-authored-by: Show <35062952+BrunooShow@users.noreply.github.com>
ishaan-jaff pushed a commit that referenced this pull request Nov 22, 2024
* fix(anthropic/chat/transformation.py): add json schema as values: json_schema

fixes passing pydantic obj to anthropic

Fixes #6766

* (feat): Add timestamp_granularities parameter to transcription API (#6457)

* Add timestamp_granularities parameter to transcription API

* add param to the local test

* fix(databricks/chat.py): handle max_retries optional param handling for openai-like calls

Fixes issue with calling finetuned vertex ai models via databricks route

* build(ui/): add team admins via proxy ui

* fix: fix linting error

* test: fix test

* docs(vertex.md): refactor docs

* test: handle overloaded anthropic model error

* test: remove duplicate test

* test: fix test

* test: update test to handle model overloaded error

---------

Co-authored-by: Show <35062952+BrunooShow@users.noreply.github.com>
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.

3 participants