Property ClearHistoryBeforeExecution
ClearHistoryBeforeExecution
Gets or sets a value indicating whether to clear conversation history before execution.
public bool ClearHistoryBeforeExecution { get; set; }
Property Value
Examples
Stateless execution:
using LMKit.Model;
using LMKit.Agents;
using var model = new LM("path/to/model.gguf");
var agent = new Agent(model);
// First interaction
agent.Run("My name is Alice.");
// Clear history for a fresh start
var freshOptions = new AgentExecutionOptions
{
ClearHistoryBeforeExecution = true
};
// This won't remember the name
var result = agent.Run("What is my name?", freshOptions);
// Agent will not know the name was Alice