using LLama.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;
namespace LLama
{
///
/// A LLamaModel what could be reset. Note that using this class will consume about 10% more memories.
///
public class ResettableLLamaModel : LLamaModel
{
///
/// The initial state of the model
///
public State OriginalState { get; set; }
///
///
///
///
///
public ResettableLLamaModel(IModelParams Params, string encoding = "UTF-8") : base(Params, encoding)
{
OriginalState = GetState();
}
///
/// Reset the state to the initial state.
///
public void Reset()
{
LoadState(OriginalState);
}
///
public override void Dispose()
{
OriginalState.Dispose();
base.Dispose();
}
}
}