Table of Contents

Method ClearHistory

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

ClearHistory()

Clears the conversation history, resetting the multi-turn state.

public void ClearHistory()

Examples

using var chat = new RagChat(ragEngine, chatModel);

await chat.SubmitAsync("What is RAG?");
await chat.SubmitAsync("Tell me more.");

// Reset conversation state for a new topic
chat.ClearHistory();
await chat.SubmitAsync("What are embeddings?");

Remarks

This does not affect the Engine or its data sources. After clearing, the next question is treated as the start of a new conversation.

Share