dspy.Image
dspy.Image
Bases: BaseType
Functions
description() -> str
classmethod
extract_custom_type_from_annotation(annotation)
classmethod
Extract all custom types from the annotation.
This is used to extract all custom types from the annotation of a field, while the annotation can
have arbitrary level of nesting. For example, we detect Tool
is in list[dict[str, Tool]]
.
Source code in dspy/adapters/types/base_type.py
format() -> list[dict[str, Any]] | str
from_PIL(pil_image)
classmethod
from_file(file_path: str)
classmethod
from_url(url: str, download: bool = False)
classmethod
serialize_model()
validate_input(values)
classmethod
Source code in dspy/adapters/types/image.py
:::