Message

class oci.generative_ai_agent_runtime.models.Message(**kwargs)

Bases: object

The Message resource generated by the agent.

Attributes

ROLE_AGENT A constant which can be used with the role property of a Message.
ROLE_USER A constant which can be used with the role property of a Message.
content [Required] Gets the content of this Message.
role [Required] Gets the role of this Message.
time_created Gets the time_created of this Message.

Methods

__init__(**kwargs) Initializes a new Message object with values from keyword arguments.
ROLE_AGENT = 'AGENT'

A constant which can be used with the role property of a Message. This constant has a value of “AGENT”

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 Message object with values from keyword arguments. 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 Message. Allowed values for this property are: “USER”, “AGENT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • content (oci.generative_ai_agent_runtime.models.MessageContent) – The value to assign to the content property of this Message.
  • time_created (datetime) – The value to assign to the time_created property of this Message.
content

[Required] Gets the content of this Message.

Returns:The content of this Message.
Return type:oci.generative_ai_agent_runtime.models.MessageContent
role

[Required] Gets the role of this Message. The role of the sender of this message.

Allowed values for this property are: “USER”, “AGENT”, ‘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
time_created

Gets the time_created of this Message. The date and time that the message was created in the format of an RFC3339 datetime string.

Returns:The time_created of this Message.
Return type:datetime