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 void
collectValues
(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.ObjectMapper
default org.apache.http.entity.StringEntity
getRequestBody
(String stringBody) getSupportedModels
(Prop prop, javax.servlet.http.HttpServletRequest request) boolean
isInit()
static String
joinAllValues
(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 Exception - Throws:
Exception
-
getAiStreamResponse
AssistantResponseDTO getAiStreamResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, BufferedWriter writer, javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
getAiImageResponse
AssistantResponseDTO getAiImageResponse(AssistantDefinitionEntity assistant, InputDataDTO inputData, Prop prop, AiStatRepository statRepo, javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
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
-