Uses of Class
com.composum.ai.backend.base.service.chat.GPTConfiguration
-
-
Uses of GPTConfiguration in com.composum.ai.backend.base.service.chat
Fields in com.composum.ai.backend.base.service.chat declared as GPTConfiguration Modifier and Type Field Description static GPTConfigurationGPTConfiguration. CHATstatic GPTConfigurationGPTConfiguration. DEBUGIf set, the AI services will not call the AI but return the JSON request as response, for debugging purposes.static GPTConfigurationGPTConfiguration. GENERATEstatic GPTConfigurationGPTConfiguration. HIGH_INTELLIGENCERequests slower and more expensive "high intelligence" model - use sparingly.static GPTConfigurationGPTConfiguration. HTMLstatic GPTConfigurationGPTConfiguration. JSONstatic GPTConfigurationGPTConfiguration. MARKDOWNstatic GPTConfigurationGPTConfiguration. NULLCFGstatic GPTConfigurationGPTConfiguration. STANDARD_INTELLIGENCERequests faster and less expensive "normal intelligence" model.Methods in com.composum.ai.backend.base.service.chat that return GPTConfiguration Modifier and Type Method Description GPTConfigurationGPTChatRequest. getConfiguration()Sets the LLM configurationGPTConfigurationGPTConfiguration. merge(GPTConfiguration other)Creates a configuration that joins the values.GPTConfigurationGPTConfiguration. merge(GPTConfiguration other, boolean override)Creates a configuration that joins the values.static GPTConfigurationGPTConfiguration. merge(GPTConfiguration first, GPTConfiguration second)merge(GPTConfiguration)several configurations.static GPTConfigurationGPTConfiguration. ofAdditionalInstructions(String additionalInstructions)static GPTConfigurationGPTConfiguration. ofContext(String usermsg, String assistantmsg)static GPTConfigurationGPTConfiguration. ofContexts(List<GPTConfiguration.GPTContextInfo> contexts)static GPTConfigurationGPTConfiguration. ofHighIntelligenceNeeded(Boolean highIntelligenceNeeded)static GPTConfigurationGPTConfiguration. ofModel(String model)static GPTConfigurationGPTConfiguration. ofRichText(boolean richText)static GPTConfigurationGPTConfiguration. ofTemperature(Double temperature)static GPTConfigurationGPTConfiguration. ofTools(List<GPTTool> tools)GPTConfigurationGPTConfiguration. replaceContexts(List<GPTConfiguration.GPTContextInfo> newContexts)Returns a copy with the contexts replaced.Methods in com.composum.ai.backend.base.service.chat with parameters of type GPTConfiguration Modifier and Type Method Description List<String>GPTEmbeddingService. findMostRelated(String query, List<String> comparedStrings, int limit, GPTConfiguration configuration, GPTEmbeddingService.EmbeddingsCache cache)Determines the at most limit to query semantically closest of the comparedStrings according to the embedding service.default List<String>GPTTranslationService. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration)Translates the texts into the target language.List<String>GPTTranslationService. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration, List<GPTResponseCheck> translationChecks)Translates the texts into the target language.StringGPTContentCreationService. generateDescription(String text, int maxwords, GPTConfiguration configuration)Generates a description from the given text.List<String>GPTContentCreationService. generateKeywords(String text, GPTConfiguration configuration)Generates a list of keywords from the given text.List<float[]>GPTChatCompletionService. getEmbeddings(List<String> texts, GPTConfiguration configuration)Calculates embeddings for the given list of texts.List<float[]>GPTEmbeddingService. getEmbeddings(List<String> texts, GPTConfiguration configuration, GPTEmbeddingService.EmbeddingsCache cache)Get embeddings for the given texts.booleanGPTDictationService. isAvailable(GPTConfiguration configuration)Whether the service is enabled and properly configured.booleanGPTChatCompletionService. isEnabled(GPTConfiguration gptConfig)Checks whetherGPTChatCompletionService.isEnabled()and whether gptConfig enables executing GPT calls.GPTConfigurationGPTConfiguration. merge(GPTConfiguration other)Creates a configuration that joins the values.GPTConfigurationGPTConfiguration. merge(GPTConfiguration other, boolean override)Creates a configuration that joins the values.static GPTConfigurationGPTConfiguration. merge(GPTConfiguration first, GPTConfiguration second)merge(GPTConfiguration)several configurations.GPTChatRequestGPTChatRequest. setConfiguration(GPTConfiguration configuration)Optionally, sets the configuration.StringGPTTranslationService. singleTranslation(String text, String sourceLanguage, String targetLanguage, GPTConfiguration configuration)Translate the text from the target to destination language, either Java locale name or language name.voidGPTTranslationService. streamingSingleTranslation(String text, String sourceLanguage, String targetLanguage, GPTConfiguration configuration, GPTCompletionCallback callback)Translate the text from the target to destination language, either Java locale name or language name.StringGPTDictationService. transcribe(InputStream audioStream, String contentType, String language, GPTConfiguration configuration, String prompt)Transcribes the input audio to text.Constructors in com.composum.ai.backend.base.service.chat with parameters of type GPTConfiguration Constructor Description GPTChatRequest(GPTConfiguration configuration) -
Uses of GPTConfiguration in com.composum.ai.backend.base.service.chat.impl
Methods in com.composum.ai.backend.base.service.chat.impl that return GPTConfiguration Modifier and Type Method Description protected GPTConfigurationGPTTranslationServiceImpl. getServiceConfiguration()Methods in com.composum.ai.backend.base.service.chat.impl with parameters of type GPTConfiguration Modifier and Type Method Description protected voidGPTChatCompletionServiceImpl. checkEnabled(GPTConfiguration gptConfig)protected StringGPTChatCompletionServiceImpl. determineModel(GPTConfiguration configuration, boolean hasImage)List<String>GPTEmbeddingServiceImpl. findMostRelated(String query, List<String> comparedStrings, int limit, GPTConfiguration configuration, GPTEmbeddingService.EmbeddingsCache thecache)protected List<String>GPTTranslationServiceImpl. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration, AtomicInteger permittedRetries, List<GPTResponseCheck> translationChecks)List<String>GPTTranslationServiceImpl. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration, List<GPTResponseCheck> translationChecks)We join all text fragments we have to translate into one big texts separated with separators like `%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 573472 %%%%%%%%%%%%%%%%` and then translate that.protected List<String>GPTTranslationServiceImpl. fragmentedTranslationDivideAndConquer(List<String> texts, String targetLanguage, GPTConfiguration configuration, AtomicInteger permittedRetries, List<GPTResponseCheck> translationChecks)We try to translate the whole lot of texts.StringGPTContentCreationServiceImpl. generateDescription(String text, int maxwords, GPTConfiguration configuration)List<String>GPTContentCreationServiceImpl. generateKeywords(String text, GPTConfiguration configuration)List<float[]>GPTChatCompletionServiceImpl. getEmbeddings(List<String> texts, GPTConfiguration configuration)List<float[]>GPTEmbeddingServiceImpl. getEmbeddings(List<String> texts, GPTConfiguration configuration, GPTEmbeddingService.EmbeddingsCache cache)protected List<float[]>GPTChatCompletionServiceImpl. getEmbeddingsImpl(List<String> texts, GPTConfiguration configuration, long id)protected List<float[]>GPTChatCompletionServiceImpl. getEmbeddingsImplDivideAndConquer(List<String> texts, GPTConfiguration configuration, long id)protected StringGPTChatCompletionServiceImpl. getModel(GPTConfiguration gptConfiguration)booleanGPTDictationServiceImpl. isAvailable(GPTConfiguration configuration)booleanGPTChatCompletionServiceImpl. isEnabled(GPTConfiguration gptConfig)booleanGPTInternalOpenAIHelper. isEnabled(GPTConfiguration gptConfig)Checks whether ChatGPT is generally and whether gptConfig enables executing GPT calls.protected org.apache.hc.client5.http.async.methods.SimpleHttpRequestGPTChatCompletionServiceImpl. makeRequest(String jsonRequest, GPTConfiguration gptConfiguration)StringGPTTranslationServiceImpl. singleTranslation(String rawText, String sourceLanguage, String targetLanguage, GPTConfiguration configuration)Translate the text from the target to destination language, either Java locale name or language name.voidGPTTranslationServiceImpl. streamingSingleTranslation(String text, String sourceLanguage, String targetLanguage, GPTConfiguration configuration, GPTCompletionCallback callback)StringGPTDictationServiceImpl. transcribe(InputStream audioStream, String contentType, String language, GPTConfiguration configuration, String prompt) -
Uses of GPTConfiguration in com.composum.ai.backend.slingbase
Methods in com.composum.ai.backend.slingbase that return GPTConfiguration Modifier and Type Method Description default GPTConfigurationAIConfigurationPlugin. getGPTConfiguration(org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)Reads the GPTConfiguration from sling context aware configurations.GPTConfigurationAIConfigurationService. getGPTConfiguration(org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)Reads the GPTConfiguration from sling context aware configurations.Methods in com.composum.ai.backend.slingbase with parameters of type GPTConfiguration Modifier and Type Method Description protected GPTChatRequestAICreateServlet. makeAdditionalParameters(int maxtokens, String chat, javax.servlet.http.HttpServletResponse response, GPTConfiguration config) -
Uses of GPTConfiguration in com.composum.ai.backend.slingbase.impl
Methods in com.composum.ai.backend.slingbase.impl that return GPTConfiguration Modifier and Type Method Description GPTConfigurationAIConfigurationServiceImpl. getGPTConfiguration(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)GPTConfigurationSlingCaConfigPluginImpl. getGPTConfiguration(org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)
-