Class GeminiSupportService
java.lang.Object
sk.iway.iwcm.components.ai.providers.SupportLogic
sk.iway.iwcm.components.ai.providers.gemini.GeminiSupportService
- All Implemented Interfaces:
SupportLogicInterface
- Direct Known Subclasses:
GeminiService
Support service for Gemini AI model integration - common methods
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final com.fasterxml.jackson.databind.ObjectMapper
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 void
protected void
addPart
(com.fasterxml.jackson.databind.node.ArrayNode contentsArray, String value, com.fasterxml.jackson.databind.node.ObjectNode inlineData) protected void
addPartWithFile
(com.fasterxml.jackson.databind.node.ArrayNode contentsArray, String value, String mimeType, String fileData) static String
protected com.fasterxml.jackson.databind.node.ObjectNode
getBaseMainObject
(String... parts) protected com.fasterxml.jackson.databind.node.ArrayNode
getParts
(com.fasterxml.jackson.databind.JsonNode root) protected <T extends org.apache.http.client.methods.HttpRequestBase>
voidsetHeaders
(T http, javax.servlet.http.HttpServletRequest request) 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
-
AUTH_KEY
- See Also:
-
SERVICE_NAME
- See Also:
-
PARTS
- See Also:
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Constructor Details
-
GeminiSupportService
public GeminiSupportService()
-
-
Method Details
-
addPartWithFile
-
getBaseMainObject
-
addPart
-
addPart
protected void addPart(com.fasterxml.jackson.databind.node.ArrayNode contentsArray, String value, com.fasterxml.jackson.databind.node.ObjectNode inlineData) -
setHeaders
protected <T extends org.apache.http.client.methods.HttpRequestBase> void setHeaders(T http, javax.servlet.http.HttpServletRequest request) -
getParts
protected com.fasterxml.jackson.databind.node.ArrayNode getParts(com.fasterxml.jackson.databind.JsonNode root) -
getApiKey
-