fix vertex ai multimodal embedding translation (#9471)

* remove data:image/jpeg;base64, prefix from base64 image input

vertex_ai's multimodal embeddings endpoint expects a raw base64 string without `data:image/jpeg;base64,` prefix.

* Add Vertex Multimodal Embedding Test

* fix(test_vertex.py): add e2e tests on multimodal embeddings

* test: unit testing

* test: remove sklearn dep

* test: update test with fixed route

* test: fix test

---------

Co-authored-by: Jonarod <jonrodd@gmail.com>
Co-authored-by: Emerson Gomes <emerson.gomes@thalesgroup.com>
This commit is contained in:
Krish Dholakia 2025-03-24 23:23:28 -07:00 committed by GitHub
parent 4a91e2116d
commit 6a40d50bc5
6 changed files with 149 additions and 1 deletions

View file

@ -3715,6 +3715,7 @@ def embedding( # noqa: PLR0915
aembedding=aembedding,
print_verbose=print_verbose,
custom_llm_provider="vertex_ai",
client=client,
)
else:
response = vertex_embedding.embedding(