Revert "docs: API docstrings cleanup for better documentation rendering (#3661)"

This reverts commit a8da6ba3a7.
This commit is contained in:
Francisco Arceo 2025-10-07 10:18:47 -04:00 committed by GitHub
parent 6389bf5ffb
commit 1b7e893cb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 414 additions and 614 deletions

View file

@ -104,11 +104,6 @@ class OpenAIFileDeleteResponse(BaseModel):
@runtime_checkable
@trace_protocol
class Files(Protocol):
"""Files
This API is used to upload documents that can be used with other Llama Stack APIs.
"""
# OpenAI Files API Endpoints
@webmethod(route="/openai/v1/files", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
@webmethod(route="/files", method="POST", level=LLAMA_STACK_API_V1)
@ -118,8 +113,7 @@ class Files(Protocol):
purpose: Annotated[OpenAIFilePurpose, Form()],
expires_after: Annotated[ExpiresAfter | None, Form()] = None,
) -> OpenAIFileObject:
"""Upload file.
"""
Upload a file that can be used across various endpoints.
The file upload should be a multipart form request with:
@ -143,8 +137,7 @@ class Files(Protocol):
order: Order | None = Order.desc,
purpose: OpenAIFilePurpose | None = None,
) -> ListOpenAIFileResponse:
"""List files.
"""
Returns a list of files that belong to the user's organization.
:param after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
@ -161,8 +154,7 @@ class Files(Protocol):
self,
file_id: str,
) -> OpenAIFileObject:
"""Retrieve file.
"""
Returns information about a specific file.
:param file_id: The ID of the file to use for this request.
@ -176,7 +168,8 @@ class Files(Protocol):
self,
file_id: str,
) -> OpenAIFileDeleteResponse:
"""Delete file.
"""
Delete a file.
:param file_id: The ID of the file to use for this request.
:returns: An OpenAIFileDeleteResponse indicating successful deletion.
@ -189,8 +182,7 @@ class Files(Protocol):
self,
file_id: str,
) -> Response:
"""Retrieve file content.
"""
Returns the contents of the specified file.
:param file_id: The ID of the file to use for this request.