Class InputTokenCountParams.Text.Builder
-
- All Implemented Interfaces:
public final class InputTokenCountParams.Text.BuilderA builder for Text.
-
-
Method Summary
-
-
Method Detail
-
format
final InputTokenCountParams.Text.Builder format(ResponseFormatTextConfig format)
An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schemais preferred for models that support it.
-
format
final InputTokenCountParams.Text.Builder format(JsonField<ResponseFormatTextConfig> format)
Sets Builder.format to an arbitrary JSON value.
You should usually call Builder.format with a well-typed ResponseFormatTextConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
format
final InputTokenCountParams.Text.Builder format(ResponseFormatText text)
Alias for calling format with
ResponseFormatTextConfig.ofText(text).
-
format
final InputTokenCountParams.Text.Builder format(ResponseFormatTextJsonSchemaConfig jsonSchema)
Alias for calling format with
ResponseFormatTextConfig.ofJsonSchema(jsonSchema).
-
format
final InputTokenCountParams.Text.Builder format(ResponseFormatJsonObject jsonObject)
Alias for calling format with
ResponseFormatTextConfig.ofJsonObject(jsonObject).
-
verbosity
final InputTokenCountParams.Text.Builder verbosity(InputTokenCountParams.Text.Verbosity verbosity)
Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses. Currently supported values are
low,medium, andhigh.
-
verbosity
final InputTokenCountParams.Text.Builder verbosity(Optional<InputTokenCountParams.Text.Verbosity> verbosity)
Alias for calling Builder.verbosity with
verbosity.orElse(null).
-
verbosity
final InputTokenCountParams.Text.Builder verbosity(JsonField<InputTokenCountParams.Text.Verbosity> verbosity)
Sets Builder.verbosity to an arbitrary JSON value.
You should usually call Builder.verbosity with a well-typed Verbosity value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final InputTokenCountParams.Text.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final InputTokenCountParams.Text.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final InputTokenCountParams.Text.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final InputTokenCountParams.Text.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final InputTokenCountParams.Text.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final InputTokenCountParams.Text build()
Returns an immutable instance of Text.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-