Interface IMultiTurnConversation
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
Represents a multi-turn conversation interface that extends IConversation with tool-calling, long-term memory, session persistence, and chat history management.
public interface IMultiTurnConversation : IConversation
- Inherited Members
Properties
- ChatHistory
The full chat history of this conversation (system, user, assistant, and tool messages).
- ContextRemainingSpace
Remaining token budget currently available in the context window.
- ContextSize
Total token context size for this conversation.
- MaximumRecallTokens
Maximum number of tokens recalled from Memory per turn.
Defaults to
ContextSize / 4. The effective value is automatically capped to at mostContextSize / 2.
- Memory
Long-term memory store used to recall relevant context across turns.
Assign an AgentMemory implementation to enable retrieval of relevant text partitions. Retrieved snippets are injected as hidden context up to MaximumRecallTokens.
- ToolPolicy
Per-turn tool-calling policy used by the conversation runtime.
Controls whether tools are allowed, required, disabled, or whether a specific tool must be used on the current turn.
- Tools
Registry of model-callable tools available to this conversation.
Register tools before the first user turn so they are advertised to the model. Tool invocation requires a model that supports tool calls.
Methods
- ClearHistory()
Clear the entire conversation: removes all messages and resets internal state.
Events
- AfterToolInvocation
Fired after a tool invocation finishes (or when it was cancelled/errored).
- BeforeToolInvocation
Fired before a tool invocation. Handlers may cancel the call.
- MemoryRecall
Fired when one or more memory partitions are recalled for this turn.
Subscribers may inspect the recalled content and optionally cancel injection by setting Cancel to
true.