GenericChatResponse

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

Bases: BaseChatResponse

The response for a chat conversation.

Attributes:

API_FORMAT_COHERE

A constant which can be used with the api_format property of a BaseChatResponse.

API_FORMAT_COHEREV2

A constant which can be used with the api_format property of a BaseChatResponse.

API_FORMAT_GENERIC

A constant which can be used with the api_format property of a BaseChatResponse.

api_format

[Required] Gets the api_format of this BaseChatResponse.

choices

[Required] Gets the choices of this GenericChatResponse.

service_tier

Gets the service_tier of this GenericChatResponse.

time_created

[Required] Gets the time_created of this GenericChatResponse.

usage

Gets the usage of this GenericChatResponse.

Methods:

__init__(**kwargs)

Initializes a new GenericChatResponse object with values from keyword arguments.

get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

API_FORMAT_COHERE = 'COHERE'

A constant which can be used with the api_format property of a BaseChatResponse. This constant has a value of “COHERE”

API_FORMAT_COHEREV2 = 'COHEREV2'

A constant which can be used with the api_format property of a BaseChatResponse. This constant has a value of “COHEREV2”

API_FORMAT_GENERIC = 'GENERIC'

A constant which can be used with the api_format property of a BaseChatResponse. This constant has a value of “GENERIC”

__init__(**kwargs)

Initializes a new GenericChatResponse object with values from keyword arguments. The default value of the api_format attribute of this class is GENERIC and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • api_format (str) – The value to assign to the api_format property of this GenericChatResponse. Allowed values for this property are: “COHERE”, “GENERIC”, “COHEREV2”

  • time_created (datetime) – The value to assign to the time_created property of this GenericChatResponse.

  • choices (list[oci.generative_ai_inference.models.ChatChoice]) – The value to assign to the choices property of this GenericChatResponse.

  • usage (oci.generative_ai_inference.models.Usage) – The value to assign to the usage property of this GenericChatResponse.

  • service_tier (str) – The value to assign to the service_tier property of this GenericChatResponse.

property api_format

[Required] Gets the api_format of this BaseChatResponse. The API format for the model’s response.

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

Returns

The api_format of this BaseChatResponse.

Return type

str

property choices

[Required] Gets the choices of this GenericChatResponse. A list of generated texts. Can be more than one if n is greater than 1.

Returns

The choices of this GenericChatResponse.

Return type

list[oci.generative_ai_inference.models.ChatChoice]

static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

property service_tier

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

Returns

The service_tier of this GenericChatResponse.

Return type

str

property time_created

[Required] Gets the time_created of this GenericChatResponse. The Unix timestamp (in seconds) of when the response text was generated.

Returns

The time_created of this GenericChatResponse.

Return type

datetime

property usage

Gets the usage of this GenericChatResponse.

Returns

The usage of this GenericChatResponse.

Return type

oci.generative_ai_inference.models.Usage