Skip to content

message ¤

Message definition for the operators.

Classes:

Name Description
Message

Represents a message in the chat.

MessageRole

Message role enum for the Message class to indicate the role of the message in the chat.

Message ¤

Bases: BaseModel

Represents a message in the chat.

Parameters:

Name Type Description Default
message

The message string

required
role

The role of the message in the chat

required

Attributes:

Name Type Description
message str

The message string

role MessageRole

The role of the message in the chat

MessageRole ¤

Bases: str, Enum

Message role enum for the Message class to indicate the role of the message in the chat.

Attributes:

Name Type Description
system str

The message is the system message, usually used as the first message in the chat.

user str

Every message that is sent by the user.

assistant str

Every message that is sent by the assistant.

function str

Every message that is sent by the assistant that is a function call.