Class AiStatService
java.lang.Object
sk.iway.iwcm.components.ai.stat.rest.AiStatService
Service for AI statistics - handles data processing for stats section/graphs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final void
addRecord
(Long assistantId, Integer usedTokens, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) static List<AiStatEntity>
fillStatEntities
(List<AiStatEntity> entities, AssistantDefinitionRepository repo) static final Map<String,
List<DaysUsageDTO>> getLineChartData
(String created, String provider, String action, String groupName, AiStatRepository statRepo, AssistantDefinitionRepository assistantsRepo) static final List<LabelValueInteger>
getPieChartDataMostTokens
(String created, String provider, String action, String groupName, AiStatRepository statRepo, AssistantDefinitionRepository assistantsRepo, Prop prop) static final List<LabelValueInteger>
getPieChartDataMostUsed
(String created, String provider, String action, String groupName, AiStatRepository statRepo, AssistantDefinitionRepository assistantsRepo, Prop prop) static org.springframework.data.jpa.domain.Specification<AiStatEntity>
getSpecification
(Map<String, String> params, org.springframework.data.domain.Pageable pageable)
-
Constructor Details
-
AiStatService
public AiStatService()
-
-
Method Details
-
addRecord
public static final void addRecord(Long assistantId, Integer usedTokens, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) -
getPieChartDataMostUsed
public static final List<LabelValueInteger> getPieChartDataMostUsed(String created, String provider, String action, String groupName, AiStatRepository statRepo, AssistantDefinitionRepository assistantsRepo, Prop prop) -
getPieChartDataMostTokens
public static final List<LabelValueInteger> getPieChartDataMostTokens(String created, String provider, String action, String groupName, AiStatRepository statRepo, AssistantDefinitionRepository assistantsRepo, Prop prop) -
getLineChartData
public static final Map<String,List<DaysUsageDTO>> getLineChartData(String created, String provider, String action, String groupName, AiStatRepository statRepo, AssistantDefinitionRepository assistantsRepo) -
getSpecification
public static org.springframework.data.jpa.domain.Specification<AiStatEntity> getSpecification(Map<String, String> params, org.springframework.data.domain.Pageable pageable) -
fillStatEntities
public static List<AiStatEntity> fillStatEntities(List<AiStatEntity> entities, AssistantDefinitionRepository repo)
-