Message Types
Standardized message objects used to maintain conversation state across different LLM providers and graph nodes.
maticlib.messages.message.BaseMessage
Base class for all message types in the library.
Acts as a container for message content and metadata about the message role.
Attributes:
| Name | Type | Description |
|---|---|---|
content |
str
|
The text content of the message. |
message_type |
MessageType
|
The enum type of the message (System, Human, AI). |
Initializes a new message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str | None
|
The string content of the message. |
required |
message_type
|
str | int | MessageType
|
The role/type of the message. |
required |
Raises:
| Type | Description |
|---|---|
TypeError
|
If content is not a string or if message_type handling fails. |