ConversationSession class
Explicit, identifiable abstraction for a sequence of related requests.
Constructors
-
ConversationSession({required String sessionId, required DateTime createdAt, required DateTime updatedAt, List<
SessionMessage> history = const []}) -
const
- ConversationSession.create({String? sessionId, DateTime? now})
-
Creates a new empty conversation session.
factory
Properties
- createdAt → DateTime
-
When the session was started.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
history
→ List<
SessionMessage> -
Message sequence history.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String
-
Unique session UUID or identifier.
final
- updatedAt → DateTime
-
When the session was last updated.
final
Methods
-
addTurn(
{required String userPrompt, required String assistantResponse, DateTime? now}) → ConversationSession -
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