Enable sane naming of registered objects with defaults

This commit is contained in:
Ashwin Bharambe 2024-11-12 10:17:34 -08:00
parent 9e925f43e5
commit 48a6e27de9
13 changed files with 222 additions and 131 deletions

View file

@ -17,14 +17,12 @@ class ResourceType(Enum):
memory_bank = "memory_bank"
dataset = "dataset"
scoring_function = "scoring_function"
eval_task = "eval_task"
class Resource(BaseModel):
"""Base class for all Llama Stack resources"""
# TODO: I think we need to move these into the child classes
# and make them `model_id`, `shield_id`, etc. because otherwise
# the config file has these confusing generic names in there
identifier: str = Field(
description="Unique identifier for this resource in llama stack"
)