Class AssistantToolChoiceOption
-
- All Implemented Interfaces:
public final class AssistantToolChoiceOption
Controls which (if any) tool is called by the model.
none
means the model will not call any tools and instead generates a message.auto
is the default value and means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools before responding to the user. Specifying a particular tool like{"type": "file_search"}
or{"type": "function", "function": {"name": "my_function"}}
forces the model to call that tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
AssistantToolChoiceOption.Visitor
public final class
AssistantToolChoiceOption.Deserializer
public final class
AssistantToolChoiceOption.Serializer
public final class
AssistantToolChoiceOption.Behavior
none
means the model will not call any tools and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools before responding to the user.
-
Method Summary
Modifier and Type Method Description final Optional<AssistantToolChoiceOption.Behavior>
behavior()
none
means the model will not call any tools and instead generates a message.final Optional<AssistantToolChoice>
assistantToolChoice()
Specifies a tool the model should use. final Boolean
isBehavior()
final Boolean
isAssistantToolChoice()
final AssistantToolChoiceOption.Behavior
asBehavior()
none
means the model will not call any tools and instead generates a message.final AssistantToolChoice
asAssistantToolChoice()
Specifies a tool the model should use. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(AssistantToolChoiceOption.Visitor<T> visitor)
final AssistantToolChoiceOption
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static AssistantToolChoiceOption
ofBehavior(AssistantToolChoiceOption.Behavior behavior)
none
means the model will not call any tools and instead generates a message.final static AssistantToolChoiceOption
ofAssistantToolChoice(AssistantToolChoice assistantToolChoice)
Specifies a tool the model should use. -
-
Method Detail
-
behavior
final Optional<AssistantToolChoiceOption.Behavior> behavior()
none
means the model will not call any tools and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools before responding to the user.
-
assistantToolChoice
final Optional<AssistantToolChoice> assistantToolChoice()
Specifies a tool the model should use. Use to force the model to call a specific tool.
-
isBehavior
final Boolean isBehavior()
-
isAssistantToolChoice
final Boolean isAssistantToolChoice()
-
asBehavior
final AssistantToolChoiceOption.Behavior asBehavior()
none
means the model will not call any tools and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools before responding to the user.
-
asAssistantToolChoice
final AssistantToolChoice asAssistantToolChoice()
Specifies a tool the model should use. Use to force the model to call a specific tool.
-
accept
final <T extends Any> T accept(AssistantToolChoiceOption.Visitor<T> visitor)
-
validate
final AssistantToolChoiceOption validate()
-
ofBehavior
final static AssistantToolChoiceOption ofBehavior(AssistantToolChoiceOption.Behavior behavior)
none
means the model will not call any tools and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools before responding to the user.
-
ofAssistantToolChoice
final static AssistantToolChoiceOption ofAssistantToolChoice(AssistantToolChoice assistantToolChoice)
Specifies a tool the model should use. Use to force the model to call a specific tool.
-
-
-
-