AuthorBuddy/Models/LLM_Model.cs

36 lines
822 B
C#
Raw Permalink Normal View History

2026-05-16 16:13:35 +02:00
using System.Text.Json;
namespace AuthorBuddy.Web.Models
{
public class LLM_Model
{
public LLM_Model(JsonElement model)
{
if (model.TryGetProperty("name", out var name))
{
Name = name.GetString() ?? "" ;
}
if (model.TryGetProperty("size", out var size))
{
Size = size.GetInt64();
}
if (model.TryGetProperty("modified_at", out var modified))
{
ModifiedAt = modified.GetDateTime();
}
}
2026-05-31 19:31:27 +02:00
public LLM_Model(string name)
{
Name = name;
}
2026-05-16 16:13:35 +02:00
public string Name { get; set; } = string.Empty;
public long Size { get; set; }
public DateTime? ModifiedAt { get; set; }
}
}