Class LibrarySupportLogic
java.lang.Object
sk.iway.iwcm.components.ai.providers.LibrarySupportLogic
- All Implemented Interfaces:
AiInterface
- Direct Known Subclasses:
GeminiService,OpenAiService,OpenRouterService
CMS adapter around the framework-neutral
webjet-ai client.
CMS-side provider integrations should extend this class.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLibrarySupportLogic(com.webjetcms.ai.AiClient aiClient, WebjetAiConfigurationService configurationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected final WebjetAiConfigurationServicegetAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, jakarta.servlet.http.HttpServletRequest request) getAiResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, jakarta.servlet.http.HttpServletRequest request) getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, jakarta.servlet.http.HttpServletRequest request) getBonusHtml(AssistantDefinitionEntity assistant, Prop prop) getSupportedModels(Prop prop, jakarta.servlet.http.HttpServletRequest request) booleanisInit()Methods 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.AiInterface
configure, getApiKey, getImageNameModel, getProviderId, getTitleKey
-
Constructor Details
-
LibrarySupportLogic
protected LibrarySupportLogic(com.webjetcms.ai.AiClient aiClient, WebjetAiConfigurationService configurationService)
-
-
Method Details
-
isInit
public boolean isInit()- Specified by:
isInitin interfaceAiInterface
-
getSupportedModels
public List<LabelValue> getSupportedModels(Prop prop, jakarta.servlet.http.HttpServletRequest request) - Specified by:
getSupportedModelsin interfaceAiInterface
-
getAiResponse
public AssistantResponseDTO getAiResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, jakarta.servlet.http.HttpServletRequest request) throws ProviderCallException - Specified by:
getAiResponsein interfaceAiInterface- Throws:
ProviderCallException
-
getAiStreamResponse
public AssistantResponseDTO getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, jakarta.servlet.http.HttpServletRequest request) throws ProviderCallException - Specified by:
getAiStreamResponsein interfaceAiInterface- Throws:
ProviderCallException
-
getAiImageResponse
public AssistantResponseDTO getAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, jakarta.servlet.http.HttpServletRequest request) throws ProviderCallException - Specified by:
getAiImageResponsein interfaceAiInterface- Throws:
ProviderCallException
-
configurationService
-
getBonusHtml
- Specified by:
getBonusHtmlin interfaceAiInterface
-