Skip to content

Commit d7f44ca

Browse files
authored
docs: Update DocumentInfo and DocumentIndexClient (#1162)
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.
1 parent be07b9e commit d7f44ca

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/intelligence_layer/connectors/document_index/document_index.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,12 @@ def from_slash_separated_str(cls, path: str) -> "DocumentPath":
190190

191191

192192
class DocumentInfo(BaseModel):
193-
"""Presents an overview of a document.
193+
"""Information about a document.
194194
195195
Args:
196-
document_path: Path to a document.
197-
created: When this version of the document was created.
198-
Equivalent to when it was last updated.
199-
version: How many times the document was updated.
196+
document_path: Path to the document. The path uniquely identifies the document among all managed documents.
197+
created: When this version of the document was created. Equivalent to when it was last updated.
198+
version: The version of the document, i.e., how many times the document was updated.
200199
"""
201200

202201
document_path: DocumentPath
@@ -832,17 +831,17 @@ def documents(
832831
collection_path: CollectionPath,
833832
filter_query_params: Optional[DocumentFilterQueryParams] = None,
834833
) -> Sequence[DocumentInfo]:
835-
"""List all documents within a collection.
834+
"""Lists the information of documents in a collection. This includes the document name, creation timestamp and version number.
836835
837836
Note:
838-
Does not return each document's content.
837+
This does not return document contents.
839838
840839
Args:
841840
collection_path: Path to the collection of interest.
842841
filter_query_params: Query parameters to filter the results.
843842
844843
Returns:
845-
Overview of all documents within the collection.
844+
Information of documents in the collection.
846845
"""
847846
if filter_query_params is None:
848847
filter_query_params = DocumentFilterQueryParams(

0 commit comments

Comments
 (0)