Class OpenAiSupportService
java.lang.Object
sk.iway.iwcm.components.ai.providers.SupportLogic
sk.iway.iwcm.components.ai.providers.openai.OpenAiSupportService
- All Implemented Interfaces:
SupportLogicInterface
- Direct Known Subclasses:
OpenAiService
Support service for OpenAI integration - common methods
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddHeaders(org.apache.http.client.methods.HttpRequestBase request, boolean addContentType) protected voidaddImageInput(com.fasterxml.jackson.databind.node.ArrayNode inputsArray, InputDataDTO inputData) protected voidstatic Stringprotected com.fasterxml.jackson.databind.node.ObjectNodegetBaseMainObject(String systemInput, String... userInputs) protected com.fasterxml.jackson.databind.node.ObjectNodegetBaseMainObjectWithImage(String systemInput, InputDataDTO inputData, String... userInputs) protected StringgetImageQualitySelect(String model, Prop prop) protected StringgetImageSizeSelect(String model, Prop prop) Generates HTML select element for image size options based on the model.Methods inherited from class sk.iway.iwcm.components.ai.providers.SupportLogic
getAiImageResponse, getAiResponse, getAiStreamResponse, getSupportedModels, handleErrorMessageMethods 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
-
Field Details
-
MODELS_URL
- See Also:
-
IMAGES_GENERATION_URL
- See Also:
-
IMAGES_EDITS_URL
- See Also:
-
RESPONSES_URL
- See Also:
-
OUTPUT
- See Also:
-
-
Constructor Details
-
OpenAiSupportService
public OpenAiSupportService()
-
-
Method Details
-
addHeaders
protected final void addHeaders(org.apache.http.client.methods.HttpRequestBase request, boolean addContentType) -
getImageSizeSelect
Generates HTML select element for image size options based on the model.- Parameters:
model-prop-- Returns:
-
getImageQualitySelect
-
getApiKey
-
getBaseMainObject
protected com.fasterxml.jackson.databind.node.ObjectNode getBaseMainObject(String systemInput, String... userInputs) throws IOException - Throws:
IOException
-
getBaseMainObjectWithImage
protected com.fasterxml.jackson.databind.node.ObjectNode getBaseMainObjectWithImage(String systemInput, InputDataDTO inputData, String... userInputs) throws IOException - Throws:
IOException
-
addInput
protected void addInput(com.fasterxml.jackson.databind.node.ArrayNode inputsArray, String value, boolean isSystem) -
addImageInput
protected void addImageInput(com.fasterxml.jackson.databind.node.ArrayNode inputsArray, InputDataDTO inputData) throws IOException - Throws:
IOException
-