CreateMessageRequest class

Create message request for sampling

Constructors

CreateMessageRequest({required List<Message> messages, ModelPreferences? modelPreferences, String? systemPrompt, String? includeContext, int? maxTokens, double? temperature, List<String>? stopSequences, Map<String, dynamic>? metadata, List<SamplingTool>? tools, ToolChoice? toolChoice})
CreateMessageRequest.fromJson(Map<String, dynamic> json)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
includeContext → String?
final
maxTokens → int?
final
messages → List<Message>
final
metadata → Map<String, dynamic>?
final
modelPreferences → ModelPreferences?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stopSequences → List<String>?
final
systemPrompt → String?
final
temperature → double?
final
toolChoice → ToolChoice?
Spec 2025-11-25 (SEP-1577): controls tool selection. Only understood by 2025-11-25 peers.
final
tools → List<SamplingTool>?
Spec 2025-11-25 (SEP-1577): tools the client's LLM may call while generating this completion. Only understood by 2025-11-25 peers.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited