A B C D E F G H I J L M O P R S T U V W 
All Classes All Packages

A

accept(String) - Method in class com.composum.ai.backend.base.service.StringstreamSlowdown
 
activate(GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig, BundleContext) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
activate(GPTTranslationServiceImpl.Config) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
addMessage(GPTMessageRole, String) - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Builder style adding of messages.
addMessages(List<GPTChatMessage>) - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Builder style adding of messages.
apiKey - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
The OpenAI Key for accessing ChatGPT; system default if not given in request.
ASSISTANT - com.composum.ai.backend.base.service.chat.GPTMessageRole
The assistant messages help store prior responses.
ASSISTANT - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.Role
 

B

buildException(Integer, String) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
buildResult() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
bundleContext - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

C

cacheDir - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
cacheResponse(String, GPTChatRequest, String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
callback - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
cancelled() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.EnsureResultFutureCallback
 
capacityIncrement() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
CHAT - com.composum.ai.backend.base.service.chat.GPTConfiguration.Mode
Uses a system prompt appropriate for a chat.
CHAT - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
CHAT_COMPLETION_URL - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
ChatCompletionChoice - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionChoice() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
ChatCompletionChoiceMessage - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionChoiceMessage() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoiceMessage
 
ChatCompletionMessage - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionMessage() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
ChatCompletionMessagePart - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
A text part or image part of a chat completion message.
ChatCompletionMessagePart() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
ChatCompletionMessagePart.ChatCompletionMessagePartListDeSerializer - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionMessagePart.ChatCompletionMessageUrlPart - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
Encodes URL part: { "url": "https://example.com/somepicture.jpg" }
ChatCompletionMessagePart.ImageDetail - Enum in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionMessagePart.Type - Enum in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionMessagePartListDeSerializer() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessagePartListDeSerializer
 
ChatCompletionMessageUrlPart() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessageUrlPart
 
ChatCompletionRequest - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionRequest() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
ChatCompletionRequest.ResponseFormat - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionRequest.ResponseFormatType - Enum in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionRequest.Role - Enum in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionResponse - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionResponse() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
ChatCompletionResponse.FinishReason - Enum in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
chatCompletionService - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
chatCompletionService - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
chatCompletionService - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
chatCompletionUrl - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
chatCompletionUrl() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
ChatCompletionUsage - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
ChatCompletionUsage() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
checkEnabled() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
checkEnabled(GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
checkTokenCount(String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
close() - Method in class com.composum.ai.backend.base.service.StringstreamSlowdown
 
com.composum.ai.backend.base - package com.composum.ai.backend.base
Composum ChatGPT Base : Base classes for the ChatGPT backend.
com.composum.ai.backend.base.impl - package com.composum.ai.backend.base.impl
 
com.composum.ai.backend.base.service - package com.composum.ai.backend.base.service
 
com.composum.ai.backend.base.service.chat - package com.composum.ai.backend.base.service.chat
 
com.composum.ai.backend.base.service.chat.impl - package com.composum.ai.backend.base.service.chat.impl
 
com.composum.ai.backend.base.service.chat.impl.chatmodel - package com.composum.ai.backend.base.service.chat.impl.chatmodel
 
completed(Void) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.EnsureResultFutureCallback
 
config - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
connectionTimeout - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
connectionTimeout() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
CONTENT_FILTER - com.composum.ai.backend.base.service.chat.GPTFinishReason
Omitted content due to a flag from our content filters.
CONTENT_FILTER - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
 
convert(String) - Method in class com.composum.ai.backend.base.service.chat.impl.HtmlToMarkdownConverter
 
convertChildren(Node) - Method in class com.composum.ai.backend.base.service.chat.impl.HtmlToMarkdownConverter
 
cosineSimilarity(float[], float[]) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
countTokens(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Counts the number of tokens for the text for the normally used model.
countTokens(String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
createJsonRequest(GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

D

data(CharBuffer, boolean) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
deactivate() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
deactivate() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
DEBUG - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
If set, the AI services will not call the AI but return the JSON request as response, for debugging purposes.
decodeFloatArray(String) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
DEFAULT_EMBEDDINGS_MODEL - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULT_HIGH_INTELLIGENCE_MODEL - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULT_IMAGE_MODEL - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULT_MODEL - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
defaultModel - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
defaultModel() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
DEFAULTVALUE_CONNECTIONTIMEOUT - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULTVALUE_REQUESTS_PER_DAY - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULTVALUE_REQUESTS_PER_HOUR - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULTVALUE_REQUESTS_PER_MINUTE - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
DEFAULTVALUE_REQUESTTIMEOUT - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
deserialize(JsonElement, Type, JsonDeserializationContext) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessagePartListDeSerializer
 
disabled - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
disabled() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
disabled() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl.Config
 
diskCache() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl.Config
 

E

EmbeddingObject() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingObject
 
EmbeddingRequest() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
EmbeddingResponse() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingResponse
 
embeddingsLimiter - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Rate limiter for embeddings.
embeddingsModel - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
embeddingsModel() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
embeddingsUrl - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
embeddingsUrl() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
enc - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Tokenizer used for GPT-3.5 and GPT-4.
encodeFloatArray(float[]) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
ensureEmptyOrEndsWith(String) - Method in class com.composum.ai.backend.base.service.chat.impl.HtmlToMarkdownConverter
We ensure sb is either empty or that it ends with the given suffix.
ensureEnabled() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
EnsureResultFutureCallback(CompletableFuture<Void>) - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.EnsureResultFutureCallback
 
equals(Object) - Method in class com.composum.ai.backend.base.service.chat.GPTChatMessage
 
equals(Object) - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
 
equals(Object) - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
errorStatusCode - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
If set, we collect the data for the error message, of false we process it as stream.
executePrompt(String, GPTChatRequest) - Method in interface com.composum.ai.backend.base.service.chat.GPTContentCreationService
Executes a given prompt from the user using ChatGPT.
executePrompt(String, GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
executePromptOnText(String, String, GPTChatRequest) - Method in interface com.composum.ai.backend.base.service.chat.GPTContentCreationService
Executes a given prompt from the user using ChatGPT, using the given text as context.
executePromptOnText(String, String, GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
executePromptOnTextStreaming(String, String, GPTChatRequest, GPTCompletionCallback) - Method in interface com.composum.ai.backend.base.service.chat.GPTContentCreationService
Executes a given prompt from the user using ChatGPT, using the given text as context.
executePromptOnTextStreaming(String, String, GPTChatRequest, GPTCompletionCallback) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
executePromptStreaming(String, GPTChatRequest, GPTCompletionCallback) - Method in interface com.composum.ai.backend.base.service.chat.GPTContentCreationService
Executes a given prompt from the user using ChatGPT.
executePromptStreaming(String, GPTChatRequest, GPTCompletionCallback) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
extractRetryableException(Throwable) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

F

failed(Exception) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.EnsureResultFutureCallback
 
failed(Exception) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
fakeTranslation() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl.Config
 
fakeTranslation(String) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
This turns the capitalization of every odd letter in each word on it's head.
findMostRelated(String, List<String>, int, GPTConfiguration, GPTEmbeddingService.EmbeddingsCache) - Method in interface com.composum.ai.backend.base.service.chat.GPTEmbeddingService
Determines the at most limit to query semantically closest of the comparedStrings according to the embedding service.
findMostRelated(String, List<String>, int, GPTConfiguration, GPTEmbeddingService.EmbeddingsCache) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
flush() - Method in class com.composum.ai.backend.base.service.StringstreamSlowdown
 
fragmentedTranslation(List<String>, String, GPTConfiguration) - Method in interface com.composum.ai.backend.base.service.chat.GPTTranslationService
Translates the texts into the target language.
fragmentedTranslation(List<String>, String, GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
We join all text fragments we have to translate into one big texts separated with separators like `%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 573472 %%%%%%%%%%%%%%%%` and then translate that.
fragmentedTranslation(List<String>, String, GPTConfiguration, AtomicInteger) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
fragmentedTranslationDivideAndConquer(List<String>, String, GPTConfiguration, AtomicInteger) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
We try to translate the whole lot of texts.
fromChatGPT(String) - Static method in enum com.composum.ai.backend.base.service.chat.GPTFinishReason
 
FUNCTION_CALL - com.composum.ai.backend.base.service.chat.GPTFinishReason
Model decided to call a function.

G

GENERATE - com.composum.ai.backend.base.service.chat.GPTConfiguration.Mode
Uses a system prompt appropriate for text generation.
GENERATE - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
generateDescription(String, int, GPTConfiguration) - Method in interface com.composum.ai.backend.base.service.chat.GPTContentCreationService
Generates a description from the given text.
generateDescription(String, int, GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
generateKeywords(String, GPTConfiguration) - Method in interface com.composum.ai.backend.base.service.chat.GPTContentCreationService
Generates a list of keywords from the given text.
generateKeywords(String, GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
getAdditionalInstructions() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
Optionally, additional instructions to add to the system prompt.
getAnswerType() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
The type of answer we want from the LLM.
getApiKey() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
The API key to use with ChatGPT or another service.
getCachedEmbedding(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTEmbeddingService.EmbeddingsCache
 
getCachedResponse(String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
getChoices() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getCompletionTokens() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
getConfiguration() - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Sets the LLM configuration
getContent() - Method in class com.composum.ai.backend.base.service.chat.GPTChatMessage
The content of the message, be that an answer of the assistant or a question of the user.
getContent() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoiceMessage
 
getContent() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
getCreated() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getCurrentTimeMillis() - Method in class com.composum.ai.backend.base.impl.RateLimiter
Provides the possibility to fake time, for easy unittests.
getData() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingResponse
 
getDebug() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
If this is set, then the services will not call the AI and return the JSON request instead of the AI response.
getDelta() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
Alternative to ChatCompletionChoice.getMessage() if it's a response chunk.
getDetail() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessageUrlPart
 
getDimensions() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
getEmbedding() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingObject
 
getEmbeddings(List<String>, GPTConfiguration) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Calculates embeddings for the given list of texts.
getEmbeddings(List<String>, GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
getEmbeddings(List<String>, GPTConfiguration, GPTEmbeddingService.EmbeddingsCache) - Method in interface com.composum.ai.backend.base.service.chat.GPTEmbeddingService
Get embeddings for the given texts.
getEmbeddings(List<String>, GPTConfiguration, GPTEmbeddingService.EmbeddingsCache) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
getEmbeddingsModel() - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
getEmbeddingsModel() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
getEncodingFormat() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
getError() - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
getFinishReason() - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
getFinishReason() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
getGetTemplateStreamFromBundle(Bundle, String) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
getGetTemplateStreamFromClassloader(ClassLoader, String) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
getId() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getImageUrl() - Method in class com.composum.ai.backend.base.service.chat.GPTChatMessage
The URL with the content of the image to be analyzed.
getImageUrl() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
getIndex() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
getIndex() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingObject
 
getInput() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
getMaxTokens() - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Optionally the maximum number of tokens (approx.
getMaxTokens() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
getMessage() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
getMessageLineBlocks(Iterator<String>) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
split the lines into blocks of lines where the first line is matching MESSAGE_SEPARATOR
getMessages() - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Returns the chat messages set with GPTChatRequest.addMessage(GPTMessageRole, String).
getMessages() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
getMessages(Map<String, String>) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
Returns a list of messages with the placeholders replaced.
getMode() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
getModel() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
getModel() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getModel() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
getObject() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getOrganizationId() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
The organization id to use with ChatGPT.
getPromptTokens() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
getResponseFormat() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
getResult() - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
getRole() - Method in class com.composum.ai.backend.base.service.chat.GPTChatMessage
Function of the message in the dialog.
getRole() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoiceMessage
 
getRole() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
getSingleChatCompletion(GPTChatRequest) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
The simplest case: give some messages and get a single response.
getSingleChatCompletion(GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
getSystemFingerprint() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getTemperature() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
getTemplate(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Retrieves a (usually cached) chat template with that name.
getTemplate(String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
getText() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
getTime() - Method in class com.composum.ai.backend.base.service.StringstreamSlowdown
 
getTotalTokens() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
getType() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
getType() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormat
 
getUrl() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessageUrlPart
 
getUsage() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
getUser() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
GPTChatCompletionService - Interface in com.composum.ai.backend.base.service.chat
Raw abstraction of the ChatGPT chat interface, with only the details that are needed.
GPTChatCompletionServiceImpl - Class in com.composum.ai.backend.base.service.chat.impl
Implements the actual access to the ChatGPT chat API.
GPTChatCompletionServiceImpl() - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
GPTChatCompletionServiceImpl.EnsureResultFutureCallback - Class in com.composum.ai.backend.base.service.chat.impl
Makes doubly sure that result is somehow set after the call.
GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig - Annotation Type in com.composum.ai.backend.base.service.chat.impl
 
GPTChatCompletionServiceImpl.RetryableException - Exception in com.composum.ai.backend.base.service.chat.impl
Thrown when we get a 429 rate limiting response.
GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer - Class in com.composum.ai.backend.base.service.chat.impl
 
GPTChatMessage - Class in com.composum.ai.backend.base.service.chat
A chat message in a dialog with ChatGPT.
GPTChatMessage(GPTMessageRole, String) - Constructor for class com.composum.ai.backend.base.service.chat.GPTChatMessage
 
GPTChatMessage(GPTMessageRole, String, String) - Constructor for class com.composum.ai.backend.base.service.chat.GPTChatMessage
 
GPTChatMessagesTemplate - Class in com.composum.ai.backend.base.service.chat.impl
 
GPTChatMessagesTemplate(InputStream, String) - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
GPTChatMessagesTemplate(ClassLoader, String) - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
GPTChatMessagesTemplate(Bundle, String) - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
GPTChatRequest - Class in com.composum.ai.backend.base.service.chat
A request to ChatGPT.
GPTChatRequest() - Constructor for class com.composum.ai.backend.base.service.chat.GPTChatRequest
 
GPTChatRequest(GPTConfiguration) - Constructor for class com.composum.ai.backend.base.service.chat.GPTChatRequest
 
GPTChatRequest(List<GPTChatMessage>) - Constructor for class com.composum.ai.backend.base.service.chat.GPTChatRequest
 
GPTCompletionCallback - Interface in com.composum.ai.backend.base.service.chat
For a streaming mode this is given as parameter for the method call and receives the streamed data; the method returns only when the response is complete.
GPTCompletionCallback.GPTCompletionCollector - Class in com.composum.ai.backend.base.service.chat
A simple collector that just takes note of things.
GPTCompletionCollector() - Constructor for class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
GPTConfiguration - Class in com.composum.ai.backend.base.service.chat
A configuration to use for accessing the external LLM service.
GPTConfiguration(String, String, GPTConfiguration.AnswerType) - Constructor for class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
GPTConfiguration(String, String, GPTConfiguration.AnswerType, String) - Constructor for class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
GPTConfiguration(String, String, GPTConfiguration.AnswerType, String, GPTConfiguration.Mode) - Constructor for class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
GPTConfiguration(String, String, GPTConfiguration.AnswerType, String, GPTConfiguration.Mode, Boolean) - Constructor for class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
GPTConfiguration(String, String, GPTConfiguration.AnswerType, String, GPTConfiguration.Mode, Boolean, Boolean) - Constructor for class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
GPTConfiguration.AnswerType - Enum in com.composum.ai.backend.base.service.chat
 
GPTConfiguration.Mode - Enum in com.composum.ai.backend.base.service.chat
 
GPTContentCreationService - Interface in com.composum.ai.backend.base.service.chat
Service to generate content (keywords / descriptions from a text, and so forth.)
GPTContentCreationServiceImpl - Class in com.composum.ai.backend.base.service.chat.impl
Building on GPTChatCompletionService this implements generating keywords.
GPTContentCreationServiceImpl() - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
GPTContextLengthExceededException(String) - Constructor for exception com.composum.ai.backend.base.service.GPTException.GPTContextLengthExceededException
 
GPTEmbeddingService - Interface in com.composum.ai.backend.base.service.chat
Methods related to embeddings.
GPTEmbeddingService.EmbeddingsCache - Interface in com.composum.ai.backend.base.service.chat
Optional cache for embedding values.
GPTEmbeddingServiceImpl - Class in com.composum.ai.backend.base.service.chat.impl
 
GPTEmbeddingServiceImpl() - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTEmbeddingServiceImpl
 
GPTException - Exception in com.composum.ai.backend.base.service
Any kind of error when accessing GPT.
GPTException(String) - Constructor for exception com.composum.ai.backend.base.service.GPTException
 
GPTException(String, Throwable) - Constructor for exception com.composum.ai.backend.base.service.GPTException
 
GPTException(Throwable) - Constructor for exception com.composum.ai.backend.base.service.GPTException
 
GPTException.GPTContextLengthExceededException - Exception in com.composum.ai.backend.base.service
GPTException.GPTRetryableResponseErrorException - Exception in com.composum.ai.backend.base.service
An exception that is thrown when the response from the GPT service is not as expected.
GPTFinishReason - Enum in com.composum.ai.backend.base.service.chat
 
gptLimiter - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
If set, this tells the limits of ChatGPT API itself.
GPTMessageRole - Enum in com.composum.ai.backend.base.service.chat
Role of a GPTChatMessage in a dialog with ChatGPT.
GPTRetryableResponseErrorException(String) - Constructor for exception com.composum.ai.backend.base.service.GPTException.GPTRetryableResponseErrorException
 
GPTTranslationService - Interface in com.composum.ai.backend.base.service.chat
Building on GPTChatCompletionService this implements translation.
GPTTranslationServiceImpl - Class in com.composum.ai.backend.base.service.chat.impl
Building on GPTChatCompletionService this implements translation.
GPTTranslationServiceImpl() - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
GPTTranslationServiceImpl.Config - Annotation Type in com.composum.ai.backend.base.service.chat.impl
 
gson - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

H

handleStreamingEvent(GPTCompletionCallback, long, String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Handle a single line of the streaming response.
hashCode() - Method in class com.composum.ai.backend.base.service.chat.GPTChatMessage
 
hashCode() - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
 
hashCode() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
HIGH - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ImageDetail
 
HIGH_INTELLIGENCE - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
Requests slower and more expensive "high intelligence" model - use sparingly.
highIntelligenceModel - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
highIntelligenceModel() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
highIntelligenceNeededIsSet() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
If true, this requires to uses the slower and more expensive high intelligence model - use sparingly for more challenging tasks.
highIntelligenceNeededIsUnset() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
If true, there is no information whether a "high intelligence model" is used - uses the default.
HTML - com.composum.ai.backend.base.service.chat.GPTConfiguration.AnswerType
Real HTML or, more likely, richtext as simplified HTML.
HTML - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
HTML_TAG_AT_START - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
htmlToMarkdown(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Helper for preprocessing HTML so that it can easily read by ChatGPT.
htmlToMarkdown(String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
HtmlToMarkdownConverter - Class in com.composum.ai.backend.base.service.chat.impl
A quick HTML markdown converter that handles the tags [a, strong, code, em, p, br, u, ul, li, ol] used in rich text editor.
HtmlToMarkdownConverter() - Constructor for class com.composum.ai.backend.base.service.chat.impl.HtmlToMarkdownConverter
 
httpAsyncClient - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

I

id - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
IMAGE_URL - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.Type
 
imageModel - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
imageModel() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
imageUrl(String) - Static method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
insertText(String) - Method in class com.composum.ai.backend.base.service.chat.impl.HtmlToMarkdownConverter
Split text into lines to add indentation before each line.
isEmpty(Void) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
isEmpty(Void) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
isEnabled() - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Whether ChatGPT completion is enabled.
isEnabled() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
isEnabled(GPTConfiguration) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Checks whether GPTChatCompletionService.isEnabled() and whether gptConfig enables executing GPT calls.
isEnabled(GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
isHtml() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
isStream() - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
isVisionEnabled() - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Returns true if vision is enabled.
isVisionEnabled() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

J

joinTexts(List<String>, List<String>) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
JSON - com.composum.ai.backend.base.service.chat.GPTConfiguration.AnswerType
JSON is not yet supported by all models, so a bit dangerous.
JSON - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
JSON - Static variable in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
JSON_OBJECT - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormatType
 

L

lastGptLimiterCreationTime - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
LASTID - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
LENGTH - com.composum.ai.backend.base.service.chat.GPTFinishReason
The response is not complete, but the maximum length has been reached.
LENGTH - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
 
limiter - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Limiter that maps the financial reasons to limit.
LOG - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
LOW - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ImageDetail
 

M

make(GPTChatMessage) - Static method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
make(GPTMessageRole) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.Role
 
make(String) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormatType
 
makeExecuteOnTextRequest(String, String, GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
makeExecutePromptRequest(String, GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
makeRequest(String, GPTConfiguration, String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
MARKDOWN - com.composum.ai.backend.base.service.chat.GPTConfiguration.AnswerType
The default if nothing is requested - markdown is the "native" output form at least of ChatGPT.
MARKDOWN - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
markdownToHtml(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
markdownToHtml(String) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
maximumTokensPerRequest - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
maximumTokensPerRequest() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
maximumTokensPerResponse - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
maximumTokensPerResponse() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
MAXTOKENS - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
To respect limits of ChatGPT we replace in texts longer than this many words we replace the middle with [...] TODO: use an intelligent algorithm to determine this limit, but that's pretty hard for executePromptOnText.
MAXTRIES - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
The maximum number of retries.
merge(GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
Creates a configuration that joins the values.
merge(GPTConfiguration, boolean) - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
Creates a configuration that joins the values.
merge(GPTConfiguration, GPTConfiguration) - Static method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
mergeIn(GPTChatRequest) - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Merges in additional parameters: maxtokens overwrites, if there is a system message it's appended to the current one, and the other messages are added at the back.
MESSAGE_SEPARATOR - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
matches the lines like ---------- system ---------- that separate the individual messages in the template
MULTITRANSLATION_SEPARATOR_END - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
End of separator like `573472 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%` .
MULTITRANSLATION_SEPARATOR_PATTERN - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
Regexp matching separator like `%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 573472 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%` (group "id" matches the number).
MULTITRANSLATION_SEPARATOR_START - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
Start of separator like `%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 573472 %%%%%%%%%%%%%%%%` .

O

of(String) - Static method in class com.composum.ai.backend.base.impl.RateLimiter
Tries to find something like "Limit: 3 / min." in errorbody and returns a RateLimiter for that.
ofAdditionalInstructions(String) - Static method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
ofMaxTokens(Integer) - Static method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Returns a new request with either maxTokens set if that's given, or just an empty request.
ofRichText(boolean) - Static method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
Returns GPTConfiguration.HTML if richText is true, GPTConfiguration.MARKDOWN otherwise.
onError(Throwable) - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
onError(Throwable) - Method in interface com.composum.ai.backend.base.service.chat.GPTCompletionCallback
Called when an error occurs.
onFinish(GPTFinishReason) - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
onFinish(GPTFinishReason) - Method in interface com.composum.ai.backend.base.service.chat.GPTCompletionCallback
This is called when the response is complete to specify the reason (e.g.
onNext(String) - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
onNext(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTCompletionCallback
Called when a couple of characters come in.
OPENAI_API_KEY - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Environment variable where we take the key from, if not configured directly.
OPENAI_API_KEY_SYSPROP - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
System property where we take the key from, if not configured directly.
OPENAI_EMBEDDINGS_URL - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
openAiApiKey() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
openAiApiKeyFile() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
OpenAIEmbeddings - Interface in com.composum.ai.backend.base.service.chat.impl.chatmodel
Request and response for OpenAI embeddings API.
OpenAIEmbeddings.EmbeddingObject - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
OpenAIEmbeddings.EmbeddingRequest - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
OpenAIEmbeddings.EmbeddingResponse - Class in com.composum.ai.backend.base.service.chat.impl.chatmodel
 
openAiOrganizationId() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
organizationId - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

P

PATTERN_HAS_LETTER - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
PATTERN_LIMIT_ERROR - Static variable in class com.composum.ai.backend.base.impl.RateLimiter
 
PATTERN_SEPARATE_WHITESPACE - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
Separate whitespace at the beginning and end from the non-whitespace text.
PATTERN_TRY_AGAIN - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
performCallAsync(CompletableFuture<Void>, long, SimpleHttpRequest, GPTCompletionCallback, int, long) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Executes a call with retries.
PLACEHOLDER_MARKER - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
If that's in a string, it likely contains placeholders.
PLACEHOLDER_PATTERN - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
PLACEHOLDER_TEXT - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
PLACEHOLDER_WORDCOUNTLIMIT - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
processBlocks(List<List<String>>) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
putCachedEmbedding(String, String) - Method in interface com.composum.ai.backend.base.service.chat.GPTEmbeddingService.EmbeddingsCache
 

R

RateLimiter - Class in com.composum.ai.backend.base.impl
This class is used to limit the rate of requests to the chat service.
RateLimiter(RateLimiter, int, int, TimeUnit) - Constructor for class com.composum.ai.backend.base.impl.RateLimiter
Constructs a rate limiter with a parent.
recalculateDelay(String, long) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
If the response body contains a string like "Please try again in 20s." (number varies) we return a value of that many seconds, otherwise just use iterative doubling.
registry - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
releaseResources() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
requestCounter - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
requestsPerDay() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
requestsPerHour() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
requestsPerMinute() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
requestTimeout - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
requestTimeout() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
ResponseFormat() - Constructor for class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormat
 
result - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.EnsureResultFutureCallback
 
result - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
resultBuilder - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
retrieveForwardFragment() - Method in class com.composum.ai.backend.base.service.StringstreamSlowdown
Returns the longest fragment of StringstreamSlowdown.collected ending in a whitespace or punctuation character.
retrieveOpenAIKey(GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
RetryableException(String) - Constructor for exception com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.RetryableException
 

S

sb - Variable in class com.composum.ai.backend.base.service.chat.impl.HtmlToMarkdownConverter
 
scheduledExecutorService - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
separateResultTexts(String, List<String>, List<String>, String) - Static method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
serialize(List<ChatCompletionMessagePart>, Type, JsonSerializationContext) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessagePartListDeSerializer
To save space: if there is only one element in src that also is a text message, we serialize it as a string, otherwise as object list.
setChoices(List<ChatCompletionChoice>) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setCompletionTokens(int) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
setConfiguration(GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Optionally, sets the configuration.
setContent(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoiceMessage
 
setContent(List<ChatCompletionMessagePart>) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
setCreated(long) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setData(List<OpenAIEmbeddings.EmbeddingObject>) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingResponse
 
setDelta(ChatCompletionChoiceMessage) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
setDetail(ChatCompletionMessagePart.ImageDetail) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessageUrlPart
 
setDimensions(Integer) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
setEmbedding(float[]) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingObject
 
setEncodingFormat(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
setFinishReason(ChatCompletionResponse.FinishReason) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
setId(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setImageUrl(ChatCompletionMessagePart.ChatCompletionMessageUrlPart) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
setIndex(int) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
setIndex(Integer) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingObject
 
setInput(List<String>) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
setLoggingId(String) - Method in class com.composum.ai.backend.base.service.chat.GPTCompletionCallback.GPTCompletionCollector
 
setLoggingId(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTCompletionCallback
For debugging: this sets the internal ID that is used for logging purposes.
setMaxTokens(Integer) - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
Optionally, sets the maximum number of tokens (approx.
setMaxTokens(Integer) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
setMessage(ChatCompletionChoiceMessage) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
setMessages(List<ChatCompletionMessage>) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
setModel(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
setModel(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setModel(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
setObject(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setPromptTokens(int) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
setRequest(String) - Method in interface com.composum.ai.backend.base.service.chat.GPTCompletionCallback
For debugging - the request that was sent to ChatGPT as JSON.
setResponseFormat(ChatCompletionRequest.ResponseFormat) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
setRole(ChatCompletionRequest.Role) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoiceMessage
 
setRole(ChatCompletionRequest.Role) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
 
setStream(Boolean) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
setSystemFingerprint(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setTemperature(Double) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest
 
setText(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
setTotalTokens(int) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionUsage
 
setType(ChatCompletionMessagePart.Type) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
setType(ChatCompletionRequest.ResponseFormatType) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormat
 
setUrl(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ChatCompletionMessageUrlPart
 
setUsage(ChatCompletionUsage) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse
 
setUser(String) - Method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.OpenAIEmbeddings.EmbeddingRequest
 
shorten(String, int) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Helper method to shorten texts by taking out the middle if too long.
shorten(String, int) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
singleTranslation(String, String, String, GPTConfiguration) - Method in interface com.composum.ai.backend.base.service.chat.GPTTranslationService
Translate the text from the target to destination language, either Java locale name or language name.
singleTranslation(String, String, String, GPTConfiguration) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
Translate the text from the target to destination language, either Java locale name or language name.
sleep(long) - Method in class com.composum.ai.backend.base.impl.RateLimiter
Provides the possibility to fake time, for easy unittests.
STANDARD_INTELLIGENCE - Static variable in class com.composum.ai.backend.base.service.chat.GPTConfiguration
Requests faster and less expensive "normal intelligence" model.
start(HttpResponse, ContentType) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
 
STOP - com.composum.ai.backend.base.service.chat.GPTFinishReason
The response is complete.
STOP - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
 
StreamDecodingResponseConsumer(GPTCompletionCallback, CompletableFuture<Void>, long) - Constructor for class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.StreamDecodingResponseConsumer
The result of the webservice call is written to callback; result is set when either it completed or aborted.
streamingChatCompletion(GPTChatRequest, GPTCompletionCallback) - Method in interface com.composum.ai.backend.base.service.chat.GPTChatCompletionService
Give some messages and receive the streaming response via callback, to reduce waiting time.
streamingChatCompletion(GPTChatRequest, GPTCompletionCallback) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
streamingSingleTranslation(String, String, String, GPTConfiguration, GPTCompletionCallback) - Method in interface com.composum.ai.backend.base.service.chat.GPTTranslationService
Translate the text from the target to destination language, either Java locale name or language name.
streamingSingleTranslation(String, String, String, GPTConfiguration, GPTCompletionCallback) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
 
StringstreamSlowdown - Class in com.composum.ai.backend.base.service
For a stream of String segments (like the ChatGPT tokens that trickle in from ChatGPT when streaming) this collects the parts and forwards the collected part every 500ms to a given consumer.
StringstreamSlowdown(Consumer<String>, long) - Constructor for class com.composum.ai.backend.base.service.StringstreamSlowdown
Sets the target where we forward the collected strings.
SYSTEM - com.composum.ai.backend.base.service.chat.GPTMessageRole
The system message helps set the behavior of the assistant.
SYSTEM - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.Role
 

T

temperature - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
temperature() - Method in annotation type com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl.GPTChatCompletionServiceConfig
 
TEMPLATE_CHATPROMPTONTEXT - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
TEMPLATE_MAKEDESCRIPTION - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
TEMPLATE_MAKEKEYWORDS - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
Template for GPTChatMessagesTemplate to generate keywords from a text.
TEMPLATE_PROMPTONTEXT - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTContentCreationServiceImpl
 
TEMPLATE_SINGLETRANSLATION - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTTranslationServiceImpl
Template for GPTChatMessagesTemplate to translate a single word or phrase.
TEMPLATEDIR - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
templates - Variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
TEMPLATESUFFIX - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatMessagesTemplate
 
text(String) - Static method in class com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart
 
TEXT - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.Type
 
TEXT - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormatType
 
toGPTFinishReason(ChatCompletionResponse.FinishReason) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
 
toString() - Method in class com.composum.ai.backend.base.service.chat.GPTChatMessage
String representation only for debugging.
toString() - Method in class com.composum.ai.backend.base.service.chat.GPTChatRequest
 
toString() - Method in class com.composum.ai.backend.base.service.chat.GPTConfiguration
 
toString() - Method in enum com.composum.ai.backend.base.service.chat.GPTMessageRole
 
triggerCallAsync(long, SimpleHttpRequest, GPTCompletionCallback) - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
Puts the call into the pipeline; the returned future will be set normally or exceptionally when it's done.
TRUNCATE_MARKER - Static variable in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 

U

USER - com.composum.ai.backend.base.service.chat.GPTMessageRole
The user messages help instruct the assistant.
USER - com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.Role
 

V

valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.GPTConfiguration.AnswerType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.GPTConfiguration.Mode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.GPTFinishReason
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.GPTMessageRole
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ImageDetail
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormatType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.Role
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.composum.ai.backend.base.service.chat.GPTConfiguration.AnswerType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.GPTConfiguration.Mode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.GPTFinishReason
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.GPTMessageRole
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.ImageDetail
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessagePart.Type
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.ResponseFormatType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionRequest.Role
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
Returns an array containing the constants of this enum type, in the order they are declared.

W

waitForLimit() - Method in class com.composum.ai.backend.base.impl.RateLimiter
For a synchronous call: waitForLimit() has to be called before starting the request; it'll make sure the rate limit is not exceeded.
waitForLimit() - Method in class com.composum.ai.backend.base.service.chat.impl.GPTChatCompletionServiceImpl
 
A B C D E F G H I J L M O P R S T U V W 
All Classes All Packages