Interface ToolChoice.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<ToolChoice.Builder,
,ToolChoice> SdkBuilder<ToolChoice.Builder,
,ToolChoice> SdkPojo
- Enclosing class:
ToolChoice
-
Method Summary
Modifier and TypeMethodDescriptiondefault ToolChoice.Builder
any
(Consumer<AnyToolChoice.Builder> any) Defines tools, at least one of which must be requested by the model.any
(AnyToolChoice any) Defines tools, at least one of which must be requested by the model.default ToolChoice.Builder
auto
(Consumer<AutoToolChoice.Builder> auto) Defines tools.auto
(AutoToolChoice auto) Defines tools.default ToolChoice.Builder
Defines a specific tool that the model must request.tool
(SpecificToolChoice tool) Defines a specific tool that the model must request.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
any
Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.
- Parameters:
any
- Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
any
Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.
This is a convenience method that creates an instance of theAnyToolChoice.Builder
avoiding the need to create one manually viaAnyToolChoice.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toany(AnyToolChoice)
.- Parameters:
any
- a consumer that will call methods onAnyToolChoice.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
auto
Defines tools. The model automatically decides whether to call a tool or to generate text instead.
- Parameters:
auto
- Defines tools. The model automatically decides whether to call a tool or to generate text instead.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
auto
Defines tools. The model automatically decides whether to call a tool or to generate text instead.
This is a convenience method that creates an instance of theAutoToolChoice.Builder
avoiding the need to create one manually viaAutoToolChoice.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toauto(AutoToolChoice)
.- Parameters:
auto
- a consumer that will call methods onAutoToolChoice.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
tool
Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.
- Parameters:
tool
- Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tool
Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.
This is a convenience method that creates an instance of theSpecificToolChoice.Builder
avoiding the need to create one manually viaSpecificToolChoice.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totool(SpecificToolChoice)
.- Parameters:
tool
- a consumer that will call methods onSpecificToolChoice.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-