...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user