mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
fix(gemini): append empty choice to model response when there are no candidates
This commit is contained in:
parent
ebfff975d4
commit
c958bbe706
1 changed files with 2 additions and 0 deletions
|
@ -949,6 +949,8 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
|
|||
) = self._process_candidates(
|
||||
_candidates, model_response, litellm_params
|
||||
)
|
||||
else:
|
||||
model_response.choices.append(litellm.Choices())
|
||||
|
||||
usage = self._calculate_usage(completion_response=completion_response)
|
||||
setattr(model_response, "usage", usage)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue