MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / _content_summary

Function _content_summary

scripts/age90_file_input_runner.py:28–38  ·  view source on GitHub ↗

Return a compact, non-base64 summary of a content block.

(block: dict[str, Any])

Source from the content-addressed store, hash-verified

26
27
28def _content_summary(block: dict[str, Any]) -> dict[str, str]:
29 """Return a compact, non-base64 summary of a content block."""
30 summary: dict[str, str] = {"type": str(block.get("type"))}
31 for key in ("file_id", "file_url", "filename", "image_url"):
32 if key in block:
33 value = str(block[key])
34 summary[key] = value[:100] + ("..." if len(value) > 100 else "")
35 if "file_data" in block:
36 value = str(block["file_data"])
37 summary["file_data"] = value[:80] + f"... ({len(value)} chars)"
38 return summary
39
40
41def _sanitize_payload(value: Any) -> Any:

Callers 1

inspect_native_pathFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected