using AIAssistantModule.Core.Dtos.Admin; using AIAssistantModule.Core.Entities; using AIAssistantModule.Core.Interfaces.API; using AIAssistantModule.Core.Interfaces.SPI; using Microsoft.Extensions.Logging; using Shared.Core.Interfaces.SPI; namespace AIAssistantModule.Core.Services { public class AIAssistantService : IAIAssistantService { private readonly IEnumerable _executor; public AIAssistantService(ILogger logger, IRepositoryFactory repositoryFactory, IEnumerable executors) { _executor = executors; } public async Task GenerateCodeAsync(AIAssistantRequestDto request) { var assistant = _executor .First(x => x.Name == request.Name); //Do Plan await assistant.ExecuteAsync(request); } } }