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
-
Field Summary
Fields -
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) handleErrorMessage
(org.apache.http.client.methods.CloseableHttpResponse response, Prop prop, String serviceName, String methodName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-
Field Details
-
AUDIT_AI_RESPONSE_KEY
- See Also:
-
-
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 IOException - Throws:
IOException
-
getAiStreamResponse
public AssistantResponseDTO getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
getAiImageResponse
public AssistantResponseDTO getAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) throws IOException - Throws:
IOException
-
handleErrorMessage
-
handleErrorMessage
-