portia.open_source_tools.image_understanding_tool
Tool for responding to prompts and completing tasks that are related to image understanding.
ImageUnderstandingToolSchema Objects
class ImageUnderstandingToolSchema(BaseModel)
Input for Image Understanding Tool.
check_image_url_or_file
@model_validator(mode="after")
def check_image_url_or_file() -> Self
Check that only one of image_url or image_file is provided.
ImageUnderstandingTool Objects
class ImageUnderstandingTool(Tool[str])
General purpose image understanding tool. Customizable to user requirements.
run
def run(ctx: ToolRunContext, **kwargs: Any) -> str
Run the ImageTool.