mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
fix(utils.py): return optional params from groq
This commit is contained in:
parent
73bfc299f7
commit
a176feeacc
2 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
model_list:
|
||||
- model_name: ollama-mistral
|
||||
- model_name: groq-whisper
|
||||
litellm_params:
|
||||
model: ollama/mistral
|
||||
model: groq/whisper-large-v3
|
||||
|
||||
|
|
@ -5813,6 +5813,11 @@ def convert_to_model_response_object(
|
|||
if "text" in response_object:
|
||||
model_response_object.text = response_object["text"]
|
||||
|
||||
optional_keys = ["language", "task", "duration", "words", "segments"]
|
||||
for key in optional_keys: # not guaranteed to be in response
|
||||
if key in response_object:
|
||||
setattr(model_response_object, key, response_object[key])
|
||||
|
||||
if hidden_params is not None:
|
||||
model_response_object._hidden_params = hidden_params
|
||||
return model_response_object
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue