mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 20:12:36 +00:00
tracing for APIs
This commit is contained in:
parent
c2a4850a79
commit
af8a1fe5b3
8 changed files with 126 additions and 63 deletions
|
|
@ -10,6 +10,7 @@ from llama_models.schema_utils import json_schema_type, webmethod
|
|||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from llama_stack.apis.resource import Resource, ResourceType
|
||||
from llama_stack.distribution.tracing import trace_protocol
|
||||
|
||||
|
||||
class CommonModelFields(BaseModel):
|
||||
|
|
@ -43,6 +44,7 @@ class ModelInput(CommonModelFields):
|
|||
|
||||
|
||||
@runtime_checkable
|
||||
@trace_protocol
|
||||
class Models(Protocol):
|
||||
@webmethod(route="/models/list", method="GET")
|
||||
async def list_models(self) -> List[Model]: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue