File manager - Edit - /usr/lib/mysqlsh/lib/python3.9/site-packages/oci/generative_ai_inference/models/generic_chat_response.py
Back
# coding: utf-8 # Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20231130 from .base_chat_response import BaseChatResponse from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class GenericChatResponse(BaseChatResponse): """ The response for a chat conversation. """ def __init__(self, **kwargs): """ Initializes a new GenericChatResponse object with values from keyword arguments. The default value of the :py:attr:`~oci.generative_ai_inference.models.GenericChatResponse.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): :param api_format: The value to assign to the api_format property of this GenericChatResponse. Allowed values for this property are: "COHERE", "GENERIC", "COHEREV2" :type api_format: str :param time_created: The value to assign to the time_created property of this GenericChatResponse. :type time_created: datetime :param choices: The value to assign to the choices property of this GenericChatResponse. :type choices: list[oci.generative_ai_inference.models.ChatChoice] :param usage: The value to assign to the usage property of this GenericChatResponse. :type usage: oci.generative_ai_inference.models.Usage :param service_tier: The value to assign to the service_tier property of this GenericChatResponse. :type service_tier: str """ self.swagger_types = { 'api_format': 'str', 'time_created': 'datetime', 'choices': 'list[ChatChoice]', 'usage': 'Usage', 'service_tier': 'str' } self.attribute_map = { 'api_format': 'apiFormat', 'time_created': 'timeCreated', 'choices': 'choices', 'usage': 'usage', 'service_tier': 'serviceTier' } self._api_format = None self._time_created = None self._choices = None self._usage = None self._service_tier = None self._api_format = 'GENERIC' @property def time_created(self): """ **[Required]** Gets the time_created of this GenericChatResponse. The Unix timestamp (in seconds) of when the response text was generated. :return: The time_created of this GenericChatResponse. :rtype: datetime """ return self._time_created @time_created.setter def time_created(self, time_created): """ Sets the time_created of this GenericChatResponse. The Unix timestamp (in seconds) of when the response text was generated. :param time_created: The time_created of this GenericChatResponse. :type: datetime """ self._time_created = time_created @property def choices(self): """ **[Required]** Gets the choices of this GenericChatResponse. A list of generated texts. Can be more than one if n is greater than 1. :return: The choices of this GenericChatResponse. :rtype: list[oci.generative_ai_inference.models.ChatChoice] """ return self._choices @choices.setter def choices(self, choices): """ Sets the choices of this GenericChatResponse. A list of generated texts. Can be more than one if n is greater than 1. :param choices: The choices of this GenericChatResponse. :type: list[oci.generative_ai_inference.models.ChatChoice] """ self._choices = choices @property def usage(self): """ Gets the usage of this GenericChatResponse. :return: The usage of this GenericChatResponse. :rtype: oci.generative_ai_inference.models.Usage """ return self._usage @usage.setter def usage(self, usage): """ Sets the usage of this GenericChatResponse. :param usage: The usage of this GenericChatResponse. :type: oci.generative_ai_inference.models.Usage """ self._usage = usage @property def service_tier(self): """ Gets the service_tier of this GenericChatResponse. Specifies the processing type used for serving the request. :return: The service_tier of this GenericChatResponse. :rtype: str """ return self._service_tier @service_tier.setter def service_tier(self, service_tier): """ Sets the service_tier of this GenericChatResponse. Specifies the processing type used for serving the request. :param service_tier: The service_tier of this GenericChatResponse. :type: str """ self._service_tier = service_tier def __repr__(self): return formatted_flat_dict(self) def __eq__(self, other): if other is None: return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other
| ver. 1.4 |
Github
|
.
| PHP 8.2.32 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings