Skip to content

API Reference parrot_loaders.imageunderstanding

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_loaders.imageunderstanding

View source

Image Understanding Loader using Google GenAI for analyzing images.

Class ImageUnderstandingLoader

Image analysis loader using Google GenAI for understanding image content. Extracts descriptions, text, objects, and structured information from images. Uses the flash preview image model for analysis.

Parameter Type Default Description
source Optional[Union[str, Path, List[Union[str, Path]]]] None Path or list of paths to image files.
tokenizer Union[str, Callable] None Tokenizer to use for text splitting.
text_splitter Union[str, Callable] None Text splitter to use.
source_type str 'image_understanding' Type identifier for the source.
model str 'gemini-3.1-flash-image' Google GenAI model to use for image analysis.
temperature float 0.2 Temperature for generation.
prompt Optional[str] None Custom prompt for image analysis.
custom_instructions Optional[str] None Custom system instructions for analysis.
language str 'en' Language for analysis output.
detect_objects bool False Whether to enable object detection.
**kwargs {} Additional keyword arguments.

Attributes:

Attribute Type Description
extensions List[str]

Method ImageUnderstandingLoader.close

Clean up resources.

close()

Function extract_sections_from_response

Extract structured sections from the AI image analysis response. Attempts to parse JSON-like structures or creates sections from the text.

extract_sections_from_response(response_text: str) -> List[dict]

Parameter Type Default Description
response_text str

Returns: List[dict]

Function split_text

Split text into chunks of a maximum length, ensuring not to break words.

split_text(text: str, max_length: int) -> List[str]

Parameter Type Default Description
text str
max_length int

Returns: List[str]

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally