mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 12:40:59 +00:00
fix(cloud): accept null model abilities (#2377)
Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
This commit is contained in:
@@ -32,6 +32,11 @@ class CloudModelCatalogItem(BaseModel):
|
||||
is_featured: bool = False
|
||||
featured_order: int = 0
|
||||
|
||||
@field_validator('llm_abilities', mode='before')
|
||||
@classmethod
|
||||
def normalize_missing_abilities(cls, value: Any) -> Any:
|
||||
return () if value is None else value
|
||||
|
||||
@field_validator('llm_abilities')
|
||||
@classmethod
|
||||
def validate_abilities(cls, value: tuple[str, ...]) -> tuple[str, ...]:
|
||||
|
||||
Reference in New Issue
Block a user