Skip to content

Commit d84fba9

Browse files
committed
Better structure
1 parent 435155d commit d84fba9

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ The service includes comprehensive user data collection capabilities for various
7373
* [OpenAPI specification](#openapi-specification)
7474
* [Readiness Endpoint](#readiness-endpoint)
7575
* [Liveness Endpoint](#liveness-endpoint)
76+
* [Models endpoint](#models-endpoint)
7677
* [Database structure](#database-structure)
7778
* [Publish the service as Python package on PyPI](#publish-the-service-as-python-package-on-pypi)
7879
* [Generate distribution archives to be uploaded into Python registry](#generate-distribution-archives-to-be-uploaded-into-python-registry)
@@ -1054,7 +1055,9 @@ Stack service. It is possible to specify "model_type" query parameter that is
10541055
used as a filter. For example, if model type is set to "llm", only LLM models
10551056
will be returned:
10561057

1058+
```bash
10571059
curl http://localhost:8080/v1/models?model_type=llm
1060+
```
10581061

10591062
The "model_type" query parameter is optional. When not specified, all models
10601063
will be returned.

docs/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"models"
246246
],
247247
"summary": "Models Endpoint Handler",
248-
"description": "Handle requests to the /models endpoint.\n\nProcess GET requests to the /models endpoint, returning a list of available\nmodels from the Llama Stack service. It is possible to specify \"model_type\"\nquery parameter that is used as a filter. For example, if model type is set\nto \"llm\", only LLM models will be returned:\n\n curl http://localhost:8080/v1/models?model_type=llm\n\nThe \"model_type\" query parameter is optional. When not specified, all models\nwill be returned.\n\n## Parameters:\n request: The incoming HTTP request.\n auth: Authentication tuple from the auth dependency.\n model_type: Optional filter to return only models matching this type.\n\n## Raises:\n HTTPException: If unable to connect to the Llama Stack server or if\n model retrieval fails for any reason.\n\n## Returns:\n ModelsResponse: An object containing the list of available models.",
248+
"description": "Handle requests to the /models endpoint.\n\nProcess GET requests to the /models endpoint, returning a list of available\nmodels from the Llama Stack service. It is possible to specify \"model_type\"\nquery parameter that is used as a filter. For example, if model type is set\nto \"llm\", only LLM models will be returned:\n\n curl http://localhost:8080/v1/models?model_type=llm\n\nThe \"model_type\" query parameter is optional. When not specified, all models\nwill be returned.\n\n### Parameters:\n request: The incoming HTTP request.\n auth: Authentication tuple from the auth dependency.\n model_type: Optional filter to return only models matching this type.\n\n### Raises:\n HTTPException: If unable to connect to the Llama Stack server or if\n model retrieval fails for any reason.\n\n### Returns:\n ModelsResponse: An object containing the list of available models.",
249249
"operationId": "models_endpoint_handler_v1_models_get",
250250
"parameters": [
251251
{

src/app/endpoints/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ async def models_endpoint_handler(
9292
The "model_type" query parameter is optional. When not specified, all models
9393
will be returned.
9494
95-
## Parameters:
95+
### Parameters:
9696
request: The incoming HTTP request.
9797
auth: Authentication tuple from the auth dependency.
9898
model_type: Optional filter to return only models matching this type.
9999
100-
## Raises:
100+
### Raises:
101101
HTTPException: If unable to connect to the Llama Stack server or if
102102
model retrieval fails for any reason.
103103
104-
## Returns:
104+
### Returns:
105105
ModelsResponse: An object containing the list of available models.
106106
"""
107107
# Used only by the middleware

0 commit comments

Comments
 (0)