Message¶
-
class
oci.generative_ai_inference.models.
Message
(**kwargs)¶ Bases:
object
A message that represents a single chat dialog.
Attributes
ROLE_ASSISTANT
A constant which can be used with the role property of a Message. ROLE_SYSTEM
A constant which can be used with the role property of a Message. ROLE_USER
A constant which can be used with the role property of a Message. content
Gets the content of this Message. role
[Required] Gets the role of this Message. Methods
__init__
(**kwargs)Initializes a new Message 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. -
ROLE_ASSISTANT
= 'ASSISTANT'¶ A constant which can be used with the role property of a Message. This constant has a value of “ASSISTANT”
-
ROLE_SYSTEM
= 'SYSTEM'¶ A constant which can be used with the role property of a Message. This constant has a value of “SYSTEM”
-
ROLE_USER
= 'USER'¶ A constant which can be used with the role property of a Message. This constant has a value of “USER”
-
__init__
(**kwargs)¶ 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:
The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - role (str) – 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’.
- content (list[oci.generative_ai_inference.models.ChatContent]) – The value to assign to the content property of this Message.
-
content
¶ Gets the content of this Message. Contents of the chat message.
Returns: The content of this Message. Return type: list[oci.generative_ai_inference.models.ChatContent]
-
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.
-
role
¶ [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’.
Returns: The role of this Message. Return type: str
-