This commit is contained in:
2026-04-27 21:43:06 +03:30
parent bb5dc64a7d
commit 2b5e09912f
14 changed files with 877 additions and 387 deletions
+12
View File
@@ -1,6 +1,8 @@
using AutoMapper;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using xAiApi.AI.Interfaces;
using xAiApi.AI.Mppings;
using xAiApi.AI.Services;
namespace xAiApi.AI.DI
@@ -16,7 +18,17 @@ namespace xAiApi.AI.DI
)
{
//
// Register AutoMapper Using Mapping Profiles ...
services.AddAutoMapper(typeof(MappingProfiles).Assembly);
//
// TODO: Remove this ...
services.AddSingleton<IXAIService, XAIService>();
//
// Since we Used Repositories in this Service,
// we have to Register it Scoped Lifetime ...
services.AddScoped<IXAiProvider, XAiProvider>();
}
/// <summary>