GenericChatResponse¶
-
class
oci.generative_ai_inference.models.GenericChatResponse(**kwargs)¶ Bases:
oci.generative_ai_inference.models.base_chat_response.BaseChatResponseThe response for a chat conversation.
Attributes
API_FORMAT_COHEREstr(object=’’) -> str API_FORMAT_GENERICstr(object=’’) -> str api_format[Required] Gets the api_format of this BaseChatResponse. choices[Required] Gets the choices of this GenericChatResponse. time_created[Required] Gets the time_created of this GenericChatResponse. usageGets 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'¶
-
API_FORMAT_GENERIC= 'GENERIC'¶
-
__init__(**kwargs)¶ Initializes a new GenericChatResponse object with values from keyword arguments. The default value of the
api_formatattribute of this class isGENERICand 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”
- 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.
-
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”, ‘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
-
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.
-
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
-
usage¶ Gets the usage of this GenericChatResponse.
Returns: The usage of this GenericChatResponse. Return type: oci.generative_ai_inference.models.Usage
-