refactoring for integration
This commit is contained in:
parent
80144bf9fc
commit
070f41ac7e
48 changed files with 100 additions and 46 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue