Document build_loader_repr_from_records function to util.py
This commit is contained in:
parent
7f2a352b9a
commit
134a6d15b6
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue