pitit refact
This commit is contained in:
parent
e24208e77b
commit
20713eef64
235 changed files with 5374 additions and 373 deletions
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
using Anthropic.SDK;
|
||||
using Microsoft.AspNetCore;
|
||||
using Yavsc.Abstract.Interfaces;
|
||||
using Yavsc.Extensions;
|
||||
|
||||
|
|
@ -17,7 +15,7 @@ namespace Yavsc
|
|||
new AnthropicClient(
|
||||
new APIAuthentication(
|
||||
builder.Configuration["ANTHROPIC_API_KEY"]
|
||||
?? throw new InvalidOperationException("ANTHROPIC_API_KEY manquante")
|
||||
?? throw new InvalidOperationException("ANTHROPIC_API_KEY manquante")
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
@ -28,16 +26,11 @@ namespace Yavsc
|
|||
else
|
||||
builder.Services.AddScoped<IModerationService, ClaudeModerationService>();
|
||||
|
||||
var rootConfig = builder.Configuration
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true)
|
||||
.AddEnvironmentVariables()
|
||||
.Build();
|
||||
var app = await builder
|
||||
.ConfigureWebAppServices()
|
||||
.ConfigurePipeline();
|
||||
|
||||
rootConfig.GetConnectionString(YavscConstants.YavscConnectionStringName);
|
||||
|
||||
var app = await builder.ConfigureWebAppServices().ConfigurePipeline();
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue