Skip to content

InteractiveExecutor

Namespace: LLama

The LLama executor for interactive mode.

public class InteractiveExecutor : StatefulExecutorBase, LLama.Abstractions.ILLamaExecutor

Inheritance ObjectStatefulExecutorBaseInteractiveExecutor
Implements ILLamaExecutor

Properties

Model

The mode used by the executor.

public LLamaModel Model { get; }

Property Value

LLamaModel

Constructors

InteractiveExecutor(LLamaModel)

public InteractiveExecutor(LLamaModel model)

Parameters

model LLamaModel

Methods

GetStateData()

public ExecutorBaseState GetStateData()

Returns

ExecutorBaseState

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

Boolean

PreprocessInputs(String, InferStateArgs)

protected void PreprocessInputs(string text, InferStateArgs args)

Parameters

text String

args InferStateArgs

PostProcess(InferenceParams, InferStateArgs, IEnumerable`1&)

Return whether to break the generation.

protected bool PostProcess(InferenceParams inferenceParams, InferStateArgs args, IEnumerable`1& extraOutputs)

Parameters

inferenceParams InferenceParams

args InferStateArgs

extraOutputs IEnumerable`1&

Returns

Boolean

InferInternal(InferenceParams, InferStateArgs)

protected void InferInternal(InferenceParams inferenceParams, InferStateArgs args)

Parameters

inferenceParams InferenceParams

args InferStateArgs