From f8ffaa7fc87b38cc6d11f38fd7fbaa7adf3b14d0 Mon Sep 17 00:00:00 2001 From: nick-rackauckas Date: Thu, 6 Jun 2024 16:57:42 -0700 Subject: [PATCH] Fix --- litellm/llms/vertex_ai.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/llms/vertex_ai.py b/litellm/llms/vertex_ai.py index 05dc718dc2..bd9cfaa8d6 100644 --- a/litellm/llms/vertex_ai.py +++ b/litellm/llms/vertex_ai.py @@ -301,7 +301,9 @@ def _process_gemini_image(image_url: str) -> PartType: # GCS URIs if "gs://" in image_url: # Figure out file type - extension = os.path.splitext(image_url)[-1] + extension_with_dot = os.path.splitext(image_url)[-1] # Ex: ".png" + extension = extension_with_dot[1:] # Ex: "png" + file_type = get_file_type_from_extension(extension) # Validate the file type is supported by Gemini