CohereToolMessage¶
-
class
oci.generative_ai_inference.models.
CohereToolMessage
(**kwargs)¶ Bases:
oci.generative_ai_inference.models.cohere_message.CohereMessage
A message that represents a single chat dialog as TOOL role.
Attributes
ROLE_CHATBOT
str(object=’’) -> str ROLE_SYSTEM
str(object=’’) -> str ROLE_TOOL
str(object=’’) -> str ROLE_USER
str(object=’’) -> str role
[Required] Gets the role of this CohereMessage. tool_results
[Required] Gets the tool_results of this CohereToolMessage. Methods
__init__
(**kwargs)Initializes a new CohereToolMessage 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_CHATBOT
= 'CHATBOT'¶
-
ROLE_SYSTEM
= 'SYSTEM'¶
-
ROLE_TOOL
= 'TOOL'¶
-
ROLE_USER
= 'USER'¶
-
__init__
(**kwargs)¶ Initializes a new CohereToolMessage object with values from keyword arguments. The default value of the
role
attribute of this class isTOOL
and 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 CohereToolMessage. Allowed values for this property are: “CHATBOT”, “USER”, “SYSTEM”, “TOOL”
- tool_results (list[oci.generative_ai_inference.models.CohereToolResult]) – The value to assign to the tool_results property of this CohereToolMessage.
-
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 CohereMessage. To identify who the message is coming from, a role is associated to each message.
Allowed values for this property are: “CHATBOT”, “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 CohereMessage. Return type: str
-
tool_results
¶ [Required] Gets the tool_results of this CohereToolMessage. A list of results from invoking tools recommended by the model in the previous chat turn.
Returns: The tool_results of this CohereToolMessage. Return type: list[oci.generative_ai_inference.models.CohereToolResult]
-