Class StructuredOutputConfig.Builder
-
- All Implemented Interfaces:
public final class StructuredOutputConfig.Builder<T extends Object>A builder for StructuredOutputConfig.
-
-
Method Summary
-
-
Method Detail
-
effort
final StructuredOutputConfig.Builder<T> effort(BetaOutputConfig.Effort effort)
-
effort
final StructuredOutputConfig.Builder<T> effort(Optional<BetaOutputConfig.Effort> effort)
Alias for calling Builder.effort with
effort.orElse(null).
-
effort
final StructuredOutputConfig.Builder<T> effort(JsonField<BetaOutputConfig.Effort> effort)
Sets Builder.effort to an arbitrary JSON value.
You should usually call Builder.effort with a well-typed BetaOutputConfig.Effort value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
format
@JvmOverloads() final StructuredOutputConfig.Builder<T> format(Class<T> outputType, JsonSchemaLocalValidation localValidation)
Sets the output format to a JSON schema derived from the structure of the given class.
- Parameters:
outputType- The class from which the JSON schema will be derived.localValidation- JsonSchemaLocalValidation.YES (the default) to validate the JSON schema locally when it is generated by this method to confirm that it adheres to the requirements and restrictions on JSON schemas imposed by the Anthropic specification; or JsonSchemaLocalValidation.NO to skip local validation and rely only on remote validation.
-
format
@JvmOverloads() final StructuredOutputConfig.Builder<T> format(Class<T> outputType)
Sets the output format to a JSON schema derived from the structure of the given class.
- Parameters:
outputType- The class from which the JSON schema will be derived.
-
taskBudget
final StructuredOutputConfig.Builder<T> taskBudget(BetaTokenTaskBudget taskBudget)
-
taskBudget
final StructuredOutputConfig.Builder<T> taskBudget(Optional<BetaTokenTaskBudget> taskBudget)
Alias for calling Builder.taskBudget with
taskBudget.orElse(null).
-
taskBudget
final StructuredOutputConfig.Builder<T> taskBudget(JsonField<BetaTokenTaskBudget> taskBudget)
Sets Builder.taskBudget to an arbitrary JSON value.
You should usually call Builder.taskBudget with a well-typed BetaTokenTaskBudget value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final StructuredOutputConfig.Builder<T> additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final StructuredOutputConfig.Builder<T> putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final StructuredOutputConfig.Builder<T> putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final StructuredOutputConfig.Builder<T> removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final StructuredOutputConfig.Builder<T> removeAllAdditionalProperties(Set<String> keys)
-
build
final StructuredOutputConfig<T> build()
Returns an immutable instance of StructuredOutputConfig.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.format()
-
-
-
-