Citation

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

Bases: object

A section of the generated response which cites the documents that were used for generating the response.

Methods

__init__(**kwargs) Initializes a new Citation object with values from keyword arguments.

Attributes

document_ids [Required] Gets the document_ids of this Citation.
end [Required] Gets the end of this Citation.
start [Required] Gets the start of this Citation.
text [Required] Gets the text of this Citation.
__init__(**kwargs)

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

Parameters:
  • start (int) – The value to assign to the start property of this Citation.
  • end (int) – The value to assign to the end property of this Citation.
  • text (str) – The value to assign to the text property of this Citation.
  • document_ids (list[str]) – The value to assign to the document_ids property of this Citation.
document_ids

[Required] Gets the document_ids of this Citation. Identifiers for the documents cited in the current generated response.

Returns:The document_ids of this Citation.
Return type:list[str]
end

[Required] Gets the end of this Citation. Counting from zero, the index of the text that the citation ends after.

Returns:The end of this Citation.
Return type:int
start

[Required] Gets the start of this Citation. Counting from zero, the index of the text where the citation starts.

Returns:The start of this Citation.
Return type:int
text

[Required] Gets the text of this Citation. The text of the citation.

Returns:The text of this Citation.
Return type:str