Skip to content

Commit 6132941

Browse files
authored
Merge pull request #1033 from tisnik/docstrings-for-endpoint-handlers
LCORE-1142: Docstrings for endpoint handlers
2 parents 123f3bf + f04e860 commit 6132941

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/app/endpoints/authorized.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ async def authorized_endpoint_handler(
3131
Process POST requests to the /authorized endpoint, returning
3232
the authenticated user's ID and username.
3333
34+
The response intentionally omits any authentication token.
35+
3436
Returns:
3537
AuthorizedResponse: Contains the user ID and username of the authenticated user.
3638
"""

src/app/endpoints/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ async def config_endpoint_handler(
4444
Process GET requests to the /config endpoint and returns the
4545
current service configuration.
4646
47+
Ensures the application configuration is loaded before returning it.
48+
4749
Returns:
4850
ConfigurationResponse: The loaded service configuration response.
4951
"""

src/app/endpoints/info.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ async def info_endpoint_handler(
4444
Process GET requests to the /info endpoint, returning the
4545
service name, version and Llama-stack version.
4646
47+
Raises:
48+
HTTPException: with status 500 and a detail object
49+
containing `response` and `cause` when unable to connect to
50+
Llama Stack. It can also return status 401 or 403 for
51+
unauthorized access.
52+
4753
Returns:
4854
InfoResponse: An object containing the service's name and version.
4955
"""

0 commit comments

Comments
 (0)