content
¶
Audio
¶
Bases: ContentPart
Represent an audio in the message.
Source code in src/appl/core/types/content.py
from_file
classmethod
¶
Construct an audio prompt from an audio file.
Source code in src/appl/core/types/content.py
from_url
classmethod
¶
Construct an audio prompt from an audio URL.
Source code in src/appl/core/types/content.py
get_dict
¶
ContentList
¶
Bases: BaseModel
Represent a list of contents containing text, images and audio.
Source code in src/appl/core/types/content.py
append
¶
append(content: ContentPart) -> None
Append a content to the list.
If the last content is a string, it will be concatenated with the new content.
Source code in src/appl/core/types/content.py
extend
¶
extend(contents: list[ContentPart]) -> None
get_contents
¶
ContentPart
¶
Image
¶
Bases: ContentPart
Represent an image in the message.
See the guide for more information about the detail level.
Source code in src/appl/core/types/content.py
from_file
classmethod
¶
Construct an image prompt from an image file.
from_image
classmethod
¶
Construct an image prompt from a PIL ImageFile.
Source code in src/appl/core/types/content.py
get_dict
¶
TextContent
¶
TextContent(text: String)
Bases: ContentPart
Represent a text in the message.