基于WebView2实现的Win11桌面框架,利用插件自定义
Moli
2026-05-04 b3bde921167ee0a7dc21cf7e3d642840a0fcc11e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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);
}