mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-11 09:09:07 +00:00
Added the no provider
This commit is contained in:
parent
9f0c1dc410
commit
867de08bfe
@ -1,7 +1,12 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
using AIStudio.Chat;
|
||||||
using AIStudio.Settings;
|
using AIStudio.Settings;
|
||||||
|
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
|
|
||||||
|
using MudBlazor;
|
||||||
|
|
||||||
namespace AIStudio.Provider;
|
namespace AIStudio.Provider;
|
||||||
|
|
||||||
public class NoProvider : IProvider
|
public class NoProvider : IProvider
|
||||||
@ -12,13 +17,21 @@ public class NoProvider : IProvider
|
|||||||
|
|
||||||
public string InstanceName { get; set; } = "None";
|
public string InstanceName { get; set; } = "None";
|
||||||
|
|
||||||
public async IAsyncEnumerable<string> GetChatCompletion(IJSRuntime jsRuntime, SettingsManager settings, Model chatModel, Thread chatThread)
|
public Task<IList<Model>> GetTextModels(IJSRuntime jsRuntime, SettingsManager settings, CancellationToken token = default) => Task.FromResult<IList<Model>>(new List<Model>());
|
||||||
|
|
||||||
|
public Task<IList<Model>> GetImageModels(IJSRuntime jsRuntime, SettingsManager settings, CancellationToken token = default) => Task.FromResult<IList<Model>>(new List<Model>());
|
||||||
|
|
||||||
|
public async IAsyncEnumerable<string> StreamChatCompletion(IJSRuntime jsRuntime, SettingsManager settings, Model chatModel, ChatThread chatChatThread, [EnumeratorCancellation] CancellationToken token = default)
|
||||||
{
|
{
|
||||||
await Task.CompletedTask;
|
await Task.FromResult(0);
|
||||||
yield return "";
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IList<Model>> GetModels(IJSRuntime jsRuntime, SettingsManager settings) => Task.FromResult<IList<Model>>(new List<Model>());
|
public async IAsyncEnumerable<ImageURL> StreamImageCompletion(IJSRuntime jsRuntime, SettingsManager settings, Model imageModel, string promptPositive, string promptNegative = FilterOperator.String.Empty, ImageURL referenceImageURL = default, [EnumeratorCancellation] CancellationToken token = default)
|
||||||
|
{
|
||||||
|
await Task.FromResult(0);
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user