StatelessExecutor
Namespace: LLama
This executor infer the input as one-time job. Previous inputs won't impact on the response to current input.
public class StatelessExecutor : LLama.Abstractions.ILLamaExecutor
Inheritance Object → StatelessExecutor
Implements ILLamaExecutor
Properties
Context
The context used by the executor when running the inference.
public LLamaContext Context { get; private set; }
Property Value
Constructors
StatelessExecutor(LLamaWeights, IModelParams)
Create a new stateless executor which will use the given model
public StatelessExecutor(LLamaWeights weights, IModelParams params)
Parameters
weights
LLamaWeights
params
IModelParams
StatelessExecutor(LLamaContext)
Caution
Use the constructor which automatically creates contexts using the LLamaWeights
Create a new stateless executor which will use the model used to create the given context
public StatelessExecutor(LLamaContext context)
Parameters
context
LLamaContext
Methods
Infer(String, IInferenceParams, CancellationToken)
public IEnumerable<string> Infer(string text, IInferenceParams inferenceParams, CancellationToken cancellationToken)
Parameters
text
String
inferenceParams
IInferenceParams
cancellationToken
CancellationToken
Returns
InferAsync(String, IInferenceParams, CancellationToken)
public IAsyncEnumerable<string> InferAsync(string text, IInferenceParams inferenceParams, CancellationToken cancellationToken)
Parameters
text
String
inferenceParams
IInferenceParams
cancellationToken
CancellationToken