mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-16 18:16:34 +00:00
fix - support base 64 image conversion for all gemini model
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user