Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: Relax constraints on pip requirements (#2809)
Matthew Zhouc038bfbd30e8
diff --git a/letta/schemas/pip_requirement.py b/letta/schemas/pip_requirement.pyindex acfbe88b9..44e95fe14 100644--- a/letta/schemas/pip_requirement.py+++ b/letta/schemas/pip_requirement.py@@ -1,23 +1,12 @@-import refrom typing import Optional-from pydantic import BaseModel, Field, field_validator+from pydantic import BaseModel, Fieldclass PipRequirement(BaseModel):name: str = Field(..., min_length=1, description="Name of the pip package.")version: Optional[str] = Field(None, description="Optional version of the package, following semantic versioning.")- @field_validator("version")- @classmethod- def validate_version(cls, v: Optional[str]) -> Optional[str]:- if v is None:- return None- semver_pattern = re.compile(r"^\d+(\.\d+){0,2}(-[a-zA-Z0-9.]+)?$")- if not semver_pattern.match(v):- raise ValueError(f"Invalid version format: {v}. Must follow semantic versioning (e.g., 1.2.3, 2.0, 1.5.0-alpha).")- return v-def __str__(self) -> str:"""Return a pip-installable string format."""if self.version: