An image content part.
| 85 | return f'ImageURL(url={repr(self.url)}, detail={repr(self.detail)}, media_type={repr(self.media_type)})' |
| 86 | |
| 87 | class ContentPartImage(BaseModel): |
| 88 | """An image content part.""" |
| 89 | image_url: ImageURL = Field(description="The URL of the image.") |
| 90 | type: Literal['image_url'] = Field(default='image_url', description="The type of the content part.") # type: ignore |
| 91 | |
| 92 | def __str__(self) -> str: |
| 93 | return str(self.image_url) |
| 94 | |
| 95 | def __repr__(self) -> str: |
| 96 | return f'ContentPartImage(image_url={repr(self.image_url)})' |
| 97 | |
| 98 | class PdfURL(BaseModel): |
| 99 | """A PDF URL content part.""" |
no outgoing calls