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

public abstract class OpenRouterSupportService extends SupportLogic
  • Field Details

    • MAPPER

      protected static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
  • Constructor Details

    • OpenRouterSupportService

      public OpenRouterSupportService()
  • Method Details

    • getServiceName

      public String getServiceName()
    • getApiKey

      protected static String getApiKey()
    • setHeaders

      protected <T extends org.apache.http.client.methods.HttpRequestBase> void setHeaders(T http, boolean addContentType)
    • getRequestBody

      public final org.apache.http.entity.StringEntity getRequestBody(String stringBody)
    • 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

      public static String handleFinishReasonValue(String finishReason)