mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
fix - support base 64 image conversion for all gemini model
This commit is contained in:
parent
cf4a38d361
commit
462da5a778
2 changed files with 6 additions and 1 deletions
|
|
@ -583,6 +583,7 @@ from .utils import (
|
|||
completion_cost,
|
||||
supports_function_calling,
|
||||
supports_parallel_function_calling,
|
||||
supports_vision,
|
||||
get_litellm_params,
|
||||
Logging,
|
||||
acreate,
|
||||
|
|
|
|||
|
|
@ -1286,7 +1286,11 @@ def prompt_factory(
|
|||
messages=messages, prompt_format=prompt_format, chat_template=chat_template
|
||||
)
|
||||
elif custom_llm_provider == "gemini":
|
||||
if model == "gemini-pro-vision":
|
||||
if (
|
||||
model == "gemini-pro-vision"
|
||||
or litellm.supports_vision(model=model)
|
||||
or litellm.supports_vision(model=custom_llm_provider + "/" + model)
|
||||
):
|
||||
return _gemini_vision_convert_messages(messages=messages)
|
||||
else:
|
||||
return gemini_text_image_pt(messages=messages)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue