ruạṛ
a ���f� � @ s8 d dl mZmZmZ d dlmZ eG dd� de��ZdS )� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s| e Zd ZdZdZdZdZdd� Zedd� �Z e d d � �Zejdd � �Ze dd � �Z e jdd � �Z dd� Zdd� Zdd� ZdS )�Messagez9 A message that represents a single chat dialog. �SYSTEM�USER� ASSISTANTc K s( ddd�| _ ddd�| _d| _d| _dS )a- Initializes a new Message object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: * :class:`~oci.generative_ai_inference.models.SystemMessage` * :class:`~oci.generative_ai_inference.models.AssistantMessage` * :class:`~oci.generative_ai_inference.models.UserMessage` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param role: The value to assign to the role property of this Message. Allowed values for this property are: "SYSTEM", "USER", "ASSISTANT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type role: str :param content: The value to assign to the content property of this Message. :type content: list[oci.generative_ai_inference.models.ChatContent] �strzlist[ChatContent])�role�contentr r N)Z swagger_typesZ attribute_map�_role�_content)�self�kwargs� r �N/usr/lib/python3.9/site-packages/oci/generative_ai_inference/models/message.py�__init__ s ��zMessage.__init__c C s4 | d }|dkrdS |dkr dS |dkr,dS dS d S ) z� Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype. r r Z SystemMessager ZAssistantMessager ZUserMessager Nr )Zobject_dictionary�typer r r �get_subtypeA s zMessage.get_subtypec C s | j S )a} **[Required]** Gets the role of this Message. Indicates who is writing the current chat message. Allowed values for this property are: "SYSTEM", "USER", "ASSISTANT", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :return: The role of this Message. :rtype: str )r �r r r r r T s zMessage.rolec C s g d�}t ||�sd}|| _dS )z� Sets the role of this Message. Indicates who is writing the current chat message. :param role: The role of this Message. :type: str )r r r ZUNKNOWN_ENUM_VALUEN)r r )r r Zallowed_valuesr r r r c s c C s | j S )z� Gets the content of this Message. Contents of the chat message. :return: The content of this Message. :rtype: list[oci.generative_ai_inference.models.ChatContent] �r r r r r r r s zMessage.contentc C s || _ dS )z� Sets the content of this Message. Contents of the chat message. :param content: The content of this Message. :type: list[oci.generative_ai_inference.models.ChatContent] Nr )r r r r r r ~ s c C s t | �S �N)r r r r r �__repr__� s zMessage.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__� s zMessage.__eq__c C s | |k S r r r r r r �__ne__� s zMessage.__ne__N)�__name__� __module__�__qualname__�__doc__ZROLE_SYSTEMZ ROLE_USERZROLE_ASSISTANTr �staticmethodr �propertyr �setterr r r r r r r r r s$ # r N)Zoci.utilr r r Zoci.decoratorsr �objectr r r r r �<module> s
cải xoăn