mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 15:07:21 +00:00
18 lines
558 B
C#
18 lines
558 B
C#
namespace AIStudio.Assistants.ERI;
|
|
|
|
public static class ERIVersionExtensions
|
|
{
|
|
extension(ERIVersion version)
|
|
{
|
|
public Task<string> ReadSpecification(WebRootFiles webRootFiles) => webRootFiles.ReadTextAsync(version.SpecificationURL());
|
|
|
|
public string SpecificationURL()
|
|
{
|
|
var nameLower = version.ToString().ToLowerInvariant();
|
|
var filename = $"{nameLower}.json";
|
|
return $"specs/eri/{filename}";
|
|
}
|
|
|
|
public bool WasSpecificationSelected() => version != ERIVersion.NONE;
|
|
}
|
|
} |