Merge pull request #5455 from BerriAI/litellm_vtx_add_input_type_mapping

[Feat] Vertex embeddings - map `input_type` to `text_type`
This commit is contained in:
Ishaan Jaff 2024-08-30 17:03:04 -07:00 committed by GitHub
commit 3a72197e77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 398 additions and 281 deletions

View file

@ -125,12 +125,12 @@ from .llms.vertex_ai_and_google_ai_studio import (
vertex_ai_anthropic,
vertex_ai_non_gemini,
)
from .llms.vertex_ai_and_google_ai_studio.embeddings.batch_embed_content_handler import (
GoogleBatchEmbeddings,
)
from .llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (
VertexLLM,
)
from .llms.vertex_ai_and_google_ai_studio.gemini_embeddings.batch_embed_content_handler import (
GoogleBatchEmbeddings,
)
from .llms.vertex_ai_and_google_ai_studio.multimodal_embeddings.embedding_handler import (
VertexMultimodalEmbedding,
)
@ -140,6 +140,9 @@ from .llms.vertex_ai_and_google_ai_studio.text_to_speech.text_to_speech_handler
from .llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.main import (
VertexAIPartnerModels,
)
from .llms.vertex_ai_and_google_ai_studio.vertex_embeddings import (
embedding_handler as vertex_ai_embedding_handler,
)
from .llms.watsonx import IBMWatsonXAI
from .types.llms.openai import HttpxBinaryResponseContent
from .types.utils import (
@ -3608,7 +3611,7 @@ def embedding(
custom_llm_provider="vertex_ai",
)
else:
response = vertex_ai_non_gemini.embedding(
response = vertex_ai_embedding_handler.embedding(
model=model,
input=input,
encoding=encoding,