Package com.openai.models.responses
Class ToolChoiceCustom
-
- All Implemented Interfaces:
public final class ToolChoiceCustom
Use this option to force the model to call a specific custom tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ToolChoiceCustom.Builder
A builder for ToolChoiceCustom.
-
Method Summary
Modifier and Type Method Description final String
name()
The name of the custom tool to call. final JsonValue
_type()
For custom tool calling, the type is always custom
.final JsonField<String>
_name()
Returns the raw JSON value of name. final Map<String, JsonValue>
_additionalProperties()
final ToolChoiceCustom.Builder
toBuilder()
final ToolChoiceCustom
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ToolChoiceCustom.Builder
builder()
Returns a mutable builder for constructing an instance of ToolChoiceCustom. -
-
Method Detail
-
_type
final JsonValue _type()
For custom tool calling, the type is always
custom
.Expected to always return the following:
JsonValue.from("custom")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ToolChoiceCustom.Builder toBuilder()
-
validate
final ToolChoiceCustom validate()
-
builder
final static ToolChoiceCustom.Builder builder()
Returns a mutable builder for constructing an instance of ToolChoiceCustom.
The following fields are required:
.name()
-
-
-
-