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 GPTChatRequest
GPTChatRequest. addMessage(GPTChatMessage message)
Builder style adding of messages.GPTChatRequest
GPTChatRequest. addMessage(GPTMessageRole role, String content)
Builder style adding of messages.GPTChatRequest
GPTChatRequest. addMessages(List<GPTChatMessage> messages)
Builder style adding of messages.GPTChatRequest
GPTChatRequest. copy()
Returns a copy; the messages list is shallowly copied, but configuration is the same object.static GPTChatRequest
GPTChatRequest. ofMaxTokens(Integer maxTokens)
Returns a new request with either maxTokens set if that's given, or just an empty request.GPTChatRequest
GPTChatRequest. setConfiguration(GPTConfiguration configuration)
Optionally, sets the configuration.GPTChatRequest
GPTChatRequest. 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 String
GPTContentCreationService. executePrompt(String prompt, GPTChatRequest additionalParameters)
Executes a given prompt from the user using ChatGPT.String
GPTContentCreationService. executePromptOnText(String prompt, String text, GPTChatRequest additionalParameters)
Executes a given prompt from the user using ChatGPT, using the given text as context.void
GPTContentCreationService. executePromptOnTextStreaming(String prompt, String text, GPTChatRequest additionalParameters, GPTCompletionCallback callback)
Executes a given prompt from the user using ChatGPT, using the given text as context.void
GPTContentCreationService. executePromptStreaming(String prompt, GPTChatRequest additionalParameters, GPTCompletionCallback callback)
Executes a given prompt from the user using ChatGPT.String
GPTChatCompletionService. getSingleChatCompletion(GPTChatRequest request)
The simplest case: give some messages and get a single response.void
GPTChatRequest. 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.void
GPTChatCompletionService. streamingChatCompletion(GPTChatRequest request, GPTCompletionCallback callback)
Give some messages and receive the streaming response via callback, to reduce waiting time.void
GPTChatCompletionService. 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 GPTChatRequest
GPTContentCreationServiceImpl. makeExecuteOnTextRequest(String prompt, String text, GPTChatRequest additionalParameters)
protected GPTChatRequest
GPTContentCreationServiceImpl. 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 void
GPTTranslationServiceImpl. cacheResponse(String cacheKey, GPTChatRequest request, String response)
protected String
GPTChatCompletionServiceImpl. createJsonRequest(GPTChatRequest request)
String
GPTContentCreationServiceImpl. executePrompt(String prompt, GPTChatRequest additionalParameters)
String
GPTContentCreationServiceImpl. executePromptOnText(String prompt, String text, GPTChatRequest additionalParameters)
void
GPTContentCreationServiceImpl. executePromptOnTextStreaming(String prompt, String text, GPTChatRequest additionalParameters, GPTCompletionCallback callback)
void
GPTContentCreationServiceImpl. executePromptStreaming(String prompt, GPTChatRequest additionalParameters, GPTCompletionCallback callback)
String
GPTChatCompletionServiceImpl. getSingleChatCompletion(GPTChatRequest request)
protected GPTChatRequest
GPTContentCreationServiceImpl. makeExecuteOnTextRequest(String prompt, String text, GPTChatRequest additionalParameters)
protected GPTChatRequest
GPTContentCreationServiceImpl. makeExecutePromptRequest(String prompt, GPTChatRequest additionalParameters)
void
GPTChatCompletionServiceImpl. streamingChatCompletion(GPTChatRequest request, GPTCompletionCallback callback)
void
GPTChatCompletionServiceImpl. streamingChatCompletionWithToolCalls(GPTChatRequest request, GPTCompletionCallback callback)
-