Class InMemoryConversationStore
In-memory conversation store — suitable for unit tests and demos.
Replace with the redb-backed implementation in redb.Route.Llm.Storage.Redb.
public sealed class InMemoryConversationStore : IConversationStore
Inheritance
Implements
Methods
AppendAsync(string, string?, LlmMessage, ConversationMessageMeta, IExchange?, CancellationToken)
Appends message as a child of parentId
public Task<string> AppendAsync(string conversationId, string? parentId, LlmMessage message, ConversationMessageMeta meta, IExchange? exchange = null, CancellationToken ct = default)
LoadPathAsync(string, string?, IExchange?, CancellationToken)
Loads the linear path from the conversation root to leafId.
public Task<IReadOnlyList<ConversationMessage>> LoadPathAsync(string conversationId, string? leafId = null, IExchange? exchange = null, CancellationToken ct = default)
LoadTreeAsync(string, IExchange?, CancellationToken)
Loads the full tree for the conversation (every branch). Used for
public Task<IReadOnlyList<ConversationMessage>> LoadTreeAsync(string conversationId, IExchange? exchange = null, CancellationToken ct = default)