using Lilith.RazorWebGui.Services;using Microsoft.AspNetCore.Mvc;using Microsoft.AspNetCore.Mvc.RazorPages;namespace Lilith.RazorWebGui.Pages;public class IndexModel(LilithChatService chat) : PageModel{ public IReadOnlyList<ChatLine> Lines => chat.Lines; public string ModelName => chat.Model; public int VersionNumber => chat.VersionNumber; public bool IsReady => chat.IsReady; [BindProperty] public string? Input { get; set; } public void OnGet() { } public async Task<IActionResult> OnPostSendAsync() { if (string.IsNullOrWhiteSpace(Input)) { return RedirectToPage(); } string text = Input.Trim(); Input = string.Empty; bool running = await chat.SendAsync(text); if (!running) { chat.Shutdown(); } return RedirectToPage(); }}
Documentation
Lilith.RazorWebGui (Version 1)
ASP.NET Core Razor Pages web UI for Lilith Version 1. Mirrors LilithConsole chat, commands, and logging.
- Model:
LILITH_MODEL(defaultgemma4) - Commands:
exit,/new,/history,/history <n>
dotnet run --project Lilith.RazorWebGui.csproj
Browse http://localhost:5000 (see Properties/launchSettings.json).