3.1 KiB
3.1 KiB
InteractiveExecutor
Namespace: LLama
The LLama executor for interactive mode.
public class InteractiveExecutor : StatefulExecutorBase, LLama.Abstractions.ILLamaExecutor
Inheritance Object → StatefulExecutorBase → InteractiveExecutor
Implements ILLamaExecutor
Properties
Context
The context used by the executor.
public LLamaContext Context { get; }
Property Value
Constructors
InteractiveExecutor(LLamaContext)
public InteractiveExecutor(LLamaContext context)
Parameters
context
LLamaContext
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)
Define whether to continue the loop to generate responses.
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&)
Return whether to break the generation.
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