mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 20:29:47 +00:00
tracing decorator for apiis
This commit is contained in:
parent
c6b4bf8ada
commit
c2a4850a79
4 changed files with 141 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ from llama_models.schema_utils import json_schema_type, webmethod
|
|||
from pydantic import BaseModel
|
||||
|
||||
from llama_stack.apis.resource import Resource, ResourceType
|
||||
from llama_stack.distribution.tracing import trace_protocol
|
||||
|
||||
|
||||
class CommonShieldFields(BaseModel):
|
||||
|
|
@ -38,6 +39,7 @@ class ShieldInput(CommonShieldFields):
|
|||
|
||||
|
||||
@runtime_checkable
|
||||
@trace_protocol
|
||||
class Shields(Protocol):
|
||||
@webmethod(route="/shields/list", method="GET")
|
||||
async def list_shields(self) -> List[Shield]: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue