2024-05-04 09:12:05 +00:00
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
|
using AIStudio.Chat;
|
2025-01-02 13:50:54 +00:00
|
|
|
using AIStudio.Settings;
|
2024-04-20 15:06:50 +00:00
|
|
|
|
|
|
|
namespace AIStudio.Provider;
|
|
|
|
|
|
|
|
public class NoProvider : IProvider
|
|
|
|
{
|
|
|
|
#region Implementation of IProvider
|
|
|
|
|
|
|
|
public string Id => "none";
|
|
|
|
|
|
|
|
public string InstanceName { get; set; } = "None";
|
|
|
|
|
2024-09-01 18:10:03 +00:00
|
|
|
public Task<IEnumerable<Model>> GetTextModels(string? apiKeyProvisional = null, CancellationToken token = default) => Task.FromResult<IEnumerable<Model>>([]);
|
2024-05-04 09:12:05 +00:00
|
|
|
|
2024-09-01 18:10:03 +00:00
|
|
|
public Task<IEnumerable<Model>> GetImageModels(string? apiKeyProvisional = null, CancellationToken token = default) => Task.FromResult<IEnumerable<Model>>([]);
|
2024-12-03 14:24:40 +00:00
|
|
|
|
|
|
|
public Task<IEnumerable<Model>> GetEmbeddingModels(string? apiKeyProvisional = null, CancellationToken token = default) => Task.FromResult<IEnumerable<Model>>([]);
|
2024-05-04 09:12:05 +00:00
|
|
|
|
2025-01-02 13:50:54 +00:00
|
|
|
public async IAsyncEnumerable<string> StreamChatCompletion(Model chatModel, ChatThread chatChatThread, SettingsManager settingsManager, [EnumeratorCancellation] CancellationToken token = default)
|
2024-04-20 15:13:32 +00:00
|
|
|
{
|
2024-05-04 09:12:05 +00:00
|
|
|
await Task.FromResult(0);
|
|
|
|
yield break;
|
2024-04-20 15:13:32 +00:00
|
|
|
}
|
|
|
|
|
2024-09-01 18:10:03 +00:00
|
|
|
public async IAsyncEnumerable<ImageURL> StreamImageCompletion(Model imageModel, string promptPositive, string promptNegative = FilterOperator.String.Empty, ImageURL referenceImageURL = default, [EnumeratorCancellation] CancellationToken token = default)
|
2024-05-04 09:12:05 +00:00
|
|
|
{
|
|
|
|
await Task.FromResult(0);
|
|
|
|
yield break;
|
|
|
|
}
|
2024-04-20 15:06:50 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|