Table of Contents

Class RemoteLLM<TMessage>

Namespace
Prefrontal.Modules.Chat
Assembly
Prefrontal.Modules.dll
public class RemoteLLM<TMessage> : LLM<TMessage>

Type Parameters

TMessage
Inheritance
LLM<TMessage>
RemoteLLM<TMessage>
Inherited Members
Extension Methods

Constructors

RemoteLLM(string, string, JsonSerializerOptions?)

public RemoteLLM(string openAICompatibleEndpoint, string apiKey, JsonSerializerOptions? jsonSerializerOptions = null)

Parameters

openAICompatibleEndpoint string
apiKey string
jsonSerializerOptions JsonSerializerOptions

Fields

DEFAULT_JSON_SERIALIZER_OPTIONS

public static readonly JsonSerializerOptions DEFAULT_JSON_SERIALIZER_OPTIONS

Field Value

JsonSerializerOptions

Methods

CompleteAsync(int, CancellationToken)

public override Task<LLM<TMessage>.CompletionChunk> CompleteAsync(int n, CancellationToken cancellationToken = default)

Parameters

n int
cancellationToken CancellationToken

Returns

Task<LLM<TMessage>.CompletionChunk>

ContinueAsync(int, CancellationToken)

public override IAsyncEnumerable<LLM<TMessage>.CompletionChunk> ContinueAsync(int n, CancellationToken cancellationToken = default)

Parameters

n int
cancellationToken CancellationToken

Returns

IAsyncEnumerable<LLM<TMessage>.CompletionChunk>

GetAvailableModelsAsync(CancellationToken)

public override Task<List<LLM<TMessage>.ModelInfo>> GetAvailableModelsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<List<LLM<TMessage>.ModelInfo>>

GetEmbeddingsAsync(List<string>, int?, string?, CancellationToken)

public override Task<List<LLM<TMessage>.EmbeddingObject>> GetEmbeddingsAsync(List<string> input, int? dimensions = null, string? user = null, CancellationToken cancellationToken = default)

Parameters

input List<string>
dimensions int?
user string
cancellationToken CancellationToken

Returns

Task<List<LLM<TMessage>.EmbeddingObject>>