dspy.Image
dspy.Image
基类:Type
函数
description() -> str
classmethod
extract_custom_type_from_annotation(annotation)
classmethod
从注解中提取所有自定义类型。
这用于从字段的注解中提取所有自定义类型,而注解可以具有任意层级的嵌套。例如,我们检测到Tool
在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
:::