ChatRequest class

What every broker call boils down to. system is the persistent instruction; messages is the turn history (oldest first). Both complete* and chat* build the same wire payload — complete* is just chat* with one user message.

Annotations

Constructors

ChatRequest({required String system, required List<AiMessage> messages, double temperature = 0.3, int maxTokens = 2048})
const
ChatRequest.single({required String system, required String user, double temperature = 0.3, int maxTokens = 2048})
Convenience for the single-shot case.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
maxTokens int
final
messages List<AiMessage>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
system String
final
temperature double
final

Methods

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

Operators

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