| @@ -75,10 +75,9 @@ namespace LLama | |||||
| /// </summary> | /// </summary> | ||||
| /// <param name="context"></param> | /// <param name="context"></param> | ||||
| /// <param name="logger"></param> | /// <param name="logger"></param> | ||||
| protected StatefulExecutorBase(LLamaContext context, ILogger? logger = null) | |||||
| protected StatefulExecutorBase(LLamaContext context) | |||||
| { | { | ||||
| Context = context; | Context = context; | ||||
| _logger = logger; | |||||
| _pastTokensCount = 0; | _pastTokensCount = 0; | ||||
| _consumedTokensCount = 0; | _consumedTokensCount = 0; | ||||
| _n_session_consumed = 0; | _n_session_consumed = 0; | ||||
| @@ -32,7 +32,7 @@ namespace LLama | |||||
| /// <param name="instructionPrefix"></param> | /// <param name="instructionPrefix"></param> | ||||
| /// <param name="instructionSuffix"></param> | /// <param name="instructionSuffix"></param> | ||||
| public InstructExecutor(LLamaContext context, ILogger logger = null!, string instructionPrefix = "\n\n### Instruction:\n\n", | public InstructExecutor(LLamaContext context, ILogger logger = null!, string instructionPrefix = "\n\n### Instruction:\n\n", | ||||
| string instructionSuffix = "\n\n### Response:\n\n") : base(context, logger) | |||||
| string instructionSuffix = "\n\n### Response:\n\n") : base(context) | |||||
| { | { | ||||
| _inp_pfx = Context.Tokenize(instructionPrefix, true); | _inp_pfx = Context.Tokenize(instructionPrefix, true); | ||||
| _inp_sfx = Context.Tokenize(instructionSuffix, false); | _inp_sfx = Context.Tokenize(instructionSuffix, false); | ||||
| @@ -27,7 +27,7 @@ namespace LLama | |||||
| /// </summary> | /// </summary> | ||||
| /// <param name="context"></param> | /// <param name="context"></param> | ||||
| /// <param name="logger"></param> | /// <param name="logger"></param> | ||||
| public InteractiveExecutor(LLamaContext context, ILogger logger = null!) : base(context, logger) | |||||
| public InteractiveExecutor(LLamaContext context) : base(context) | |||||
| { | { | ||||
| _llama_token_newline = NativeApi.llama_token_nl(Context.NativeHandle); | _llama_token_newline = NativeApi.llama_token_nl(Context.NativeHandle); | ||||
| } | } | ||||
| @@ -36,9 +36,8 @@ namespace LLama | |||||
| /// <param name="weights"></param> | /// <param name="weights"></param> | ||||
| /// <param name="params"></param> | /// <param name="params"></param> | ||||
| /// <param name="logger"></param> | /// <param name="logger"></param> | ||||
| public StatelessExecutor(LLamaWeights weights, IContextParams @params, ILogger logger = null!) | |||||
| public StatelessExecutor(LLamaWeights weights, IContextParams @params) | |||||
| { | { | ||||
| _logger = logger; | |||||
| _weights = weights; | _weights = weights; | ||||
| _params = @params; | _params = @params; | ||||
| @@ -81,11 +81,10 @@ namespace LLama | |||||
| /// Create a llama_context using this model | /// Create a llama_context using this model | ||||
| /// </summary> | /// </summary> | ||||
| /// <param name="params"></param> | /// <param name="params"></param> | ||||
| /// <param name="logger"></param> | |||||
| /// <returns></returns> | /// <returns></returns> | ||||
| public LLamaContext CreateContext(IContextParams @params, ILogger logger = default!) | |||||
| public LLamaContext CreateContext(IContextParams @params) | |||||
| { | { | ||||
| return new LLamaContext(this, @params, logger); | |||||
| return new LLamaContext(this, @params); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||