ConversationLifecycle class
Callbacks for conversation-level lifecycle events.
A conversation is a sequence of turns within a session. Multiple conversations can occur per session (e.g., when using /clear).
Constructors
-
ConversationLifecycle({Future<
void> onConversationStart(ConversationStartedEvent event)?, Future<void> onTurnStart(TurnStartedEvent event)?, Future<void> onTurnEnd(TurnEndedEvent event)?, Future<void> onConversationEnd(ConversationEndedEvent event)?, Future<void> onCompaction(CompactionEvent event)?}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onCompaction
→ Future<
void> Function(CompactionEvent event)? -
Fired when context compaction occurs (message history trimming).
final
-
onConversationEnd
→ Future<
void> Function(ConversationEndedEvent event)? -
Fired when the conversation ends.
final
-
onConversationStart
→ Future<
void> Function(ConversationStartedEvent event)? -
Fired when a new conversation begins.
final
-
onTurnEnd
→ Future<
void> Function(TurnEndedEvent event)? -
Fired after each turn completes (response sent to user).
final
-
onTurnStart
→ Future<
void> Function(TurnStartedEvent event)? -
Fired at the beginning of each user turn.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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