CohereMessageV2¶
-
class
oci.generative_ai_inference.models.CohereMessageV2(**kwargs)¶ Bases:
objectA message that represents a single message dialog.
Attributes
ROLE_ASSISTANTA constant which can be used with the role property of a CohereMessageV2. ROLE_SYSTEMA constant which can be used with the role property of a CohereMessageV2. ROLE_TOOLA constant which can be used with the role property of a CohereMessageV2. ROLE_USERA constant which can be used with the role property of a CohereMessageV2. content[Required] Gets the content of this CohereMessageV2. role[Required] Gets the role of this CohereMessageV2. Methods
__init__(**kwargs)Initializes a new CohereMessageV2 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 CohereMessageV2. This constant has a value of “ASSISTANT”
-
ROLE_SYSTEM= 'SYSTEM'¶ A constant which can be used with the role property of a CohereMessageV2. This constant has a value of “SYSTEM”
-
ROLE_TOOL= 'TOOL'¶ A constant which can be used with the role property of a CohereMessageV2. This constant has a value of “TOOL”
-
ROLE_USER= 'USER'¶ A constant which can be used with the role property of a CohereMessageV2. This constant has a value of “USER”
-
__init__(**kwargs)¶ Initializes a new CohereMessageV2 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 CohereMessageV2. Allowed values for this property are: “ASSISTANT”, “USER”, “SYSTEM”, “TOOL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- content (list[oci.generative_ai_inference.models.CohereContentV2]) – The value to assign to the content property of this CohereMessageV2.
-
content¶ [Required] Gets the content of this CohereMessageV2. Contents of the chat message.
Returns: The content of this CohereMessageV2. Return type: list[oci.generative_ai_inference.models.CohereContentV2]
-
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 CohereMessageV2. To identify who the message is coming from, a role is associated to each message.
Allowed values for this property are: “ASSISTANT”, “USER”, “SYSTEM”, “TOOL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The role of this CohereMessageV2. Return type: str
-