using System.Text.Json.Serialization; namespace AIStudio.Provider.HuggingFace; /// /// One inference provider serving a model. /// /// The slug of the inference provider, e.g. "novita". /// Whether the provider currently serves the model. Known value: "live". /// How much this provider reads and writes in one conversation, in tokens. public readonly record struct HFModelProvider(string Provider, string Status, [property: JsonPropertyName("context_length")] int? ContextWindowTokens) { private const string LIVE = "live"; /// /// Whether this provider serves the model right now. /// public bool IsLive => string.Equals(this.Status, LIVE, StringComparison.OrdinalIgnoreCase); }