Add Support for Vertex AI Embeddings (#1840)

This commit is contained in:
Divyanshu Prasad
2024-09-13 17:09:25 +05:30
committed by GitHub
parent f9634b4bf3
commit 959f4bb059
5 changed files with 77 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ class EmbedderConfig(BaseModel):
@field_validator("config")
def validate_config(cls, v, values):
provider = values.data.get("provider")
if provider in ["openai", "ollama", "huggingface", "azure_openai"]:
if provider in ["openai", "ollama", "huggingface", "azure_openai", "vertexai"]:
return v
else:
raise ValueError(f"Unsupported embedding provider: {provider}")