namespace Moli.Desktop.Llm;
|
|
public interface ILlmGatewayService
|
{
|
Task<IReadOnlyList<LlmModelSummary>> GetModelsAsync(CancellationToken cancellationToken = default);
|
|
IAsyncEnumerable<LlmStreamEvent> StreamChatAsync(
|
LlmChatRequest request,
|
CancellationToken cancellationToken = default);
|
|
Task CancelAsync(string requestId, CancellationToken cancellationToken = default);
|
}
|
|
public interface ILlmModelRegistry
|
{
|
Task<LlmSettingsDocument> LoadAsync(CancellationToken cancellationToken = default);
|
Task<LlmModelConfig?> GetEnabledModelAsync(string modelId, CancellationToken cancellationToken = default);
|
}
|
|
public interface ILlmProviderAdapter
|
{
|
string Provider { get; }
|
|
IAsyncEnumerable<LlmProviderChunk> StreamAsync(
|
LlmProviderRequest request,
|
CancellationToken cancellationToken = default);
|
}
|
|
public interface ILlmProviderAdapterFactory
|
{
|
ILlmProviderAdapter? Get(string provider);
|
}
|
|
public interface ICredentialStore
|
{
|
Task<string?> ResolveSecretAsync(string? authRef, CancellationToken cancellationToken = default);
|
}
|