ChatChoice

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

Bases: object

Represents a single instance of the chat response.

Methods:

__init__(**kwargs)

Initializes a new ChatChoice object with values from keyword arguments.

Attributes:

finish_reason

[Required] Gets the finish_reason of this ChatChoice.

grounding_metadata

Gets the grounding_metadata of this ChatChoice.

index

[Required] Gets the index of this ChatChoice.

logprobs

Gets the logprobs of this ChatChoice.

message

[Required] Gets the message of this ChatChoice.

service_tier

Gets the service_tier of this ChatChoice.

usage

Gets the usage of this ChatChoice.

__init__(**kwargs)

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

Parameters
property finish_reason

[Required] Gets the finish_reason of this ChatChoice. The reason why the model stopped generating tokens.

Stops if the model hits a natural stop point or a provided stop sequence. Returns the length if the tokens reach the specified maximum number of tokens.

Returns

The finish_reason of this ChatChoice.

Return type

str

property grounding_metadata

Gets the grounding_metadata of this ChatChoice.

Returns

The grounding_metadata of this ChatChoice.

Return type

oci.generative_ai_inference.models.GroundingMetadata

property index

[Required] Gets the index of this ChatChoice. The index of the chat.

Returns

The index of this ChatChoice.

Return type

int

property logprobs

Gets the logprobs of this ChatChoice.

Returns

The logprobs of this ChatChoice.

Return type

oci.generative_ai_inference.models.Logprobs

property message

[Required] Gets the message of this ChatChoice.

Returns

The message of this ChatChoice.

Return type

oci.generative_ai_inference.models.Message

property service_tier

Gets the service_tier of this ChatChoice. Specifies the processing type used for serving the request.

Returns

The service_tier of this ChatChoice.

Return type

str

property usage

Gets the usage of this ChatChoice.

Returns

The usage of this ChatChoice.

Return type

oci.generative_ai_inference.models.Usage