TextSegment¶
Structure Class¶
TextSegment
dataclass
¶
Provides information about a text extract in a chat response that can be attributed to a source document.
Attributes¶
begin_offset
class-attribute
instance-attribute
¶
begin_offset: int | None = None
The zero-based location in the response string where the source attribution starts.
end_offset
class-attribute
instance-attribute
¶
end_offset: int | None = None
The zero-based location in the response string where the source attribution ends.
media_id
class-attribute
instance-attribute
¶
media_id: str | None = None
The identifier of the media object associated with the text segment in the source attribution.
media_mime_type
class-attribute
instance-attribute
¶
media_mime_type: str | None = None
The MIME type (image/png) of the media object associated with the text segment in the source attribution.
snippet_excerpt
class-attribute
instance-attribute
¶
snippet_excerpt: SnippetExcerpt | None = None
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
source_details
class-attribute
instance-attribute
¶
source_details: SourceDetails | None = None
Source information for a segment of extracted text, including its media type.