IChatInteractionStore
Interfaces · AiDotNet.Agentic.Pipeline
Stores recorded chat interactions (request key → response) so model calls can be deterministically replayed later without invoking any model. This is the backing store for record/replay — the foundation for reproducible agent runs, cheap re-runs, time-travel debugging, and offline tests.
Known implementations: InMemoryChatInteractionStore, JsonFileChatInteractionStore
For Beginners
A cache of “for this exact request, the model said this”. Record once against a real model, then replay from the store forever — same inputs, same outputs, no API calls.
Properties
| Property | Summary |
|---|---|
int Count { get; } |
Gets the number of recorded interactions. |
Methods
| Method | Summary |
|---|---|
bool TryGet(string key, ChatResponse response) |
Tries to get a recorded response for a request key. |
void Save(string key, ChatResponse response) |
Saves the response for a request key (overwriting any existing entry). |