mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 07:57:59 +00:00
Added the Google provider (#201)
This commit is contained in:
1 parent
2ae40c59a3
commit
826d15729b
13 files changed
+264
-16
No files matched your search
@@ -4,11 +4,33 @@ 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)
|
||||
/// <param name="DisplayName">The model's display name.</param>
|
||||
public readonly record struct Model(string Id, string? DisplayName)
|
||||
{
|
||||
#region Overrides of ValueType
|
||||
|
||||
public override string ToString() => string.IsNullOrWhiteSpace(this.Id) ? "no model selected" : this.Id;
|
||||
public override string ToString()
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(this.DisplayName))
|
||||
return this.DisplayName;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(this.Id))
|
||||
return this.Id;
|
||||
|
||||
return "no model selected";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Implementation of IEquatable<Model?>
|
||||
|
||||
public bool Equals(Model? other)
|
||||
{
|
||||
if(other is null)
|
||||
return false;
|
||||
|
||||
return this.Id == other.Value.Id;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user