From 134a6d15b6af291e57b5bea2858898288a9d25ee Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 6 Mar 2024 16:48:32 -0300 Subject: [PATCH] Document build_loader_repr_from_records function to util.py --- src/backend/langflow/utils/util.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/backend/langflow/utils/util.py b/src/backend/langflow/utils/util.py index fb704b2bf..ad6660cc5 100644 --- a/src/backend/langflow/utils/util.py +++ b/src/backend/langflow/utils/util.py @@ -469,6 +469,16 @@ def add_options_to_field( def build_loader_repr_from_records(records: List[Record]) -> str: + """ + Builds a string representation of the loader based on the given records. + + Args: + records (List[Record]): A list of records. + + Returns: + str: A string representation of the loader. + + """ if records: avg_length = sum(len(doc.text) for doc in records) / len(records) return f"""{len(records)} records