Uses of Class
com.composum.ai.backend.base.service.chat.GPTChatRequest
-
Packages that use GPTChatRequest Package Description com.composum.ai.backend.base.service.chat com.composum.ai.backend.base.service.chat.impl -
-
Uses of GPTChatRequest in com.composum.ai.backend.base.service.chat
Methods in com.composum.ai.backend.base.service.chat that return GPTChatRequest Modifier and Type Method Description GPTChatRequestGPTChatRequest. addMessage(GPTChatMessage message)Builder style adding of messages.GPTChatRequestGPTChatRequest. addMessage(GPTMessageRole role, String content)Builder style adding of messages.GPTChatRequestGPTChatRequest. addMessages(List<GPTChatMessage> messages)Builder style adding of messages.GPTChatRequestGPTChatRequest. copy()Returns a copy; the messages list is shallowly copied, but configuration is the same object.static GPTChatRequestGPTChatRequest. ofMaxTokens(Integer maxTokens)Returns a new request with either maxTokens set if that's given, or just an empty request.GPTChatRequestGPTChatRequest. setConfiguration(GPTConfiguration configuration)Optionally, sets the configuration.GPTChatRequestGPTChatRequest. setMaxTokens(Integer maxTokens)Optionally, sets the maximum number of tokens (approx.Methods in com.composum.ai.backend.base.service.chat with parameters of type GPTChatRequest Modifier and Type Method Description StringGPTContentCreationService. executePrompt(String prompt, GPTChatRequest additionalParameters)Executes a given prompt from the user using ChatGPT.StringGPTContentCreationService. executePromptOnText(String prompt, String text, GPTChatRequest additionalParameters)Executes a given prompt from the user using ChatGPT, using the given text as context.voidGPTContentCreationService. executePromptOnTextStreaming(String prompt, String text, GPTChatRequest additionalParameters, GPTCompletionCallback callback)Executes a given prompt from the user using ChatGPT, using the given text as context.voidGPTContentCreationService. executePromptStreaming(String prompt, GPTChatRequest additionalParameters, GPTCompletionCallback callback)Executes a given prompt from the user using ChatGPT.StringGPTChatCompletionService. getSingleChatCompletion(GPTChatRequest request)The simplest case: give some messages and get a single response.voidGPTChatRequest. mergeIn(GPTChatRequest additionalParameters)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.voidGPTChatCompletionService. streamingChatCompletion(GPTChatRequest request, GPTCompletionCallback callback)Give some messages and receive the streaming response via callback, to reduce waiting time.voidGPTChatCompletionService. streamingChatCompletionWithToolCalls(GPTChatRequest request, GPTCompletionCallback callback)Give some messages and receive the streaming response via callback, to reduce waiting time. -
Uses of GPTChatRequest in com.composum.ai.backend.base.service.chat.impl
Methods in com.composum.ai.backend.base.service.chat.impl that return GPTChatRequest Modifier and Type Method Description protected GPTChatRequestGPTContentCreationServiceImpl. makeExecuteOnTextRequest(String prompt, String text, GPTChatRequest additionalParameters)protected GPTChatRequestGPTContentCreationServiceImpl. makeExecutePromptRequest(String prompt, GPTChatRequest additionalParameters)Methods in com.composum.ai.backend.base.service.chat.impl with parameters of type GPTChatRequest Modifier and Type Method Description protected voidGPTTranslationServiceImpl. cacheResponse(String cacheKey, GPTChatRequest request, String response)protected ChatCompletionRequestGPTChatCompletionServiceImpl. createExternalRequest(GPTChatRequest request)Creates the external request.StringGPTContentCreationServiceImpl. executePrompt(String prompt, GPTChatRequest additionalParameters)StringGPTContentCreationServiceImpl. executePromptOnText(String prompt, String text, GPTChatRequest additionalParameters)voidGPTContentCreationServiceImpl. executePromptOnTextStreaming(String prompt, String text, GPTChatRequest additionalParameters, GPTCompletionCallback callback)voidGPTContentCreationServiceImpl. executePromptStreaming(String prompt, GPTChatRequest additionalParameters, GPTCompletionCallback callback)StringGPTChatCompletionServiceImpl. getSingleChatCompletion(GPTChatRequest request)protected GPTChatRequestGPTContentCreationServiceImpl. makeExecuteOnTextRequest(String prompt, String text, GPTChatRequest additionalParameters)protected GPTChatRequestGPTContentCreationServiceImpl. makeExecutePromptRequest(String prompt, GPTChatRequest additionalParameters)voidGPTChatCompletionServiceImpl. streamingChatCompletion(GPTChatRequest request, GPTCompletionCallback callback)voidGPTChatCompletionServiceImpl. streamingChatCompletionWithToolCalls(GPTChatRequest request, GPTCompletionCallback callback)
-