langchain.retrievers.kendra.Highlight¶

class langchain.retrievers.kendra.Highlight(*, BeginOffset: int, EndOffset: int, TopAnswer: Optional[bool] = None, Type: Optional[str] = None, **extra_data: Any)[source]¶

Bases: BaseModel

Represents the information that can be used to highlight key words in the excerpt.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param BeginOffset: int [Required]¶

The zero-based location in the excerpt where the highlight starts.

param EndOffset: int [Required]¶

The zero-based location in the excerpt where the highlight ends.

param TopAnswer: Optional[bool] = None¶

Indicates whether the result is the best one.

param Type: Optional[str] = None¶

The highlight type: STANDARD or THESAURUS_SYNONYM.