Skip to main content

PromptMessage

Chat message structures and role enumerations for LLM conversations.

Overview

Message types define chat messages with roles and multi-modal content arrays. These are the building blocks for all prompt conversations in the Adaline SDK.

MessageRole

See the dedicated MessageRole page for full documentation. Message role enumeration for chat messages.
MessageRole is a str enum with the following values: Example:

PromptMessage

Chat message with role and multi-modal content for LLM conversations.

Fields

role
MessageRole
required
The message sender role. One of: "system", "user", "assistant", "tool".
content
list[MessageContent]
required
Array of content items. See MessageContent.

Examples

Simple Text Message

System Message

Multi-Modal Message

Conversation History

Tool Call Sequence


Using with Deployments


Helper Functions


Serialization

All autogen models support to_dict(), to_json(), from_dict(), and from_json() for serialization.

JSON Examples

Simple

With Image

Tool Call