Package sk.iway.iwcm.components.ai.rest
Class AiService
java.lang.Object
sk.iway.iwcm.components.ai.rest.AiService
Main service for AI assistants - handles calls to specific providers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckExistance
(String fileLocation, String currentName, String generatedName) static List<DataTableAi>
getAiAssistantsForField
(String toField, String javaClassName, DataTableColumn column, Prop prop) getAiImageResponse
(InputDataDTO inputData, AiStatRepository statRepo, AssistantDefinitionRepository assistantRepo, javax.servlet.http.HttpServletRequest request) getAiResponse
(InputDataDTO inputData, AiStatRepository statRepo, AssistantDefinitionRepository assistantRepo, javax.servlet.http.HttpServletRequest request) getAiStreamResponse
(InputDataDTO inputData, AiStatRepository statRepo, AssistantDefinitionRepository assistantRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) getBonusHtml
(Long assistantId, AssistantDefinitionRepository assistantRepo, javax.servlet.http.HttpServletRequest request) getGroupsOptions
(Prop prop) getModelOptions
(String term, String provider, Prop prop, javax.servlet.http.HttpServletRequest request) getModelOptions
(String provider, Prop prop, javax.servlet.http.HttpServletRequest request) getProviders
(Prop prop)
-
Constructor Details
-
AiService
-
-
Method Details
-
getProviders
-
getModelOptions
public List<LabelValue> getModelOptions(String provider, Prop prop, javax.servlet.http.HttpServletRequest request) -
getModelOptions
-
getAiResponse
public AssistantResponseDTO getAiResponse(InputDataDTO inputData, AiStatRepository statRepo, AssistantDefinitionRepository assistantRepo, javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
getAiImageResponse
public AssistantResponseDTO getAiImageResponse(InputDataDTO inputData, AiStatRepository statRepo, AssistantDefinitionRepository assistantRepo, javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
getAiStreamResponse
public AssistantResponseDTO getAiStreamResponse(InputDataDTO inputData, AiStatRepository statRepo, AssistantDefinitionRepository assistantRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
getBonusHtml
public String getBonusHtml(Long assistantId, AssistantDefinitionRepository assistantRepo, javax.servlet.http.HttpServletRequest request) -
getGroupsOptions
-
checkExistance
public String checkExistance(String fileLocation, String currentName, String generatedName) throws IOException - Throws:
IOException
-
getAiAssistantsForField
public static List<DataTableAi> getAiAssistantsForField(String toField, String javaClassName, DataTableColumn column, Prop prop)
-