InstructExecutor
Namespace: LLama
The LLama executor for instruct mode.
public class InstructExecutor : StatefulExecutorBase, LLama.Abstractions.ILLamaExecutor
Inheritance Object → StatefulExecutorBase → InstructExecutor
Implements ILLamaExecutor
Properties
Context
The context used by the executor.
public LLamaContext Context { get; }
Property Value
Constructors
InstructExecutor(LLamaContext, String, String)
public InstructExecutor(LLamaContext context, string instructionPrefix, string instructionSuffix)
Parameters
context
LLamaContext
instructionPrefix
String
instructionSuffix
String
Methods
GetStateData()
public ExecutorBaseState GetStateData()
Returns
LoadState(ExecutorBaseState)
public void LoadState(ExecutorBaseState data)
Parameters
data
ExecutorBaseState
SaveState(String)
public void SaveState(string filename)
Parameters
filename
String
LoadState(String)
public void LoadState(string filename)
Parameters
filename
String
GetLoopCondition(InferStateArgs)
protected bool GetLoopCondition(InferStateArgs args)
Parameters
args
InferStateArgs
Returns
PreprocessInputs(String, InferStateArgs)
protected void PreprocessInputs(string text, InferStateArgs args)
Parameters
text
String
args
InferStateArgs
PostProcess(IInferenceParams, InferStateArgs, IEnumerable`1&)
protected bool PostProcess(IInferenceParams inferenceParams, InferStateArgs args, IEnumerable`1& extraOutputs)
Parameters
inferenceParams
IInferenceParams
args
InferStateArgs
extraOutputs
IEnumerable`1&
Returns
InferInternal(IInferenceParams, InferStateArgs)
protected void InferInternal(IInferenceParams inferenceParams, InferStateArgs args)
Parameters
inferenceParams
IInferenceParams
args
InferStateArgs