A text content part.
| 2 | from typing import Literal, List, Union, Optional |
| 3 | |
| 4 | class ContentPartText(BaseModel): |
| 5 | """A text content part.""" |
| 6 | text: str = Field(description="The text of the content part.") # type: ignore |
| 7 | type: Literal['text'] = Field(default='text', description="The type of the content part.") # type: ignore |
| 8 | |
| 9 | def __str__(self) -> str: |
| 10 | return str(self.text) |
| 11 | |
| 12 | def __repr__(self) -> str: |
| 13 | return f'ContentPartText(text={repr(self.text)})' |
| 14 | |
| 15 | SupportedImageMediaType = Literal['image/jpeg', 'image/png', 'image/gif', 'image/webp'] |
| 16 | SupportedAudioMediaType = Literal['audio/mpeg', 'audio/wav', 'audio/ogg', 'audio/mp3', 'audio/m4a', 'audio/flac'] |
no outgoing calls