mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-10 21:33:48 +00:00
Fixed missed row numbers of providers
This commit is contained in:
5 files changed
+25
-3
No files matched your search
@@ -14,7 +14,12 @@ public sealed class Data
|
||||
/// <summary>
|
||||
/// List of configured providers.
|
||||
/// </summary>
|
||||
public List<Provider> Providers { get; init; } = new();
|
||||
public List<Provider> Providers { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// The next provider number to use.
|
||||
/// </summary>
|
||||
public uint NextProviderNum { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Should we save energy? When true, we will update content streamed
|
||||
|
||||
@@ -5,11 +5,12 @@ namespace AIStudio.Settings;
|
||||
/// <summary>
|
||||
/// Data model for configured providers.
|
||||
/// </summary>
|
||||
/// <param name="Num">The provider's number.</param>
|
||||
/// <param name="Id">The provider's ID.</param>
|
||||
/// <param name="InstanceName">The provider's instance name. Useful for multiple instances of the same provider, e.g., to distinguish between different OpenAI API keys.</param>
|
||||
/// <param name="UsedProvider">The provider used.</param>
|
||||
/// <param name="Model">The LLM model to use for chat.</param>
|
||||
public readonly record struct Provider(string Id, string InstanceName, Providers UsedProvider, Model Model)
|
||||
public readonly record struct Provider(uint Num, string Id, string InstanceName, Providers UsedProvider, Model Model)
|
||||
{
|
||||
#region Overrides of ValueType
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@ public partial class ProviderDialog : ComponentBase
|
||||
{
|
||||
[CascadingParameter]
|
||||
private MudDialogInstance MudDialog { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// The provider's number in the list.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public uint DataNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The provider's ID.
|
||||
@@ -129,6 +135,7 @@ public partial class ProviderDialog : ComponentBase
|
||||
// We just return this data to the parent component:
|
||||
var addedProvider = new Provider
|
||||
{
|
||||
Num = this.DataNum,
|
||||
Id = this.DataId,
|
||||
InstanceName = this.DataInstanceName,
|
||||
UsedProvider = this.DataProvider,
|
||||
|
||||
Reference in new issue
Block a user