mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-15 22:47:59 +00:00
right naming
This commit is contained in:
parent
19d57b4d82
commit
04a2965967
10 changed files with 50 additions and 17 deletions
|
@ -22,10 +22,22 @@ class ResourceType(Enum):
|
|||
class Resource(BaseModel):
|
||||
"""Base class for all Llama Stack resources"""
|
||||
|
||||
identifier: str = Field(description="Unique identifier for this resource")
|
||||
identifier: str = Field(
|
||||
description="Unique identifier for this resource in llama stack"
|
||||
)
|
||||
|
||||
provider_resource_identifier: str = Field(
|
||||
description="Unique identifier for this resource in the provider",
|
||||
default=None,
|
||||
)
|
||||
|
||||
provider_id: str = Field(description="ID of the provider that owns this resource")
|
||||
|
||||
type: ResourceType = Field(
|
||||
description="Type of resource (e.g. 'model', 'shield', 'memory_bank', etc.)"
|
||||
)
|
||||
|
||||
# If the provider_resource_identifier is not set, set it to the identifier
|
||||
def model_post_init(self, __context) -> None:
|
||||
if self.provider_resource_identifier is None:
|
||||
self.provider_resource_identifier = self.identifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue