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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddImageContent(com.fasterxml.jackson.databind.node.ArrayNode contentArray, InputDataDTO inputData) protected static Stringprotected com.fasterxml.jackson.databind.node.ObjectNodegetBaseMainObject(String... contents) protected com.fasterxml.jackson.databind.node.ObjectNodegetBaseMainObjectWithImage(InputDataDTO inputData, String... contents) final org.apache.http.entity.StringEntitygetRequestBody(String stringBody) static StringhandleFinishReasonValue(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, 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, 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
protected com.fasterxml.jackson.databind.node.ObjectNode getBaseMainObject(String... contents) throws IOException - Throws:
IOException
-
getBaseMainObjectWithImage
protected com.fasterxml.jackson.databind.node.ObjectNode getBaseMainObjectWithImage(InputDataDTO inputData, String... contents) throws IOException - Throws:
IOException
-
addImageContent
protected void addImageContent(com.fasterxml.jackson.databind.node.ArrayNode contentArray, InputDataDTO inputData) throws IOException - Throws:
IOException
-
handleFinishReasonValue
-