mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 17:12:43 +00:00
feat: Add tags field for models with dynamic and user-defined population
- Implemented a Python function to extract tags from the model identifier field for dynamic population. - Enabled users to specify tags manually when registering a model. - Tags are now included when retrieving model data. Signed-off-by: Habeb Nawatha <habeb.naw@outlook.com>
This commit is contained in:
parent
815f4af6cf
commit
3faa79d76c
2 changed files with 32 additions and 1 deletions
|
|
@ -20,6 +20,11 @@ class CommonModelFields(BaseModel):
|
|||
description="Any additional metadata for this model",
|
||||
)
|
||||
|
||||
tags: Dict[str, str] = Field(
|
||||
default_factory=dict,
|
||||
description="Tags associated with this model as a dictionary",
|
||||
)
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class ModelType(str, Enum):
|
||||
|
|
@ -69,6 +74,7 @@ class Models(Protocol):
|
|||
provider_id: Optional[str] = None,
|
||||
metadata: Optional[Dict[str, Any]] = None,
|
||||
model_type: Optional[ModelType] = None,
|
||||
tags: Optional[Dict[str, str]] = None,
|
||||
) -> Model: ...
|
||||
|
||||
@webmethod(route="/models/unregister", method="POST")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue