Override the ToString method for models

This commit is contained in:
Thorsten Sommer 2024-05-19 16:06:35 +02:00
parent 8a42d1eb50
commit 3e1d171968
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -4,4 +4,11 @@ namespace AIStudio.Provider;
/// The data model for the model to use.
/// </summary>
/// <param name="Id">The model's ID.</param>
public readonly record struct Model(string Id);
public readonly record struct Model(string Id)
{
#region Overrides of ValueType
public override string ToString() => string.IsNullOrWhiteSpace(this.Id) ? "no model selected" : this.Id;
#endregion
}