UserMessage¶
-
class
oci.generative_ai_inference.models.UserMessage(**kwargs)¶ Bases:
oci.generative_ai_inference.models.message.MessageRepresents a single instance of user message.
Attributes
ROLE_ASSISTANTstr(object=’’) -> str ROLE_DEVELOPERstr(object=’’) -> str ROLE_SYSTEMstr(object=’’) -> str ROLE_TOOLstr(object=’’) -> str ROLE_USERstr(object=’’) -> str contentGets the content of this Message. nameGets the name of this UserMessage. role[Required] Gets the role of this Message. Methods
__init__(**kwargs)Initializes a new UserMessage 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'¶
-
ROLE_DEVELOPER= 'DEVELOPER'¶
-
ROLE_SYSTEM= 'SYSTEM'¶
-
ROLE_TOOL= 'TOOL'¶
-
ROLE_USER= 'USER'¶
-
__init__(**kwargs)¶ Initializes a new UserMessage object with values from keyword arguments. The default value of the
roleattribute of this class isUSERand it should not be changed. 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 UserMessage. Allowed values for this property are: “SYSTEM”, “ASSISTANT”, “USER”, “TOOL”, “DEVELOPER”
- content (list[oci.generative_ai_inference.models.ChatContent]) – The value to assign to the content property of this UserMessage.
- name (str) – The value to assign to the name property of this UserMessage.
-
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.
-
name¶ Gets the name of this UserMessage. An optional name for the participant. Provides the model information to differentiate between participants of the same role.
Returns: The name of this UserMessage. Return type: str
-
role¶ [Required] Gets the role of this Message. Indicates who is writing the current chat message.
Allowed values for this property are: “SYSTEM”, “ASSISTANT”, “USER”, “TOOL”, “DEVELOPER”, ‘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
-