# StatelessExecutor
Namespace: LLama
This executor infer the input as one-time job. Previous inputs won't impact on the
response to current input.
```csharp
public class StatelessExecutor : LLama.Abstractions.ILLamaExecutor
```
Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StatelessExecutor](./llama.statelessexecutor.md)
Implements [ILLamaExecutor](./llama.abstractions.illamaexecutor.md)
## Properties
### **Context**
The context used by the executor when running the inference.
```csharp
public LLamaContext Context { get; private set; }
```
#### Property Value
[LLamaContext](./llama.llamacontext.md)
## Constructors
### **StatelessExecutor(LLamaWeights, IModelParams)**
Create a new stateless executor which will use the given model
```csharp
public StatelessExecutor(LLamaWeights weights, IModelParams params)
```
#### Parameters
`weights` [LLamaWeights](./llama.llamaweights.md)
`params` [IModelParams](./llama.abstractions.imodelparams.md)
### **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
```csharp
public StatelessExecutor(LLamaContext context)
```
#### Parameters
`context` [LLamaContext](./llama.llamacontext.md)
## Methods
### **Infer(String, IInferenceParams, CancellationToken)**
```csharp
public IEnumerable Infer(string text, IInferenceParams inferenceParams, CancellationToken cancellationToken)
```
#### Parameters
`text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`inferenceParams` [IInferenceParams](./llama.abstractions.iinferenceparams.md)
`cancellationToken` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
#### Returns
[IEnumerable<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
### **InferAsync(String, IInferenceParams, CancellationToken)**
```csharp
public IAsyncEnumerable InferAsync(string text, IInferenceParams inferenceParams, CancellationToken cancellationToken)
```
#### Parameters
`text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
`inferenceParams` [IInferenceParams](./llama.abstractions.iinferenceparams.md)
`cancellationToken` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
#### Returns
[IAsyncEnumerable<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iasyncenumerable-1)