bc25dc7b07
Implement the core application server as an ASP.NET web host with: - SignalR ChatHub for real-time client communication - Session management with token estimation for context windowing - Extensible tool system with attribute-based tool discovery - Chat stream update builder for streaming AI responses - App configuration with appsettings for development and production
22 lines
571 B
C#
22 lines
571 B
C#
using Luna.Configuration.Extensions;
|
|
using Luna.Core.Abstractions;
|
|
using Luna.Core.Session;
|
|
|
|
namespace Luna.Core.Services.Extensions;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
extension(IServiceCollection services)
|
|
{
|
|
public IServiceCollection AddSessionManager()
|
|
{
|
|
services.AddTransient<IChatStreamUpdateBuilder, ChatStreamUpdateBuilder>();
|
|
|
|
services.AddSessionOptions();
|
|
services.AddSingleton<ISessionManager, SessionManager>();
|
|
|
|
return services;
|
|
}
|
|
}
|
|
}
|