SessionState class

Constructors

SessionState({required String id, DateTime? startTime, List<SessionMessage>? messages, int inputTokens = 0, int outputTokens = 0, double cost = 0.0, String? activeModel, String? activeProvider, bool isStreaming = false})
SessionState.fromJson(Map<String, dynamic> json)
factory

Properties

activeModel ↔ String?
getter/setter pair
activeProvider ↔ String?
getter/setter pair
cost ↔ double
getter/setter pair
elapsed → Duration
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
inputTokens ↔ int
getter/setter pair
isStreaming ↔ bool
getter/setter pair
messageCount → int
no setter
messages → List<SessionMessage>
final
outputTokens ↔ int
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startTime → DateTime
final
totalTokens → int
no setter

Methods

addMessage(SessionMessage message) → void
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
updateTokens({int? input, int? output, double? addCost}) → void

Operators

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