ConversationService class
Manages conversation persistence, history, forking, and export.
Constructors
- ConversationService({String? sessionsDir})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
deleteConversation(
String sessionId) → Future< bool> - Delete a conversation.
-
exportConversation(
String sessionId, {ExportFormat format = ExportFormat.markdown}) → Future< String> - Export a conversation to a given format.
-
forkConversation(
{required String parentSessionId, required int atMessageIndex, String? reason}) → Future< String> - Fork a conversation at a specific message index.
-
getStats(
) → Future< ConversationStats> - Get aggregate stats across all conversations.
-
listConversations(
{int? limit, int offset = 0, String? searchQuery}) → Future< List< ConversationSummary> > - List all conversations, newest first.
-
loadConversation(
String sessionId) → Future< List< Map< ?>String, dynamic> > - Load a conversation by session ID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveConversation(
{required String sessionId, required List< Map< messages, required String model, required List<String, dynamic> >ConversationTurn> turns, String? title}) → Future<void> - Save conversation state.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited