Skip to content

Commit

Permalink
Update embeddings.py (langchain-ai#164)
Browse files Browse the repository at this point in the history
Update embeddings.py to support new text-embedding models

Co-authored-by: Leonid Kuligin <[email protected]>
  • Loading branch information
eliasecchig and lkuligin authored Apr 19, 2024
1 parent fc8e92d commit 375b89d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/vertexai/langchain_google_vertexai/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class GoogleEmbeddingModelType(str, Enum):

@classmethod
def _missing_(cls, value: Any) -> Optional["GoogleEmbeddingModelType"]:
if "textembedding-gecko" in value.lower():
if value.lower().startswith("text"):
return GoogleEmbeddingModelType.TEXT
elif "multimodalembedding" in value.lower():
return GoogleEmbeddingModelType.MULTIMODAL
Expand Down

0 comments on commit 375b89d

Please sign in to comment.