add multi modal vtx embedding

This commit is contained in:
Ishaan Jaff 2024-08-21 15:05:59 -07:00
parent 7e3dc83c0d
commit 35781ab8d5
4 changed files with 109 additions and 164 deletions

View file

@ -3477,7 +3477,11 @@ def embedding(
or get_secret("VERTEX_CREDENTIALS")
)
if "image" in optional_params or "video" in optional_params:
if (
"image" in optional_params
or "video" in optional_params
or model in vertex_chat_completion.SUPPORTED_MULTIMODAL_EMBEDDING_MODELS
):
# multimodal embedding is supported on vertex httpx
response = vertex_chat_completion.multimodal_embedding(
model=model,