Class OpenRouterSupportService
java.lang.Object
sk.iway.iwcm.components.ai.providers.SupportLogic
sk.iway.iwcm.components.ai.providers.openrouter.OpenRouterSupportService
- All Implemented Interfaces:
SupportLogicInterface
- Direct Known Subclasses:
OpenRouterService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapper
Fields inherited from class sk.iway.iwcm.components.ai.providers.SupportLogic
AUDIT_AI_RESPONSE_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMessage
(com.fasterxml.jackson.databind.node.ArrayNode messagesArray, String value) protected void
addMessageWithImage
(com.fasterxml.jackson.databind.node.ArrayNode messagesArray, String value, String format, String base64Img) protected static String
protected com.fasterxml.jackson.databind.node.ObjectNode
getBaseMainObject
(String... contents) final org.apache.http.entity.StringEntity
getRequestBody
(String stringBody) static String
handleFinishReasonValue
(String finishReason) protected <T extends org.apache.http.client.methods.HttpRequestBase>
voidsetHeaders
(T http, boolean addContentType) 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, getStreamEncoding, getStremResponseRequest, handleBufferedReader
-
Field Details
-
MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Constructor Details
-
OpenRouterSupportService
public OpenRouterSupportService()
-
-
Method Details
-
getServiceName
-
getApiKey
-
setHeaders
protected <T extends org.apache.http.client.methods.HttpRequestBase> void setHeaders(T http, boolean addContentType) -
getRequestBody
-
getBaseMainObject
-
addMessageWithImage
-
addMessage
protected void addMessage(com.fasterxml.jackson.databind.node.ArrayNode messagesArray, String value) -
handleFinishReasonValue
-