This commit is contained in:
mmrbnjd
2025-08-18 01:05:04 +03:30
parent a10fbeab62
commit 7ce8812098
4 changed files with 259 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
using Common.Dtos.Conversation;
using Common.Dtos;
using Common.Enums;
using System.ComponentModel.Design;
using System.Net.Http.Json;
@@ -95,5 +96,24 @@ namespace HushianWebApp.Service
return null;
}
// AI conversation endpoints
public async Task<List<aiResponseDto>> GetAiCurrentResponses(int companyId)
{
var response = await _baseController.Get($"{BaseRoute}ai/CurrentResponse/{companyId}");
if (response.IsSuccessStatusCode)
return await response.Content.ReadFromJsonAsync<List<aiResponseDto>>();
return new();
}
public async Task<aiResponseDto?> AiNewResponse(aiNewResponseDto dto)
{
var response = await _baseController.Post($"{BaseRoute}ai/NewResponse", dto);
if (response.IsSuccessStatusCode)
return await response.Content.ReadFromJsonAsync<aiResponseDto>();
return null;
}
}
}