ToolMessage¶
- class oci.generative_ai_inference.models.ToolMessage(**kwargs)¶
Bases:
MessageRepresents a single instance of tool message.
Attributes:
A constant which can be used with the role property of a Message.
A constant which can be used with the role property of a Message.
A constant which can be used with the role property of a Message.
A constant which can be used with the role property of a Message.
A constant which can be used with the role property of a Message.
Gets the content of this Message.
[Required] Gets the role of this Message.
Gets the tool_call_id of this ToolMessage.
Methods:
__init__(**kwargs)Initializes a new ToolMessage 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 Message. This constant has a value of “ASSISTANT”
- ROLE_DEVELOPER = 'DEVELOPER'¶
A constant which can be used with the role property of a Message. This constant has a value of “DEVELOPER”
- ROLE_SYSTEM = 'SYSTEM'¶
A constant which can be used with the role property of a Message. This constant has a value of “SYSTEM”
- ROLE_TOOL = 'TOOL'¶
A constant which can be used with the role property of a Message. This constant has a value of “TOOL”
- ROLE_USER = 'USER'¶
A constant which can be used with the role property of a Message. This constant has a value of “USER”
- __init__(**kwargs)¶
Initializes a new ToolMessage 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 ToolMessage. 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 ToolMessage.
tool_call_id (str) – The value to assign to the tool_call_id property of this ToolMessage.
- property content¶
Gets the content of this Message. Contents of the chat message.
- Returns
The content of this Message.
- 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 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
- property tool_call_id¶
Gets the tool_call_id of this ToolMessage. Tool call that this message is responding to. The ID is the unique string generated by the model.
- Returns
The tool_call_id of this ToolMessage.
- Return type
str