DocumentRank

class oci.generative_ai_inference.models.DocumentRank(**kwargs)

Bases: object

An object that contains a relevance score, an index and the text for a document.

Methods:

__init__(**kwargs)

Initializes a new DocumentRank object with values from keyword arguments.

Attributes:

document

Gets the document of this DocumentRank.

index

Gets the index of this DocumentRank.

relevance_score

Gets the relevance_score of this DocumentRank.

__init__(**kwargs)

Initializes a new DocumentRank object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • index (int) – The value to assign to the index property of this DocumentRank.

  • relevance_score (float) – The value to assign to the relevance_score property of this DocumentRank.

  • document (oci.generative_ai_inference.models.Document) – The value to assign to the document property of this DocumentRank.

property document

Gets the document of this DocumentRank.

Returns

The document of this DocumentRank.

Return type

oci.generative_ai_inference.models.Document

property index

Gets the index of this DocumentRank. Index of the document in documents array.

Returns

The index of this DocumentRank.

Return type

int

property relevance_score

Gets the relevance_score of this DocumentRank. The relevance score for the document at that index.

Returns

The relevance_score of this DocumentRank.

Return type

float