Adding Gemini (#1862)

This commit is contained in:
Pranav Puranik
2024-09-27 11:46:40 -05:00
committed by GitHub
parent 699741c760
commit aaf8e6e7ff
9 changed files with 379 additions and 4 deletions

View File

@@ -13,7 +13,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", "vertexai"]:
if provider in ["openai", "ollama", "huggingface", "azure_openai", "gemini", "vertexai"]:
return v
else:
raise ValueError(f"Unsupported embedding provider: {provider}")