Class AskOutput.Builder
- java.lang.Object
-
- de.xima.fc.prompt.ms.impl.service.generic_oai.client.model.AskOutput.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AskOutput.Builderanswer(String answer)Sets the generated response text.AskOutputbuild()Builds and returns the response object.AskOutput.BuilderinputTokens(Long inputTokens)Sets the tokens that were consumed from the input prompt.AskOutput.BuilderoutputTokens(Long outputTokens)Sets the tokens that were generated in the output response.AskOutput.BuildertotalTokens(Long totalTokens)Sets the total number of tokens used in the request.
-
-
-
Method Detail
-
answer
@CanIgnoreReturnValue public AskOutput.Builder answer(String answer)
Sets the generated response text.- Parameters:
answer- The generated response text.- Returns:
- The builder instance for chaining.
-
build
public AskOutput build()
Builds and returns the response object. Subsequent modifications to the builder will not affect the constructed object.- Returns:
- The constructed response.
-
inputTokens
@CanIgnoreReturnValue public AskOutput.Builder inputTokens(Long inputTokens)
Sets the tokens that were consumed from the input prompt.- Parameters:
inputTokens- The number of input tokens.- Returns:
- The builder instance for chaining.
-
outputTokens
@CanIgnoreReturnValue public AskOutput.Builder outputTokens(Long outputTokens)
Sets the tokens that were generated in the output response.- Parameters:
outputTokens- The number of output tokens.- Returns:
- The builder instance for chaining.
-
totalTokens
@CanIgnoreReturnValue public AskOutput.Builder totalTokens(Long totalTokens)
Sets the total number of tokens used in the request.- Parameters:
totalTokens- The total number of tokens.- Returns:
- The builder instance for chaining.
-
-