mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(model_param_helper.py): update _get_litellm_supported_transcription_kwargs() to use proper annotations from TranscriptionCreateParamsNonStreaming & `TranscriptionCreateParamsStreaming
This commit is contained in:
parent
3b9dd9be36
commit
732ab55cc8
1 changed files with 8 additions and 2 deletions
|
|
@ -1,6 +1,9 @@
|
|||
from typing import Set
|
||||
|
||||
from openai.types.audio.transcription_create_params import TranscriptionCreateParams
|
||||
from openai.types.audio.transcription_create_params import (
|
||||
TranscriptionCreateParamsNonStreaming,
|
||||
TranscriptionCreateParamsStreaming,
|
||||
)
|
||||
from openai.types.chat.completion_create_params import (
|
||||
CompletionCreateParamsNonStreaming,
|
||||
CompletionCreateParamsStreaming,
|
||||
|
|
@ -123,7 +126,10 @@ class ModelParamHelper:
|
|||
|
||||
This follows the OpenAI API Spec
|
||||
"""
|
||||
return set(TranscriptionCreateParams.__dict__.keys())
|
||||
all_transcription_kwargs = set(
|
||||
TranscriptionCreateParamsNonStreaming.__annotations__.keys()
|
||||
).union(set(TranscriptionCreateParamsStreaming.__annotations__.keys()))
|
||||
return all_transcription_kwargs
|
||||
|
||||
@staticmethod
|
||||
def _get_exclude_kwargs() -> Set[str]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue