using LLama.Common; 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 byte[] OriginalState { get; set; } /// /// /// /// /// public ResettableLLamaModel(ModelParams Params, string encoding = "UTF-8") : base(Params, encoding) { OriginalState = GetStateData(); } /// /// Reset the state to the initial state. /// public void Reset() { LoadState(OriginalState); } } }