using AI.Platform.Service;
using AI.Platform.Web.Common;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Http.Features;

WebApplicationBuilder webApplicationBuilder = WebApplication.CreateBuilder(args);



//设置请求大小最大值，用于上传文件
webApplicationBuilder.WebHost.ConfigureKestrel(options =>
 {
     options.Limits.MaxRequestBodySize = 314_572_800; //300M
 });
webApplicationBuilder.Services.Configure<FormOptions>(options =>
{
    options.MultipartBodyLengthLimit = 314_572_800; //300M
});

webApplicationBuilder.Services.AddScoped<AuthService>();
webApplicationBuilder.Services.AddScoped<HttpClient>();
webApplicationBuilder.Services.AddScoped<MessageService>();

webApplicationBuilder.RegistService().RegistApp();

var app = webApplicationBuilder.Build();

app.Run();
