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 GPTConfiguration
GPTConfiguration. CHAT
static GPTConfiguration
GPTConfiguration. DEBUG
If set, the AI services will not call the AI but return the JSON request as response, for debugging purposes.static GPTConfiguration
GPTConfiguration. GENERATE
static GPTConfiguration
GPTConfiguration. HIGH_INTELLIGENCE
Requests slower and more expensive "high intelligence" model - use sparingly.static GPTConfiguration
GPTConfiguration. HTML
static GPTConfiguration
GPTConfiguration. JSON
static GPTConfiguration
GPTConfiguration. MARKDOWN
static GPTConfiguration
GPTConfiguration. NULLCFG
static GPTConfiguration
GPTConfiguration. STANDARD_INTELLIGENCE
Requests faster and less expensive "normal intelligence" model.Methods in com.composum.ai.backend.base.service.chat that return GPTConfiguration Modifier and Type Method Description GPTConfiguration
GPTChatRequest. getConfiguration()
Sets the LLM configurationGPTConfiguration
GPTConfiguration. merge(GPTConfiguration other)
Creates a configuration that joins the values.GPTConfiguration
GPTConfiguration. merge(GPTConfiguration other, boolean override)
Creates a configuration that joins the values.static GPTConfiguration
GPTConfiguration. merge(GPTConfiguration first, GPTConfiguration second)
merge(GPTConfiguration)
several configurations.static GPTConfiguration
GPTConfiguration. ofAdditionalInstructions(String additionalInstructions)
static GPTConfiguration
GPTConfiguration. ofContext(String usermsg, String assistantmsg)
static GPTConfiguration
GPTConfiguration. ofContexts(List<GPTConfiguration.GPTContextInfo> contexts)
static GPTConfiguration
GPTConfiguration. ofRichText(boolean richText)
static GPTConfiguration
GPTConfiguration. ofTemperature(Double temperature)
static GPTConfiguration
GPTConfiguration. ofTools(List<GPTTool> tools)
GPTConfiguration
GPTConfiguration. 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.String
GPTContentCreationService. 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.boolean
GPTDictationService. isAvailable(GPTConfiguration configuration)
Whether the service is enabled and properly configured.boolean
GPTChatCompletionService. isEnabled(GPTConfiguration gptConfig)
Checks whetherGPTChatCompletionService.isEnabled()
and whether gptConfig enables executing GPT calls.GPTConfiguration
GPTConfiguration. merge(GPTConfiguration other)
Creates a configuration that joins the values.GPTConfiguration
GPTConfiguration. merge(GPTConfiguration other, boolean override)
Creates a configuration that joins the values.static GPTConfiguration
GPTConfiguration. merge(GPTConfiguration first, GPTConfiguration second)
merge(GPTConfiguration)
several configurations.GPTChatRequest
GPTChatRequest. setConfiguration(GPTConfiguration configuration)
Optionally, sets the configuration.String
GPTTranslationService. 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.void
GPTTranslationService. 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.String
GPTDictationService. 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 GPTConfiguration
GPTTranslationServiceImpl. getServiceConfiguration()
Methods in com.composum.ai.backend.base.service.chat.impl with parameters of type GPTConfiguration Modifier and Type Method Description protected void
GPTChatCompletionServiceImpl. checkEnabled(GPTConfiguration gptConfig)
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.String
GPTContentCreationServiceImpl. 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)
boolean
GPTDictationServiceImpl. isAvailable(GPTConfiguration configuration)
boolean
GPTChatCompletionServiceImpl. isEnabled(GPTConfiguration gptConfig)
boolean
GPTInternalOpenAIHelper. isEnabled(GPTConfiguration gptConfig)
Checks whether ChatGPT is generally and whether gptConfig enables executing GPT calls.protected org.apache.hc.client5.http.async.methods.SimpleHttpRequest
GPTChatCompletionServiceImpl. makeRequest(String jsonRequest, GPTConfiguration gptConfiguration, String url)
String
GPTTranslationServiceImpl. 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.void
GPTTranslationServiceImpl. streamingSingleTranslation(String text, String sourceLanguage, String targetLanguage, GPTConfiguration configuration, GPTCompletionCallback callback)
String
GPTDictationServiceImpl. 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 GPTConfiguration
AIConfigurationPlugin. getGPTConfiguration(org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)
Reads the GPTConfiguration from sling context aware configurations.GPTConfiguration
AIConfigurationService. 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 GPTChatRequest
AICreateServlet. 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 GPTConfiguration
AIConfigurationServiceImpl. getGPTConfiguration(@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)
GPTConfiguration
SlingCaConfigPluginImpl. getGPTConfiguration(org.apache.sling.api.resource.ResourceResolver resourceResolver, String contentPath)
-