Skip to content

Highlight

Source code in docs_src/capo_kendra/types/highlight.py
class Highlight(TypedDict, closed=True):
    begin_offset: "capo_kendra.types.integer.Integer"
    """<p>The zero-based location in the response string where the highlight starts.</p>"""
    end_offset: "capo_kendra.types.integer.Integer"
    """<p>The zero-based location in the response string where the highlight ends.</p>"""
    top_answer: "capo_kendra.types.boolean.Boolean"
    """<p>Indicates whether the response is the best response. True if this is the best response; otherwise, false.</p>"""
    type: NotRequired["capo_kendra.types.highlight_type.HighlightType"]
    """<p>The highlight type. </p>"""

begin_offset instance-attribute

begin_offset: Integer

The zero-based location in the response string where the highlight starts.

end_offset instance-attribute

end_offset: Integer

The zero-based location in the response string where the highlight ends.

top_answer instance-attribute

top_answer: Boolean

Indicates whether the response is the best response. True if this is the best response; otherwise, false.

type instance-attribute

type: NotRequired[HighlightType]

The highlight type.