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
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
Fields inherited from class sk.iway.iwcm.components.ai.providers.SupportLogic
AUDIT_AI_RESPONSE_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
addHeaders
(org.apache.http.client.methods.HttpRequestBase request, boolean addContentType) protected void
static String
protected com.fasterxml.jackson.databind.node.ObjectNode
getBaseMainObject
(String systemInput, String... userInputs) protected String
getImageQualitySelect
(String model, Prop prop) protected String
getImageSizeSelect
(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, handleErrorMessage, handleErrorMessage
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
-
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
-
addInput
protected void addInput(com.fasterxml.jackson.databind.node.ArrayNode inputsArray, String value, boolean isSystem)
-