AiThreadMessage class

Constructors

AiThreadMessage({required String id, required String threadId, required String role, List<AiThreadPart> content = const [], String? model, String? provider, int? tokensIn, int? tokensOut, double? costUsd, String status = 'complete', String? error, Map<String, dynamic> metadata = const {}, DateTime? createdAt, Map<String, dynamic> raw = const {}})
const
AiThreadMessage.fromJson(Map<String, dynamic> j)
factory

Properties

content → List<AiThreadPart>
final
costUsd → double?
final
createdAt → DateTime?
final
error → String?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
metadata → Map<String, dynamic>
final
model → String?
final
provider → String?
final
raw → Map<String, dynamic>
final
role → String
system, user, assistant or tool.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → String
streaming while a run writes it (partial text), complete, or error if the run failed.
final
text → String
The text parts joined.
no setter
threadId → String
final
tokensIn → int?
final
tokensOut → int?
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