Attachments.summary

Get a human-readable summary of attached files.

USAGE

Attachments.summary()

Creates a concise summary showing the number of files, total size, and breakdown by content type. Useful for logging, user interfaces, and debugging.

Returns

str

Formatted summary string like “📎 2/3 files attached (1.2MB): 1 image, 1 pdf [1 failed]”

Examples


import talk_box as tb

files = tb.Attachments("code.py", "missing.txt", "diagram.png")
print(files.summary())
# Output: "📎 2/3 files attached (15.2KB): 1 text, 1 image [1 failed]"