LLamaSharp/docs/xmldocs/llama.abstractions.illamaex...

1.7 KiB

ILLamaExecutor

Namespace: LLama.Abstractions

A high level interface for LLama models.

public interface ILLamaExecutor

Properties

Context

The loaded context for this executor.

public abstract LLamaContext Context { get; }

Property Value

LLamaContext

Methods

Infer(String, IInferenceParams, CancellationToken)

Infers a response from the model.

IEnumerable<string> Infer(string text, IInferenceParams inferenceParams, CancellationToken token)

Parameters

text String
Your prompt

inferenceParams IInferenceParams
Any additional parameters

token CancellationToken
A cancellation token.

Returns

IEnumerable<String>

InferAsync(String, IInferenceParams, CancellationToken)

Asynchronously infers a response from the model.

IAsyncEnumerable<string> InferAsync(string text, IInferenceParams inferenceParams, CancellationToken token)

Parameters

text String
Your prompt

inferenceParams IInferenceParams
Any additional parameters

token CancellationToken
A cancellation token.

Returns

IAsyncEnumerable<String>