mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-12 13:00:39 +00:00
fix
This commit is contained in:
parent
bf11cc0450
commit
1e975e88ec
4 changed files with 6 additions and 4 deletions
2
docs/_static/llama-stack-spec.html
vendored
2
docs/_static/llama-stack-spec.html
vendored
|
@ -765,7 +765,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/v1/models/{model_id}": {
|
"/v1/models/{model_id:path}": {
|
||||||
"get": {
|
"get": {
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
|
2
docs/_static/llama-stack-spec.yaml
vendored
2
docs/_static/llama-stack-spec.yaml
vendored
|
@ -460,7 +460,7 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
/v1/models/{model_id}:
|
/v1/models/{model_id:path}:
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
|
|
@ -130,6 +130,8 @@ class _FormatParameterExtractor:
|
||||||
|
|
||||||
def _get_route_parameters(route: str) -> List[str]:
|
def _get_route_parameters(route: str) -> List[str]:
|
||||||
extractor = _FormatParameterExtractor()
|
extractor = _FormatParameterExtractor()
|
||||||
|
# Replace all occurrences of ":path" with empty string
|
||||||
|
route = route.replace(":path", "")
|
||||||
route.format_map(extractor)
|
route.format_map(extractor)
|
||||||
return extractor.keys
|
return extractor.keys
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ class Models(Protocol):
|
||||||
@webmethod(route="/models", method="GET")
|
@webmethod(route="/models", method="GET")
|
||||||
async def list_models(self) -> ListModelsResponse: ...
|
async def list_models(self) -> ListModelsResponse: ...
|
||||||
|
|
||||||
@webmethod(route="/models/{model_id}", method="GET")
|
@webmethod(route="/models/{model_id:path}", method="GET")
|
||||||
async def get_model(
|
async def get_model(
|
||||||
self,
|
self,
|
||||||
model_id: str,
|
model_id: str,
|
||||||
|
@ -78,7 +78,7 @@ class Models(Protocol):
|
||||||
model_type: Optional[ModelType] = None,
|
model_type: Optional[ModelType] = None,
|
||||||
) -> Model: ...
|
) -> Model: ...
|
||||||
|
|
||||||
@webmethod(route="/models/{model_id}", method="DELETE")
|
@webmethod(route="/models/{model_id:path}", method="DELETE")
|
||||||
async def unregister_model(
|
async def unregister_model(
|
||||||
self,
|
self,
|
||||||
model_id: str,
|
model_id: str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue