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 voidaddRecord(Long assistantId, Integer usedTokens, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) static List<AiStatEntity>fillStatEntities(List<AiStatEntity> entities, AssistantDefinitionRepository repo, Prop prop) static final List<LabelValueInteger>getBarChartDataTop10Users(AiStatRepository statRepo, String created, Prop prop) 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) static final List<TokenUsersDTO>getTokenUsersTableList(String created, Prop prop)
-
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) -
getBarChartDataTop10Users
public static final List<LabelValueInteger> getBarChartDataTop10Users(AiStatRepository statRepo, String created, Prop prop) -
getTokenUsersTableList
-
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, Prop prop)
-