Revert LLamasSharp project changes

This commit is contained in:
sa_ddam213 2023-10-20 08:29:26 +13:00
parent b4b4000342
commit 4ec9aed47a
No known key found for this signature in database
5 changed files with 6 additions and 9 deletions

View File

@ -75,10 +75,9 @@ namespace LLama
/// </summary>
/// <param name="context"></param>
/// <param name="logger"></param>
protected StatefulExecutorBase(LLamaContext context, ILogger? logger = null)
protected StatefulExecutorBase(LLamaContext context)
{
Context = context;
_logger = logger;
_pastTokensCount = 0;
_consumedTokensCount = 0;
_n_session_consumed = 0;

View File

@ -32,7 +32,7 @@ namespace LLama
/// <param name="instructionPrefix"></param>
/// <param name="instructionSuffix"></param>
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_sfx = Context.Tokenize(instructionSuffix, false);

View File

@ -27,7 +27,7 @@ namespace LLama
/// </summary>
/// <param name="context"></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);
}

View File

@ -36,9 +36,8 @@ namespace LLama
/// <param name="weights"></param>
/// <param name="params"></param>
/// <param name="logger"></param>
public StatelessExecutor(LLamaWeights weights, IContextParams @params, ILogger logger = null!)
public StatelessExecutor(LLamaWeights weights, IContextParams @params)
{
_logger = logger;
_weights = weights;
_params = @params;

View File

@ -81,11 +81,10 @@ namespace LLama
/// Create a llama_context using this model
/// </summary>
/// <param name="params"></param>
/// <param name="logger"></param>
/// <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);
}
}
}