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

Function inspect_native_path

scripts/age90_file_input_runner.py:58–78  ·  view source on GitHub ↗

Show whether the PDF is treated as a native multimodal input.

(pdf_path: Path, provider: str, api: str | None)

Source from the content-addressed store, hash-verified

56
57
58def inspect_native_path(pdf_path: Path, provider: str, api: str | None) -> None:
59 """Show whether the PDF is treated as a native multimodal input."""
60 pdf = PDFFile(source=str(pdf_path))
61 supported_types = get_supported_content_types(provider, api=api)
62 blocks = format_multimodal_content(
63 {"document": pdf},
64 provider=provider,
65 api=api,
66 text="Summarize this PDF.",
67 )
68
69 print("\n== Native File Formatting ==")
70 print(f"PDF: {pdf_path}")
71 print(f"Provider/API: {provider} / {api or 'default'}")
72 print(f"Supported content types: {supported_types}")
73 print(f"Content block count: {len(blocks)}")
74 for index, block in enumerate(blocks, start=1):
75 print(f" {index}. {_content_summary(block)}")
76
77 has_pdf_block = any(block.get("type") == "input_file" for block in blocks)
78 print(f"PDF native input_file block: {'YES' if has_pdf_block else 'NO'}")
79
80
81def inspect_fallback_tool(pdf_path: Path) -> None:

Callers 1

mainFunction · 0.85

Calls 5

PDFFileClass · 0.90
_content_summaryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected