Interface AiInterface
- All Known Implementing Classes:
BrowserService,GeminiService,OpenAiService,OpenRouterService
public interface AiInterface
Interface for AI providers - main methods to implement in specific provider services
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcollectValues(com.fasterxml.jackson.databind.JsonNode node, List<String> out) getAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) getAiResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) getBonusHtml(AssistantDefinitionEntity assistant, Prop prop) getInstructionsAndValue(AssistantDefinitionEntity assistant, InputDataDTO inputData) static com.fasterxml.jackson.databind.ObjectMapperdefault org.apache.http.entity.StringEntitygetRequestBody(String stringBody) getSupportedModels(Prop prop, javax.servlet.http.HttpServletRequest request) booleanisInit()static StringjoinAllValues(String json, String delimiter)
-
Field Details
-
GENERATE_FILE_NAME_KEY
- See Also:
-
-
Method Details
-
getSupportedModels
-
getAiResponse
AssistantResponseDTO getAiResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) throws ProviderCallException - Throws:
ProviderCallException
-
getAiStreamResponse
AssistantResponseDTO getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) throws ProviderCallException - Throws:
ProviderCallException
-
getAiImageResponse
AssistantResponseDTO getAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) throws ProviderCallException - Throws:
ProviderCallException
-
getBonusHtml
-
getProviderId
String getProviderId() -
getTitleKey
String getTitleKey() -
isInit
boolean isInit() -
getInstructionsAndValue
static Pair<String,String> getInstructionsAndValue(AssistantDefinitionEntity assistant, InputDataDTO inputData) -
joinAllValues
-
collectValues
-
getObjectMapper
static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getRequestBody
-