mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-02 19:50:00 +00:00
more idiomatic REST API
This commit is contained in:
parent
d0a25dd453
commit
b438dad8d2
29 changed files with 2144 additions and 1917 deletions
|
|
@ -34,10 +34,14 @@ class VersionInfo(BaseModel):
|
|||
version: str
|
||||
|
||||
|
||||
class ListProvidersResponse(BaseModel):
|
||||
data: List[ProviderInfo]
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class Inspect(Protocol):
|
||||
@webmethod(route="/providers/list", method="GET")
|
||||
async def list_providers(self) -> Dict[str, ProviderInfo]: ...
|
||||
async def list_providers(self) -> ListProvidersResponse: ...
|
||||
|
||||
@webmethod(route="/routes/list", method="GET")
|
||||
async def list_routes(self) -> Dict[str, List[RouteInfo]]: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue