Class AskInput.Builder
java.lang.Object
de.xima.fc.prompt.ms.impl.service.generic_oai.client.model.AskInput.Builder
- Enclosing class:
AskInput
-
Method Summary
Modifier and TypeMethodDescriptionaddFile(FileContent file) Adds a file to be included in the request.build()Creates a new request instance from the builder.files(List<FileContent> files) Sets the optional file to include in the request.frequencyPenalty(Double frequencyPenalty) Number between -2.0 and 2.0.jsonSchema(String jsonSchema) Sets the JSON schema for the response format, as a serialized string.jsonSchemaDescription(String jsonSchemaDescription) Sets the description of the JSON schema to aid the model in understanding the purpose of the schema.jsonSchemaName(String jsonSchemaName) The name of the JSON schema, to aid the model in understanding the purpose of the schema.maxTokens(long maxTokens) Sets the maximum number of new tokens to generate.Sets the model to use for the request.presencePenalty(Double presencePenalty) Number between -2.0 and 2.0.Sets the prompt for the request.reasoningEffort(String reasoningEffort) Constrains effort on reasoning for reasoning models.safetyIdentifier(String safetyIdentifier) A stable identifier used to help detect users of your application that may be violating the service's usage policies.Sets the optional system prompt to guide the model's behavior.temperature(double temperature) Sets the temperature for the request.topP(double topP) Sets the top-p value for the request.
-
Method Details
-
addFile
Adds a file to be included in the request. If given, the model will use the file as context for generating a response.- Parameters:
file- The file to be included in the request.- Returns:
- The builder for chaining method calls.
-
build
Creates a new request instance from the builder.- Returns:
- The new request instance.
-
files
Sets the optional file to include in the request. If given, the model will use the file as context for generating a response.- Parameters:
files- The files to be included in the request.- Returns:
- The builder for chaining method calls.
-
frequencyPenalty
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.- Parameters:
frequencyPenalty- The frequency penalty.- Returns:
- The builder for chaining method calls.
-
jsonSchema
Sets the JSON schema for the response format, as a serialized string.- Parameters:
jsonSchema- The JSON schema, serialized as a string.- Returns:
- The builder for chaining method calls.
-
jsonSchemaDescription
Sets the description of the JSON schema to aid the model in understanding the purpose of the schema.- Parameters:
jsonSchemaDescription- The description of the JSON schema.- Returns:
- The builder for chaining method calls.
-
jsonSchemaName
The name of the JSON schema, to aid the model in understanding the purpose of the schema.- Parameters:
jsonSchemaName- The name of the JSON schema.- Returns:
- The builder for chaining method calls.
-
maxTokens
Sets the maximum number of new tokens to generate. Must be greater than or equal to 1. Default is implementation-specific.- Parameters:
maxTokens- The maximum number of tokens to generate.- Returns:
- The builder for chaining method calls.
-
model
Sets the model to use for the request.- Parameters:
model- The model to use for the request.- Returns:
- The builder for chaining method calls.
-
presencePenalty
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.- Parameters:
presencePenalty- The presence penalty.- Returns:
- The builder for chaining method calls.
-
prompt
Sets the prompt for the request. This is required.- Parameters:
prompt- The prompt for the request.- Returns:
- The builder for chaining method calls.
-
reasoningEffort
Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.- Parameters:
reasoningEffort- The reasoning effort.- Returns:
- The builder for chaining method calls.
-
safetyIdentifier
A stable identifier used to help detect users of your application that may be violating the service's usage policies. The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information.- Parameters:
safetyIdentifier- The stable identifier.- Returns:
- The builder for chaining method calls.
-
system
Sets the optional system prompt to guide the model's behavior.- Parameters:
system- The system prompt to guide the model's behavior.- Returns:
- The builder for chaining method calls.
-
temperature
Sets the temperature for the request. Must be between 0 and 1. Default is implementation-specific.- Parameters:
temperature- The temperature for the request.- Returns:
- The builder for chaining method calls.
-
topP
Sets the top-p value for the request. Must be between 0 and 1. Default is implementation-specific.- Parameters:
topP- The top-p value for the request.- Returns:
- The builder for chaining method calls.
-