refactoring for integration

This commit is contained in:
Paul Schneider 2026-06-06 21:10:48 +01:00
commit 070f41ac7e
48 changed files with 100 additions and 46 deletions

View file

@ -10,22 +10,6 @@ namespace Yavsc
{
var builder = WebApplication.CreateBuilder(args);
// Anthropic client
builder.Services.AddSingleton<AnthropicClient>(_ =>
new AnthropicClient(
new APIAuthentication(
builder.Configuration["ANTHROPIC_API_KEY"]
?? throw new InvalidOperationException("ANTHROPIC_API_KEY manquante")
)
)
);
// Service de modération
if (builder.Environment.IsDevelopment())
builder.Services.AddScoped<IModerationService, MockModerationService>();
else
builder.Services.AddScoped<IModerationService, ClaudeModerationService>();
var app = await builder
.ConfigureWebAppServices()
.ConfigurePipeline();