Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: Make `embedding_endpoint_type` an enum (#2251)
Matthew Zhou80f32b41f5db
diff --git a/letta/schemas/embedding_config.py b/letta/schemas/embedding_config.pyindex 31f7ee8da..dcd80c0fd 100644--- a/letta/schemas/embedding_config.py+++ b/letta/schemas/embedding_config.py@@ -1,4 +1,4 @@-from typing import Optional+from typing import Literal, Optionalfrom pydantic import BaseModel, Field@@ -20,7 +20,25 @@ class EmbeddingConfig(BaseModel):"""- embedding_endpoint_type: str = Field(..., description="The endpoint type for the model.")+ embedding_endpoint_type: Literal[+ "openai",+ "anthropic",+ "cohere",+ "google_ai",+ "azure",+ "groq",+ "ollama",+ "webui",+ "webui-legacy",+ "lmstudio",+ "lmstudio-legacy",+ "llamacpp",+ "koboldcpp",+ "vllm",+ "hugging-face",+ "mistral",+ "together", # completions endpoint+ ] = Field(..., description="The endpoint type for the model.")embedding_endpoint: Optional[str] = Field(None, description="The endpoint for the model (`None` if local).")embedding_model: str = Field(..., description="The model for the embedding.")embedding_dim: int = Field(..., description="The dimension of the embedding.")