CohereMessage

class oci.generative_ai_inference.models.CohereMessage(**kwargs)

Bases: object

An message that represents a single dialogue of chat

Attributes

ROLE_CHATBOT A constant which can be used with the role property of a CohereMessage.
ROLE_USER A constant which can be used with the role property of a CohereMessage.
message [Required] Gets the message of this CohereMessage.
role [Required] Gets the role of this CohereMessage.

Methods

__init__(**kwargs) Initializes a new CohereMessage object with values from keyword arguments.
ROLE_CHATBOT = 'CHATBOT'

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

ROLE_USER = 'USER'

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

__init__(**kwargs)

Initializes a new CohereMessage 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 CohereMessage. Allowed values for this property are: “CHATBOT”, “USER”
  • message (str) – The value to assign to the message property of this CohereMessage.
message

[Required] Gets the message of this CohereMessage. Contents of the chat message.

Returns:The message of this CohereMessage.
Return type:str
role

[Required] Gets the role of this CohereMessage. One of CHATBOT|USER to identify who the message is coming from.

Allowed values for this property are: “CHATBOT”, “USER”

Returns:The role of this CohereMessage.
Return type:str