Package org.codelibs.fess.llm
Class LlmChatResponse
java.lang.Object
org.codelibs.fess.llm.LlmChatResponse
Response object for LLM chat completion.
- Author:
- FessProject
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.LlmChatResponse(String content) Creates a response with the specified content. -
Method Summary
Modifier and TypeMethodDescriptionGets the number of completion tokens.Gets the response content.Gets the finish reason.getModel()Gets the model name.Gets the number of prompt tokens.Gets the total number of tokens.voidsetCompletionTokens(Integer completionTokens) Sets the number of completion tokens.voidsetContent(String content) Sets the response content.voidsetFinishReason(String finishReason) Sets the finish reason.voidSets the model name.voidsetPromptTokens(Integer promptTokens) Sets the number of prompt tokens.voidsetTotalTokens(Integer totalTokens) Sets the total number of tokens.
-
Constructor Details
-
LlmChatResponse
public LlmChatResponse()Default constructor. -
LlmChatResponse
Creates a response with the specified content.- Parameters:
content- the response content
-
-
Method Details
-
getContent
Gets the response content.- Returns:
- the content
-
setContent
Sets the response content.- Parameters:
content- the content
-
getFinishReason
Gets the finish reason.- Returns:
- the finish reason
-
setFinishReason
Sets the finish reason.- Parameters:
finishReason- the finish reason
-
getPromptTokens
Gets the number of prompt tokens.- Returns:
- the prompt tokens count
-
setPromptTokens
Sets the number of prompt tokens.- Parameters:
promptTokens- the prompt tokens count
-
getCompletionTokens
Gets the number of completion tokens.- Returns:
- the completion tokens count
-
setCompletionTokens
Sets the number of completion tokens.- Parameters:
completionTokens- the completion tokens count
-
getTotalTokens
Gets the total number of tokens.- Returns:
- the total tokens count
-
setTotalTokens
Sets the total number of tokens.- Parameters:
totalTokens- the total tokens count
-
getModel
Gets the model name.- Returns:
- the model name
-
setModel
Sets the model name.- Parameters:
model- the model name
-