CohereAssistantMessageV2¶
- class oci.generative_ai_inference.models.CohereAssistantMessageV2(**kwargs)¶
Bases:
CohereMessageV2A message that represents a single chat dialog as CHATBOT role.
Attributes:
A constant which can be used with the role property of a CohereMessageV2.
A constant which can be used with the role property of a CohereMessageV2.
A constant which can be used with the role property of a CohereMessageV2.
A constant which can be used with the role property of a CohereMessageV2.
Gets the citations of this CohereAssistantMessageV2.
[Required] Gets the content of this CohereMessageV2.
[Required] Gets the role of this CohereMessageV2.
Gets the tool_calls of this CohereAssistantMessageV2.
Gets the tool_plan of this CohereAssistantMessageV2.
Methods:
__init__(**kwargs)Initializes a new CohereAssistantMessageV2 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 CohereAssistantMessageV2 object with values from keyword arguments. The default value of the
roleattribute of this class isASSISTANTand 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 CohereAssistantMessageV2. 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 CohereAssistantMessageV2.
tool_plan (str) – The value to assign to the tool_plan property of this CohereAssistantMessageV2.
tool_calls (list[oci.generative_ai_inference.models.CohereToolCallV2]) – The value to assign to the tool_calls property of this CohereAssistantMessageV2.
citations (list[oci.generative_ai_inference.models.CohereCitationV2]) – The value to assign to the citations property of this CohereAssistantMessageV2.
- property citations¶
Gets the citations of this CohereAssistantMessageV2. Cohere citations
- Returns
The citations of this CohereAssistantMessageV2.
- Return type
- property content¶
[Required] Gets the content of this CohereMessageV2. Contents of the chat message.
- Returns
The content of this CohereMessageV2.
- Return type
- 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.
- property 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
- property tool_calls¶
Gets the tool_calls of this CohereAssistantMessageV2. A list of tool calls generated by the model.
- Returns
The tool_calls of this CohereAssistantMessageV2.
- Return type
- property tool_plan¶
Gets the tool_plan of this CohereAssistantMessageV2. A chain-of-thought style reflection and plan that the model generates when working with Tools.
- Returns
The tool_plan of this CohereAssistantMessageV2.
- Return type
str