V1 / 8f6c47b125e8
ConsoleSettings.cs
Interfaces/ConsoleApp/LilithConsole/Setup/ConsoleSettings.cs
Changed in this versionCS
using System.Text.Json;
using System.Text.RegularExpressions;
using Lilith.Core.Logging;
using Lilith.Core.Ollama;
using Lilith.Core.Extensions;
using Lilith.Agent;
namespace LilithConsole.Setup;
public record ConsoleSettings(string? AgentName = null, string? Model = null)
{
public bool IsValid() => (AgentName is null || (!string.IsNullOrWhiteSpace(AgentName) && AgentName.Length <= 80 && !AgentName.Any(char.IsControl))) &&
(Model is null || (Model.Length <= 200 && RegexPatterns.ModelIdentifier().IsMatch(Model)));
}