mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 13:37:59 +00:00
Read the context window from four more model lists
This commit is contained in:
16 files changed
+415
-28
No files matched your search
@@ -1,3 +1,5 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AIStudio.Provider.HuggingFace;
|
||||
|
||||
/// <summary>
|
||||
@@ -5,4 +7,13 @@ namespace AIStudio.Provider.HuggingFace;
|
||||
/// </summary>
|
||||
/// <param name="Provider">The slug of the inference provider, e.g. "novita".</param>
|
||||
/// <param name="Status">Whether the provider currently serves the model. Known value: "live".</param>
|
||||
public readonly record struct HFModelProvider(string Provider, string Status);
|
||||
/// <param name="ContextWindowTokens">How much this provider reads and writes in one conversation, in tokens.</param>
|
||||
public readonly record struct HFModelProvider(string Provider, string Status, [property: JsonPropertyName("context_length")] int? ContextWindowTokens)
|
||||
{
|
||||
private const string LIVE = "live";
|
||||
|
||||
/// <summary>
|
||||
/// Whether this provider serves the model right now.
|
||||
/// </summary>
|
||||
public bool IsLive => string.Equals(this.Status, LIVE, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
Reference in new issue
Block a user