Class StructuredMessageCreateParams.Builder
-
- All Implemented Interfaces:
public final class StructuredMessageCreateParams.Builder<T extends Object>A builder for StructuredMessageCreateParams.
-
-
Method Summary
-
-
Method Detail
-
betas
final StructuredMessageCreateParams.Builder<T> betas(List<AnthropicBeta> betas)
-
betas
final StructuredMessageCreateParams.Builder<T> betas(Optional<List<AnthropicBeta>> betas)
Alias for calling Builder.betas with
betas.orElse(null).
-
addBeta
final StructuredMessageCreateParams.Builder<T> addBeta(AnthropicBeta beta)
Adds a single AnthropicBeta to betas.
-
addBeta
final StructuredMessageCreateParams.Builder<T> addBeta(String value)
Sets addBeta to an arbitrary String.
You should usually call addBeta with a well-typed AnthropicBeta constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
userProfileId
final StructuredMessageCreateParams.Builder<T> userProfileId(String userProfileId)
-
userProfileId
final StructuredMessageCreateParams.Builder<T> userProfileId(Optional<String> userProfileId)
Alias for calling Builder.userProfileId with
userProfileId.orElse(null).
-
workspaceId
final StructuredMessageCreateParams.Builder<T> workspaceId(String workspaceId)
-
workspaceId
final StructuredMessageCreateParams.Builder<T> workspaceId(Optional<String> workspaceId)
Alias for calling Builder.workspaceId with
workspaceId.orElse(null).
-
maxTokens
final StructuredMessageCreateParams.Builder<T> maxTokens(Long maxTokens)
-
maxTokens
final StructuredMessageCreateParams.Builder<T> maxTokens(JsonField<Long> maxTokens)
Sets Builder.maxTokens to an arbitrary JSON value.
You should usually call Builder.maxTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
messages
final StructuredMessageCreateParams.Builder<T> messages(List<BetaMessageParam> messages)
-
messages
final StructuredMessageCreateParams.Builder<T> messages(JsonField<List<BetaMessageParam>> messages)
Sets Builder.messages to an arbitrary JSON value.
You should usually call Builder.messages with a well-typed
List<BetaMessageParam>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addMessage
final StructuredMessageCreateParams.Builder<T> addMessage(BetaMessageParam message)
Adds a single BetaMessageParam to messages.
-
addMessage
final StructuredMessageCreateParams.Builder<T> addMessage(BetaMessage message)
Alias for calling addMessage with
message.toParam().
-
addMessage
final StructuredMessageCreateParams.Builder<T> addMessage(BetaUserMessageParam user)
Alias for calling addMessage with
BetaMessageParam.ofUser(user).
-
addMessage
final StructuredMessageCreateParams.Builder<T> addMessage(BetaAssistantMessageParam assistant)
Alias for calling addMessage with
BetaMessageParam.ofAssistant(assistant).
-
addMessage
final StructuredMessageCreateParams.Builder<T> addMessage(BetaSystemMessageParam system)
Alias for calling addMessage with
BetaMessageParam.ofSystem(system).
-
addUserMessage
final StructuredMessageCreateParams.Builder<T> addUserMessage(BetaMessageContentParam content)
Alias for calling addMessage with the following:
BetaUserMessageParam.builder() .content(content) .build()
-
addUserMessage
final StructuredMessageCreateParams.Builder<T> addUserMessage(String string)
Alias for calling addUserMessage with
BetaMessageContentParam.ofString(string).
-
addUserMessageOfContentBlockParams
final StructuredMessageCreateParams.Builder<T> addUserMessageOfContentBlockParams(List<BetaContentBlockParam> contentBlockParams)
Alias for calling addUserMessage with
BetaMessageContentParam.ofContentBlockParams(contentBlockParams).
-
addAssistantMessage
final StructuredMessageCreateParams.Builder<T> addAssistantMessage(BetaMessageContentParam content)
Alias for calling addMessage with the following:
BetaAssistantMessageParam.builder() .content(content) .build()
-
addAssistantMessage
final StructuredMessageCreateParams.Builder<T> addAssistantMessage(String string)
Alias for calling addAssistantMessage with
BetaMessageContentParam.ofString(string).
-
addAssistantMessageOfContentBlockParams
final StructuredMessageCreateParams.Builder<T> addAssistantMessageOfContentBlockParams(List<BetaContentBlockParam> contentBlockParams)
Alias for calling addAssistantMessage with
BetaMessageContentParam.ofContentBlockParams(contentBlockParams).
-
addSystemMessage
final StructuredMessageCreateParams.Builder<T> addSystemMessage(BetaSystemMessageParam.Content content)
Alias for calling addMessage with the following:
BetaSystemMessageParam.builder() .content(content) .build()
-
addSystemMessage
final StructuredMessageCreateParams.Builder<T> addSystemMessage(String string)
Alias for calling addSystemMessage with
BetaSystemMessageParam.Content.ofString(string).
-
addSystemMessageOfBlocks
final StructuredMessageCreateParams.Builder<T> addSystemMessageOfBlocks(List<BetaSystemMessageParam.Content.SystemMessageContentBlock> blocks)
Alias for calling addSystemMessage with
BetaSystemMessageParam.Content.ofBlocks(blocks).
-
model
final StructuredMessageCreateParams.Builder<T> model(Model model)
-
model
final StructuredMessageCreateParams.Builder<T> model(JsonField<Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final StructuredMessageCreateParams.Builder<T> model(String value)
Sets model to an arbitrary String.
You should usually call model with a well-typed Model constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
billingPolicy
final StructuredMessageCreateParams.Builder<T> billingPolicy(BetaBillingPolicy billingPolicy)
-
billingPolicy
final StructuredMessageCreateParams.Builder<T> billingPolicy(Optional<BetaBillingPolicy> billingPolicy)
Alias for calling Builder.billingPolicy with
billingPolicy.orElse(null).
-
billingPolicy
final StructuredMessageCreateParams.Builder<T> billingPolicy(JsonField<BetaBillingPolicy> billingPolicy)
Sets Builder.billingPolicy to an arbitrary JSON value.
You should usually call Builder.billingPolicy with a well-typed BetaBillingPolicy value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
cacheControl
final StructuredMessageCreateParams.Builder<T> cacheControl(BetaCacheControlEphemeral cacheControl)
-
cacheControl
final StructuredMessageCreateParams.Builder<T> cacheControl(Optional<BetaCacheControlEphemeral> cacheControl)
Alias for calling Builder.cacheControl with
cacheControl.orElse(null).
-
cacheControl
final StructuredMessageCreateParams.Builder<T> cacheControl(JsonField<BetaCacheControlEphemeral> cacheControl)
Sets Builder.cacheControl to an arbitrary JSON value.
You should usually call Builder.cacheControl with a well-typed BetaCacheControlEphemeral value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
compaction
final StructuredMessageCreateParams.Builder<T> compaction(BetaCompactionConfig compaction)
-
compaction
final StructuredMessageCreateParams.Builder<T> compaction(Optional<BetaCompactionConfig> compaction)
Alias for calling Builder.compaction with
compaction.orElse(null).
-
compaction
final StructuredMessageCreateParams.Builder<T> compaction(JsonField<BetaCompactionConfig> compaction)
Sets Builder.compaction to an arbitrary JSON value.
You should usually call Builder.compaction with a well-typed BetaCompactionConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
container
final StructuredMessageCreateParams.Builder<T> container(MessageCreateParams.Container container)
-
container
final StructuredMessageCreateParams.Builder<T> container(Optional<MessageCreateParams.Container> container)
Alias for calling Builder.container with
container.orElse(null).
-
container
final StructuredMessageCreateParams.Builder<T> container(JsonField<MessageCreateParams.Container> container)
Sets Builder.container to an arbitrary JSON value.
You should usually call Builder.container with a well-typed MessageCreateParams.Container value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
container
final StructuredMessageCreateParams.Builder<T> container(BetaContainerParams betaContainerParams)
Alias for calling container with
MessageCreateParams.Container.ofBetaContainerParams(betaContainerParams).
-
container
final StructuredMessageCreateParams.Builder<T> container(String string)
Alias for calling container with
MessageCreateParams.Container.ofString(string).
-
contextManagement
final StructuredMessageCreateParams.Builder<T> contextManagement(BetaContextManagementConfig contextManagement)
-
contextManagement
final StructuredMessageCreateParams.Builder<T> contextManagement(Optional<BetaContextManagementConfig> contextManagement)
Alias for calling Builder.contextManagement with
contextManagement.orElse(null).
-
contextManagement
final StructuredMessageCreateParams.Builder<T> contextManagement(JsonField<BetaContextManagementConfig> contextManagement)
Sets Builder.contextManagement to an arbitrary JSON value.
You should usually call Builder.contextManagement with a well-typed BetaContextManagementConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
diagnostics
final StructuredMessageCreateParams.Builder<T> diagnostics(BetaDiagnosticsParam diagnostics)
-
diagnostics
final StructuredMessageCreateParams.Builder<T> diagnostics(Optional<BetaDiagnosticsParam> diagnostics)
Alias for calling Builder.diagnostics with
diagnostics.orElse(null).
-
diagnostics
final StructuredMessageCreateParams.Builder<T> diagnostics(JsonField<BetaDiagnosticsParam> diagnostics)
Sets Builder.diagnostics to an arbitrary JSON value.
You should usually call Builder.diagnostics with a well-typed BetaDiagnosticsParam value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
fallbackCreditToken
final StructuredMessageCreateParams.Builder<T> fallbackCreditToken(MessageCreateParams.FallbackCreditToken fallbackCreditToken)
-
fallbackCreditToken
final StructuredMessageCreateParams.Builder<T> fallbackCreditToken(Optional<MessageCreateParams.FallbackCreditToken> fallbackCreditToken)
Alias for calling Builder.fallbackCreditToken with
fallbackCreditToken.orElse(null).
-
fallbackCreditToken
final StructuredMessageCreateParams.Builder<T> fallbackCreditToken(JsonField<MessageCreateParams.FallbackCreditToken> fallbackCreditToken)
Sets Builder.fallbackCreditToken to an arbitrary JSON value.
You should usually call Builder.fallbackCreditToken with a well-typed MessageCreateParams.FallbackCreditToken value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
fallbackCreditToken
final StructuredMessageCreateParams.Builder<T> fallbackCreditToken(String string)
Alias for calling fallbackCreditToken with
MessageCreateParams.FallbackCreditToken.ofString(string).
-
fallbackCreditToken
final StructuredMessageCreateParams.Builder<T> fallbackCreditToken(BetaFallbackCreditTokenParam betaFallbackCreditTokenParam)
Alias for calling fallbackCreditToken with
MessageCreateParams.FallbackCreditToken.ofBetaFallbackCreditTokenParam(betaFallbackCreditTokenParam).
-
fallbacks
final StructuredMessageCreateParams.Builder<T> fallbacks(BetaFallbacksParam fallbacks)
-
fallbacks
final StructuredMessageCreateParams.Builder<T> fallbacks(Optional<BetaFallbacksParam> fallbacks)
Alias for calling Builder.fallbacks with
fallbacks.orElse(null).
-
fallbacks
final StructuredMessageCreateParams.Builder<T> fallbacks(JsonField<BetaFallbacksParam> fallbacks)
Sets Builder.fallbacks to an arbitrary JSON value.
You should usually call Builder.fallbacks with a well-typed BetaFallbacksParam value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
fallbacksOfFallbackParams
final StructuredMessageCreateParams.Builder<T> fallbacksOfFallbackParams(List<BetaFallbackParam> fallbackParams)
Alias for calling fallbacks with
BetaFallbacksParam.ofFallbackParams(fallbackParams).
-
fallbacksDefault
final StructuredMessageCreateParams.Builder<T> fallbacksDefault()
Alias for calling fallbacks with
BetaFallbacksParam.ofDefault().
-
inferenceGeo
final StructuredMessageCreateParams.Builder<T> inferenceGeo(String inferenceGeo)
-
inferenceGeo
final StructuredMessageCreateParams.Builder<T> inferenceGeo(Optional<String> inferenceGeo)
Alias for calling Builder.inferenceGeo with
inferenceGeo.orElse(null).
-
inferenceGeo
final StructuredMessageCreateParams.Builder<T> inferenceGeo(JsonField<String> inferenceGeo)
Sets Builder.inferenceGeo to an arbitrary JSON value.
You should usually call Builder.inferenceGeo with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
mcpServers
final StructuredMessageCreateParams.Builder<T> mcpServers(List<BetaRequestMcpServerUrlDefinition> mcpServers)
-
mcpServers
final StructuredMessageCreateParams.Builder<T> mcpServers(JsonField<List<BetaRequestMcpServerUrlDefinition>> mcpServers)
Sets Builder.mcpServers to an arbitrary JSON value.
You should usually call Builder.mcpServers with a well-typed
List<BetaRequestMcpServerUrlDefinition>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addMcpServer
final StructuredMessageCreateParams.Builder<T> addMcpServer(BetaRequestMcpServerUrlDefinition mcpServer)
Adds a single BetaRequestMcpServerUrlDefinition to mcpServers.
-
metadata
final StructuredMessageCreateParams.Builder<T> metadata(BetaMetadata metadata)
-
metadata
final StructuredMessageCreateParams.Builder<T> metadata(JsonField<BetaMetadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed BetaMetadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputConfig
final StructuredMessageCreateParams.Builder<T> outputConfig(BetaOutputConfig outputConfig)
Sets the output configuration, carrying over the output format already set unless the given output configuration sets its own, as the response will still be deserialized to an instance of the output type.
-
outputConfig
final StructuredMessageCreateParams.Builder<T> outputConfig(JsonField<BetaOutputConfig> outputConfig)
Sets the output configuration, carrying over the output format already set unless the given output configuration is not a BetaOutputConfig value or sets its own.
-
outputConfig
final StructuredMessageCreateParams.Builder<T> outputConfig(StructuredOutputConfig<T> outputConfig)
Sets the output configuration, including a JSON schema format derived from the structure of the output type of the given structured output configuration. Use this instead of the output type alone to set other output configuration options alongside the output type.
-
outputConfig
@JvmOverloads() final StructuredMessageCreateParams.Builder<T> outputConfig(Class<T> outputType, JsonSchemaLocalValidation localValidation)
Sets the output format of the output configuration to a JSON schema derived from the structure of the given class, preserving any other output configuration options already set. This is the recommended way to specify structured outputs.
-
outputConfig
@JvmOverloads() final StructuredMessageCreateParams.Builder<T> outputConfig(Class<T> outputType)
Sets the output format of the output configuration to a JSON schema derived from the structure of the given class, preserving any other output configuration options already set. This is the recommended way to specify structured outputs.
-
outputConfig
@JvmOverloads()@Deprecated(message = "Passing the effort positionally is deprecated. Use outputConfig(StructuredOutputConfig) instead and set the effort via StructuredOutputConfig.builder().", replaceWith = @ReplaceWith(expression = "outputConfig(StructuredOutputConfig.builder<T>().format(outputType, localValidation).effort(effort).build())", imports = {"com.anthropic.models.beta.messages.StructuredOutputConfig"})) final StructuredMessageCreateParams.Builder<T> outputConfig(Class<T> outputType, BetaOutputConfig.Effort effort, JsonSchemaLocalValidation localValidation)
Sets the output format of the output configuration to a JSON schema derived from the structure of the given class and, if given, the effort level, preserving any other output configuration options already set.
Deprecated: Use outputConfig with a StructuredOutputConfig instead, which can set the effort level (and other output configuration options) alongside the output type. This method will be removed in a future release.
-
outputConfig
@JvmOverloads()@Deprecated(message = "Passing the effort positionally is deprecated. Use outputConfig(StructuredOutputConfig) instead and set the effort via StructuredOutputConfig.builder().", replaceWith = @ReplaceWith(expression = "outputConfig(StructuredOutputConfig.builder<T>().format(outputType, localValidation).effort(effort).build())", imports = {"com.anthropic.models.beta.messages.StructuredOutputConfig"})) final StructuredMessageCreateParams.Builder<T> outputConfig(Class<T> outputType, BetaOutputConfig.Effort effort)
Sets the output format of the output configuration to a JSON schema derived from the structure of the given class and, if given, the effort level, preserving any other output configuration options already set.
Deprecated: Use outputConfig with a StructuredOutputConfig instead, which can set the effort level (and other output configuration options) alongside the output type. This method will be removed in a future release.
-
outputFormat
@JvmOverloads()@Deprecated(message = "output_format is deprecated. Use outputConfig instead which sets output_config.format.", replaceWith = @ReplaceWith(expression = "outputConfig(outputType, localValidation)")) final StructuredMessageCreateParams.Builder<T> outputFormat(Class<T> outputType, JsonSchemaLocalValidation localValidation)
Sets the output format of the output configuration to a JSON schema derived from the structure of the given class, preserving any other output configuration options already set.
Deprecated: Use outputConfig instead. This method will be removed in a future release.
-
outputFormat
@JvmOverloads()@Deprecated(message = "output_format is deprecated. Use outputConfig instead which sets output_config.format.", replaceWith = @ReplaceWith(expression = "outputConfig(outputType, localValidation)")) final StructuredMessageCreateParams.Builder<T> outputFormat(Class<T> outputType)
Sets the output format of the output configuration to a JSON schema derived from the structure of the given class, preserving any other output configuration options already set.
Deprecated: Use outputConfig instead. This method will be removed in a future release.
-
serviceTier
final StructuredMessageCreateParams.Builder<T> serviceTier(MessageCreateParams.ServiceTier serviceTier)
-
serviceTier
final StructuredMessageCreateParams.Builder<T> serviceTier(JsonField<MessageCreateParams.ServiceTier> serviceTier)
Sets Builder.serviceTier to an arbitrary JSON value.
You should usually call Builder.serviceTier with a well-typed MessageCreateParams.ServiceTier value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
speed
final StructuredMessageCreateParams.Builder<T> speed(MessageCreateParams.Speed speed)
-
speed
final StructuredMessageCreateParams.Builder<T> speed(Optional<MessageCreateParams.Speed> speed)
Alias for calling Builder.speed with
speed.orElse(null).
-
speed
final StructuredMessageCreateParams.Builder<T> speed(JsonField<MessageCreateParams.Speed> speed)
Sets Builder.speed to an arbitrary JSON value.
You should usually call Builder.speed with a well-typed MessageCreateParams.Speed value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
stopSequences
final StructuredMessageCreateParams.Builder<T> stopSequences(List<String> stopSequences)
-
stopSequences
final StructuredMessageCreateParams.Builder<T> stopSequences(JsonField<List<String>> stopSequences)
Sets Builder.stopSequences to an arbitrary JSON value.
You should usually call Builder.stopSequences with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addStopSequence
final StructuredMessageCreateParams.Builder<T> addStopSequence(String stopSequence)
Adds a single String to stopSequences.
-
system
final StructuredMessageCreateParams.Builder<T> system(MessageCreateParams.System system)
-
system
final StructuredMessageCreateParams.Builder<T> system(JsonField<MessageCreateParams.System> system)
Sets Builder.system to an arbitrary JSON value.
You should usually call Builder.system with a well-typed MessageCreateParams.System value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
system
final StructuredMessageCreateParams.Builder<T> system(String string)
Alias for calling system with
MessageCreateParams.System.ofString(string).
-
systemOfBetaTextBlockParams
final StructuredMessageCreateParams.Builder<T> systemOfBetaTextBlockParams(List<BetaTextBlockParam> betaTextBlockParams)
Alias for calling system with
MessageCreateParams.System.ofBetaTextBlockParams(betaTextBlockParams).
-
thinking
final StructuredMessageCreateParams.Builder<T> thinking(BetaThinkingConfigParam thinking)
-
thinking
final StructuredMessageCreateParams.Builder<T> thinking(JsonField<BetaThinkingConfigParam> thinking)
Sets Builder.thinking to an arbitrary JSON value.
You should usually call Builder.thinking with a well-typed BetaThinkingConfigParam value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
thinking
final StructuredMessageCreateParams.Builder<T> thinking(BetaThinkingConfigEnabled enabled)
Alias for calling thinking with
BetaThinkingConfigParam.ofEnabled(enabled).
-
thinking
final StructuredMessageCreateParams.Builder<T> thinking(BetaThinkingConfigDisabled disabled)
Alias for calling thinking with
BetaThinkingConfigParam.ofDisabled(disabled).
-
thinking
final StructuredMessageCreateParams.Builder<T> thinking(BetaThinkingConfigBetweenTools betweenTools)
Alias for calling thinking with
BetaThinkingConfigParam.ofBetweenTools(betweenTools).
-
thinking
final StructuredMessageCreateParams.Builder<T> thinking(BetaThinkingConfigAdaptive adaptive)
Alias for calling thinking with
BetaThinkingConfigParam.ofAdaptive(adaptive).
-
enabledThinking
final StructuredMessageCreateParams.Builder<T> enabledThinking(Long budgetTokens)
Alias for calling thinking with the following:
BetaThinkingConfigEnabled.builder() .budgetTokens(budgetTokens) .build()
-
thread
final StructuredMessageCreateParams.Builder<T> thread(BetaMessageThreadParam thread)
-
thread
final StructuredMessageCreateParams.Builder<T> thread(Optional<BetaMessageThreadParam> thread)
Alias for calling Builder.thread with
thread.orElse(null).
-
thread
final StructuredMessageCreateParams.Builder<T> thread(JsonField<BetaMessageThreadParam> thread)
Sets Builder.thread to an arbitrary JSON value.
You should usually call Builder.thread with a well-typed BetaMessageThreadParam value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
thread
final StructuredMessageCreateParams.Builder<T> thread(BetaThreadCreateParams create)
Alias for calling thread with
BetaMessageThreadParam.ofCreate(create).
-
thread
final StructuredMessageCreateParams.Builder<T> thread(BetaThreadContinueParams continue_)
Alias for calling thread with
BetaMessageThreadParam.ofContinue(continue_).
-
continueThread
final StructuredMessageCreateParams.Builder<T> continueThread(String previousMessageId)
Alias for calling thread with the following:
BetaThreadContinueParams.builder() .previousMessageId(previousMessageId) .build()
-
toolChoice
final StructuredMessageCreateParams.Builder<T> toolChoice(BetaToolChoice toolChoice)
-
toolChoice
final StructuredMessageCreateParams.Builder<T> toolChoice(JsonField<BetaToolChoice> toolChoice)
Sets Builder.toolChoice to an arbitrary JSON value.
You should usually call Builder.toolChoice with a well-typed BetaToolChoice value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
toolChoice
final StructuredMessageCreateParams.Builder<T> toolChoice(BetaToolChoiceAuto auto)
Alias for calling toolChoice with
BetaToolChoice.ofAuto(auto).
-
toolChoice
final StructuredMessageCreateParams.Builder<T> toolChoice(BetaToolChoiceAny any)
Alias for calling toolChoice with
BetaToolChoice.ofAny(any).
-
toolChoice
final StructuredMessageCreateParams.Builder<T> toolChoice(BetaToolChoiceTool tool)
Alias for calling toolChoice with
BetaToolChoice.ofTool(tool).
-
toolChoice
final StructuredMessageCreateParams.Builder<T> toolChoice(BetaToolChoiceNone none)
Alias for calling toolChoice with
BetaToolChoice.ofNone(none).
-
toolToolChoice
final StructuredMessageCreateParams.Builder<T> toolToolChoice(String name)
Alias for calling toolChoice with the following:
BetaToolChoiceTool.builder() .name(name) .build()
-
tools
final StructuredMessageCreateParams.Builder<T> tools(List<BetaToolUnion> tools)
-
tools
final StructuredMessageCreateParams.Builder<T> tools(JsonField<List<BetaToolUnion>> tools)
Sets Builder.tools to an arbitrary JSON value.
You should usually call Builder.tools with a well-typed
List<BetaToolUnion>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolUnion tool)
Adds a single BetaToolUnion to tools.
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaResponseToolUnion tool)
Alias for calling addTool with
tool.toParam().
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaResponseTool betaResponseTool)
Alias for calling addTool with
BetaResponseToolUnion.ofBetaResponseTool(betaResponseTool).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolBash20241022 toolBash20241022)
Alias for calling addTool with
BetaResponseToolUnion.ofToolBash20241022(toolBash20241022).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolBash20250124 toolBash20250124)
Alias for calling addTool with
BetaResponseToolUnion.ofToolBash20250124(toolBash20250124).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaCodeExecutionTool20250522 codeExecutionTool20250522)
Alias for calling addTool with
BetaResponseToolUnion.ofCodeExecutionTool20250522(codeExecutionTool20250522).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaCodeExecutionTool20250825 codeExecutionTool20250825)
Alias for calling addTool with
BetaResponseToolUnion.ofCodeExecutionTool20250825(codeExecutionTool20250825).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaCodeExecutionTool20260120 codeExecutionTool20260120)
Alias for calling addTool with
BetaResponseToolUnion.ofCodeExecutionTool20260120(codeExecutionTool20260120).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaCodeExecutionTool20260521 codeExecutionTool20260521)
Alias for calling addTool with
BetaResponseToolUnion.ofCodeExecutionTool20260521(codeExecutionTool20260521).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaBrowserToolset20260801 browserToolset20260801)
Alias for calling addTool with
BetaResponseToolUnion.ofBrowserToolset20260801(browserToolset20260801).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolComputerUse20241022 toolComputerUse20241022)
Alias for calling addTool with
BetaResponseToolUnion.ofToolComputerUse20241022(toolComputerUse20241022).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaMemoryTool20250818 memoryTool20250818)
Alias for calling addTool with
BetaResponseToolUnion.ofMemoryTool20250818(memoryTool20250818).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolComputerUse20250124 toolComputerUse20250124)
Alias for calling addTool with
BetaResponseToolUnion.ofToolComputerUse20250124(toolComputerUse20250124).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolTextEditor20241022 toolTextEditor20241022)
Alias for calling addTool with
BetaResponseToolUnion.ofToolTextEditor20241022(toolTextEditor20241022).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolComputerUse20251124 toolComputerUse20251124)
Alias for calling addTool with
BetaResponseToolUnion.ofToolComputerUse20251124(toolComputerUse20251124).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaComputerToolset20260801 computerToolset20260801)
Alias for calling addTool with
BetaResponseToolUnion.ofComputerToolset20260801(computerToolset20260801).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolTextEditor20250124 toolTextEditor20250124)
Alias for calling addTool with
BetaResponseToolUnion.ofToolTextEditor20250124(toolTextEditor20250124).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolTextEditor20250429 toolTextEditor20250429)
Alias for calling addTool with
BetaResponseToolUnion.ofToolTextEditor20250429(toolTextEditor20250429).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolTextEditor20250728 toolTextEditor20250728)
Alias for calling addTool with
BetaResponseToolUnion.ofToolTextEditor20250728(toolTextEditor20250728).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebSearchTool20250305 webSearchTool20250305)
Alias for calling addTool with
BetaResponseToolUnion.ofWebSearchTool20250305(webSearchTool20250305).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebFetchTool20250910 webFetchTool20250910)
Alias for calling addTool with
BetaResponseToolUnion.ofWebFetchTool20250910(webFetchTool20250910).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebSearchTool20260209 webSearchTool20260209)
Alias for calling addTool with
BetaResponseToolUnion.ofWebSearchTool20260209(webSearchTool20260209).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebFetchTool20260209 webFetchTool20260209)
Alias for calling addTool with
BetaResponseToolUnion.ofWebFetchTool20260209(webFetchTool20260209).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebFetchTool20260309 webFetchTool20260309)
Alias for calling addTool with
BetaResponseToolUnion.ofWebFetchTool20260309(webFetchTool20260309).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebSearchTool20260318 webSearchTool20260318)
Alias for calling addTool with
BetaResponseToolUnion.ofWebSearchTool20260318(webSearchTool20260318).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaWebFetchTool20260318 webFetchTool20260318)
Alias for calling addTool with
BetaResponseToolUnion.ofWebFetchTool20260318(webFetchTool20260318).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaAdvisorTool20260301 advisorTool20260301)
Alias for calling addTool with
BetaResponseToolUnion.ofAdvisorTool20260301(advisorTool20260301).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolSearchToolBm25_20251119 toolSearchToolBm25_20251119)
Alias for calling addTool with
BetaResponseToolUnion.ofToolSearchToolBm25_20251119(toolSearchToolBm25_20251119).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaToolSearchToolRegex20251119 toolSearchToolRegex20251119)
Alias for calling addTool with
BetaResponseToolUnion.ofToolSearchToolRegex20251119(toolSearchToolRegex20251119).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaMcpToolset mcpToolset)
Alias for calling addTool with
BetaResponseToolUnion.ofMcpToolset(mcpToolset).
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaTool betaTool)
Alias for calling addTool with
BetaToolUnion.ofBetaTool(betaTool).
-
addTool
@JvmOverloads() final StructuredMessageCreateParams.Builder<T> addTool(Class<?> toolParametersType, JsonSchemaLocalValidation localValidation)
-
addTool
@JvmOverloads() final StructuredMessageCreateParams.Builder<T> addTool(Class<?> toolParametersType)
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(BetaRunnableTool tool)
-
addTool
final StructuredMessageCreateParams.Builder<T> addTool(McpBetaTool tool)
-
addTools
final StructuredMessageCreateParams.Builder<T> addTools(List<McpBetaTool> tools)
-
body
final StructuredMessageCreateParams.Builder<T> body(MessageCreateParams.Body body)
-
additionalBodyProperties
final StructuredMessageCreateParams.Builder<T> additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final StructuredMessageCreateParams.Builder<T> putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final StructuredMessageCreateParams.Builder<T> putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final StructuredMessageCreateParams.Builder<T> removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final StructuredMessageCreateParams.Builder<T> removeAllAdditionalBodyProperties(Set<String> keys)
-
additionalHeaders
final StructuredMessageCreateParams.Builder<T> additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final StructuredMessageCreateParams.Builder<T> additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
putAdditionalHeader
final StructuredMessageCreateParams.Builder<T> putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final StructuredMessageCreateParams.Builder<T> removeAllAdditionalHeaders(Set<String> names)
-
additionalQueryParams
final StructuredMessageCreateParams.Builder<T> additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final StructuredMessageCreateParams.Builder<T> additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
putAdditionalQueryParam
final StructuredMessageCreateParams.Builder<T> putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final StructuredMessageCreateParams.Builder<T> removeAllAdditionalQueryParams(Set<String> keys)
-
build
final StructuredMessageCreateParams<T> build()
Returns an immutable instance of StructuredMessageCreateParams.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.maxTokens() .messages() .model()
-
-
-
-