SamplingMessageBuilder
DSL builder for constructing lists of SamplingMessage instances.
This builder creates a conversation history for LLM sampling requests.
Example:
messages {
user { "Hello!" }
assistant { "Hi! How can I help?" }
user { "What's 2+2?" }
}Content copied to clipboard
See also
Functions
Link copied to clipboard
Adds an assistant message with the specified content.
Link copied to clipboard
Adds an assistant message with simple text content.
Link copied to clipboard
Adds an assistant message with audio content.
Link copied to clipboard
Adds an assistant message with image content.
Link copied to clipboard
Adds an assistant message with text content using a DSL builder.
Link copied to clipboard
Adds a user message with the specified content.
Link copied to clipboard
Adds a user message with simple text content.
Link copied to clipboard
Adds a user message with audio content.
Link copied to clipboard
Adds a user message with image content.
Link copied to clipboard
Adds a user message with text content using a DSL builder.