Class SupportLogic
java.lang.Object
sk.iway.iwcm.components.ai.providers.SupportLogic
- All Implemented Interfaces:
SupportLogicInterface
- Direct Known Subclasses:
GeminiSupportService,OpenAiSupportService,OpenRouterSupportService
Support logic for AI model integration - common methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) getAiResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) getSupportedModels(Prop prop, javax.servlet.http.HttpServletRequest request) handleErrorMessage(org.apache.http.client.methods.CloseableHttpResponse response, Prop prop) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sk.iway.iwcm.components.ai.providers.SupportLogicInterface
addUsageAndReturnTotal, extractModels, extractResponseText, getFinishError, getImageBase64, getImageFormat, getImageResponseRequest, getImages, getModelForImageNameGeneration, getModelsRequest, getResponseRequest, getServiceName, getStreamEncoding, getStremResponseRequest, handleBufferedReader
-
Constructor Details
-
SupportLogic
public SupportLogic()
-
-
Method Details
-
getSupportedModels
public List<LabelValue> getSupportedModels(Prop prop, javax.servlet.http.HttpServletRequest request) -
getAiResponse
public AssistantResponseDTO getAiResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) throws ProviderCallException - Throws:
ProviderCallException
-
getAiStreamResponse
public AssistantResponseDTO getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) throws ProviderCallException - Throws:
ProviderCallException
-
getAiImageResponse
public AssistantResponseDTO getAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) throws ProviderCallException - Throws:
ProviderCallException
-
handleErrorMessage
-