CohereCitationV2

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

Bases: object

A source reference or citation for a piece of content.

Attributes:

TYPE_PLAN

A constant which can be used with the type property of a CohereCitationV2.

TYPE_TEXT_CONTENT

A constant which can be used with the type property of a CohereCitationV2.

TYPE_THINKING_CONTENT

A constant which can be used with the type property of a CohereCitationV2.

content_index

Gets the content_index of this CohereCitationV2.

end

Gets the end of this CohereCitationV2.

sources

Gets the sources of this CohereCitationV2.

start

Gets the start of this CohereCitationV2.

text

Gets the text of this CohereCitationV2.

type

Gets the type of this CohereCitationV2.

Methods:

__init__(**kwargs)

Initializes a new CohereCitationV2 object with values from keyword arguments.

TYPE_PLAN = 'PLAN'

A constant which can be used with the type property of a CohereCitationV2. This constant has a value of “PLAN”

TYPE_TEXT_CONTENT = 'TEXT_CONTENT'

A constant which can be used with the type property of a CohereCitationV2. This constant has a value of “TEXT_CONTENT”

TYPE_THINKING_CONTENT = 'THINKING_CONTENT'

A constant which can be used with the type property of a CohereCitationV2. This constant has a value of “THINKING_CONTENT”

__init__(**kwargs)

Initializes a new CohereCitationV2 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 CohereCitationV2.

  • end (int) – The value to assign to the end property of this CohereCitationV2.

  • text (str) – The value to assign to the text property of this CohereCitationV2.

  • content_index (int) – The value to assign to the content_index property of this CohereCitationV2.

  • type (str) – The value to assign to the type property of this CohereCitationV2. Allowed values for this property are: “TEXT_CONTENT”, “THINKING_CONTENT”, “PLAN”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • sources (list[oci.generative_ai_inference.models.CohereCitationSourceV2]) – The value to assign to the sources property of this CohereCitationV2.

property content_index

Gets the content_index of this CohereCitationV2. Index of the content block in which this citation appears.

Returns

The content_index of this CohereCitationV2.

Return type

int

property end

Gets the end of this CohereCitationV2. End index of the cited snippet in the original source text.

Returns

The end of this CohereCitationV2.

Return type

int

property sources

Gets the sources of this CohereCitationV2. List of source objects for this citation.

Returns

The sources of this CohereCitationV2.

Return type

list[oci.generative_ai_inference.models.CohereCitationSourceV2]

property start

Gets the start of this CohereCitationV2. Start index of the cited snippet in the original source text.

Returns

The start of this CohereCitationV2.

Return type

int

property text

Gets the text of this CohereCitationV2. Text snippet that is being cited.

Returns

The text of this CohereCitationV2.

Return type

str

property type

Gets the type of this CohereCitationV2. The type of citation indicating what part of the response it is for.

Allowed values for this property are: “TEXT_CONTENT”, “THINKING_CONTENT”, “PLAN”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The type of this CohereCitationV2.

Return type

str