Class BetaRequestToolRemovalBlock
-
- All Implemented Interfaces:
public final class BetaRequestToolRemovalBlockMid-conversation directive to withdraw a tool.
`tool`references a tool (or MCP toolset) by name: one declared in the request's`tools`or defined earlier in`messages`. It is no longer offered to the model from this point in the conversation onward.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaRequestToolRemovalBlock.BuilderA builder for BetaRequestToolRemovalBlock.
public final classBetaRequestToolRemovalBlock.Tool
-
Method Summary
Modifier and Type Method Description final BetaRequestToolRemovalBlock.Tooltool()final Optional<BetaCacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("tool_removal")final JsonField<BetaRequestToolRemovalBlock.Tool>_tool()Returns the raw JSON value of tool. final JsonField<BetaCacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final Map<String, JsonValue>_additionalProperties()final BetaRequestToolRemovalBlock.BuildertoBuilder()final BetaRequestToolRemovalBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaRequestToolRemovalBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaRequestToolRemovalBlock. final static BetaRequestToolRemovalBlockof(BetaRequestToolRemovalBlock.Tool tool)Returns an immutable instance of BetaRequestToolRemovalBlock with the required tool set to the given value. final static BetaRequestToolRemovalBlockof(BetaToolChangeToolReference reference)Alias for calling of with Tool.ofReference(reference).final static BetaRequestToolRemovalBlockof(BetaResponseToolChangeToolReference reference)Alias for calling of with reference.toParam().final static BetaRequestToolRemovalBlockof(BetaToolChangeMcpToolReference mcpToolReference)Alias for calling of with Tool.ofMcpToolReference(mcpToolReference).final static BetaRequestToolRemovalBlockof(BetaResponseToolChangeMcpToolReference mcpToolReference)Alias for calling of with mcpToolReference.toParam().final static BetaRequestToolRemovalBlockof(BetaToolChangeMcpToolsetReference mcpToolsetReference)Alias for calling of with Tool.ofMcpToolsetReference(mcpToolsetReference).final static BetaRequestToolRemovalBlockof(BetaResponseToolChangeMcpToolsetReference mcpToolsetReference)Alias for calling of with mcpToolsetReference.toParam().-
-
Method Detail
-
tool
final BetaRequestToolRemovalBlock.Tool tool()
-
cacheControl
final Optional<BetaCacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("tool_removal")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_tool
final JsonField<BetaRequestToolRemovalBlock.Tool> _tool()
Returns the raw JSON value of tool.
Unlike tool, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<BetaCacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaRequestToolRemovalBlock.Builder toBuilder()
-
validate
final BetaRequestToolRemovalBlock validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaRequestToolRemovalBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaRequestToolRemovalBlock.
The following fields are required:
.tool()
-
of
final static BetaRequestToolRemovalBlock of(BetaRequestToolRemovalBlock.Tool tool)
Returns an immutable instance of BetaRequestToolRemovalBlock with the required tool set to the given value.
-
of
final static BetaRequestToolRemovalBlock of(BetaToolChangeToolReference reference)
Alias for calling of with
Tool.ofReference(reference).
-
of
final static BetaRequestToolRemovalBlock of(BetaResponseToolChangeToolReference reference)
Alias for calling of with
reference.toParam().
-
of
final static BetaRequestToolRemovalBlock of(BetaToolChangeMcpToolReference mcpToolReference)
Alias for calling of with
Tool.ofMcpToolReference(mcpToolReference).
-
of
final static BetaRequestToolRemovalBlock of(BetaResponseToolChangeMcpToolReference mcpToolReference)
Alias for calling of with
mcpToolReference.toParam().
-
of
final static BetaRequestToolRemovalBlock of(BetaToolChangeMcpToolsetReference mcpToolsetReference)
Alias for calling of with
Tool.ofMcpToolsetReference(mcpToolsetReference).
-
of
final static BetaRequestToolRemovalBlock of(BetaResponseToolChangeMcpToolsetReference mcpToolsetReference)
Alias for calling of with
mcpToolsetReference.toParam().
-
-
-
-