langchain.retrievers.kendra.ResultItem¶

class langchain.retrievers.kendra.ResultItem(*, Id: Optional[str] = None, DocumentId: Optional[str] = None, DocumentURI: Optional[str] = None, DocumentAttributes: Optional[List[DocumentAttribute]] = [], **extra_data: Any)[source]¶

Bases: BaseModel, ABC

Abstract class that represents a result item.

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 DocumentAttributes: Optional[List[langchain.retrievers.kendra.DocumentAttribute]] = []¶

The document attributes.

param DocumentId: Optional[str] = None¶

The document ID.

param DocumentURI: Optional[str] = None¶

The document URI.

param Id: Optional[str] = None¶

The ID of the item.

get_additional_metadata() dict[source]¶

Document additional metadata dict. This returns any extra metadata except these values: [‘source’, ‘title’, ‘excerpt’ and ‘document_attributes’].

get_document_attributes_dict() dict[source]¶
abstract get_excerpt() str[source]¶

Document excerpt or passage.

abstract get_title() str[source]¶

Document title.

to_doc() Document[source]¶