CohereToolMessageV2¶
-
class
oci.generative_ai_inference.models.CohereToolMessageV2(**kwargs)¶ Bases:
oci.generative_ai_inference.models.cohere_message_v2.CohereMessageV2A message that represents a single chat dialog as TOOL role.
Attributes
ROLE_ASSISTANTstr(object=’’) -> str ROLE_SYSTEMstr(object=’’) -> str ROLE_TOOLstr(object=’’) -> str ROLE_USERstr(object=’’) -> str content[Required] Gets the content of this CohereMessageV2. role[Required] Gets the role of this CohereMessageV2. tool_call_id[Required] Gets the tool_call_id of this CohereToolMessageV2. Methods
__init__(**kwargs)Initializes a new CohereToolMessageV2 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_SYSTEM= 'SYSTEM'¶
-
ROLE_TOOL= 'TOOL'¶
-
ROLE_USER= 'USER'¶
-
__init__(**kwargs)¶ Initializes a new CohereToolMessageV2 object with values from keyword arguments. The default value of the
roleattribute of this class isTOOLand 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 CohereToolMessageV2. Allowed values for this property are: “ASSISTANT”, “USER”, “SYSTEM”, “TOOL”
- content (list[oci.generative_ai_inference.models.CohereContentV2]) – The value to assign to the content property of this CohereToolMessageV2.
- tool_call_id (str) – The value to assign to the tool_call_id property of this CohereToolMessageV2.
-
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
-
tool_call_id¶ [Required] Gets the tool_call_id of this CohereToolMessageV2. The id of the associated tool call that has provided the given content
Returns: The tool_call_id of this CohereToolMessageV2. Return type: str
-