Skip to content

Commit

Permalink
docs: Update DocumentInfo and DocumentIndexClient (#1162)
Browse files Browse the repository at this point in the history
Update DocumentInfo class to improve clarity and precision of
its description and arguments, and refine the description of the
list_documents method in DocumentIndexClient to better reflect its
functionality.
  • Loading branch information
Michael-JB authored Nov 28, 2024
1 parent be07b9e commit d7f44ca
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,12 @@ def from_slash_separated_str(cls, path: str) -> "DocumentPath":


class DocumentInfo(BaseModel):
"""Presents an overview of a document.
"""Information about a document.
Args:
document_path: Path to a document.
created: When this version of the document was created.
Equivalent to when it was last updated.
version: How many times the document was updated.
document_path: Path to the document. The path uniquely identifies the document among all managed documents.
created: When this version of the document was created. Equivalent to when it was last updated.
version: The version of the document, i.e., how many times the document was updated.
"""

document_path: DocumentPath
Expand Down Expand Up @@ -832,17 +831,17 @@ def documents(
collection_path: CollectionPath,
filter_query_params: Optional[DocumentFilterQueryParams] = None,
) -> Sequence[DocumentInfo]:
"""List all documents within a collection.
"""Lists the information of documents in a collection. This includes the document name, creation timestamp and version number.
Note:
Does not return each document's content.
This does not return document contents.
Args:
collection_path: Path to the collection of interest.
filter_query_params: Query parameters to filter the results.
Returns:
Overview of all documents within the collection.
Information of documents in the collection.
"""
if filter_query_params is None:
filter_query_params = DocumentFilterQueryParams(
Expand Down

0 comments on commit d7f44ca

Please sign in to comment.