using AIStudio.Provider;
namespace AIStudio.Settings;
///
/// Data model for configured providers.
///
/// The provider's ID.
/// The provider's instance name. Useful for multiple instances of the same provider, e.g., to distinguish between different OpenAI API keys.
/// The provider used.
public readonly record struct Provider(string Id, string InstanceName, Providers UsedProvider)
{
#region Overrides of ValueType
///
/// Returns a string that represents the current provider in a human-readable format.
/// We use this to display the provider in the chat UI.
///
/// A string that represents the current provider in a human-readable format.
public override string ToString()
{
return $"{this.InstanceName} ({this.UsedProvider.ToName()})";
}
#endregion
}