Uses of Class
com.composum.ai.backend.base.service.chat.GPTConfiguration
-
Packages that use GPTConfiguration Package Description com.composum.ai.backend.base.service.chat com.composum.ai.backend.base.service.chat.impl -
-
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. 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. ofRichText(boolean richText)
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.List<String>
GPTTranslationService. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration)
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
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.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 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)
List<String>
GPTTranslationServiceImpl. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration)
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. fragmentedTranslation(List<String> texts, String targetLanguage, GPTConfiguration configuration, AtomicInteger permittedRetries)
protected List<String>
GPTTranslationServiceImpl. fragmentedTranslationDivideAndConquer(List<String> texts, String targetLanguage, GPTConfiguration configuration, AtomicInteger permittedRetries)
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)
boolean
GPTChatCompletionServiceImpl. isEnabled(GPTConfiguration gptConfig)
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)
-