Class ChatCompletionToolChoiceOption
-
- All Implemented Interfaces:
public final class ChatCompletionToolChoiceOption
Controls which (if any) tool is called by the model.
none
means the model will not call any tool 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. Specifying a particular tool via{"type": "function", "function": {"name": "my_function"}}
forces the model to call that tool.none
is the default when no tools are present.auto
is the default if tools are present.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ChatCompletionToolChoiceOption.Visitor
public final class
ChatCompletionToolChoiceOption.Deserializer
public final class
ChatCompletionToolChoiceOption.Serializer
public final class
ChatCompletionToolChoiceOption.Behavior
-
Method Summary
-
-
Method Detail
-
behavior
final Optional<ChatCompletionToolChoiceOption.Behavior> behavior()
none
means the model will not call any tool 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.
-
chatCompletionNamedToolChoice
final Optional<ChatCompletionNamedToolChoice> chatCompletionNamedToolChoice()
Specifies a tool the model should use. Use to force the model to call a specific function.
-
isBehavior
final Boolean isBehavior()
-
isChatCompletionNamedToolChoice
final Boolean isChatCompletionNamedToolChoice()
-
asBehavior
final ChatCompletionToolChoiceOption.Behavior asBehavior()
none
means the model will not call any tool 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.
-
asChatCompletionNamedToolChoice
final ChatCompletionNamedToolChoice asChatCompletionNamedToolChoice()
Specifies a tool the model should use. Use to force the model to call a specific function.
-
accept
final <T extends Any> T accept(ChatCompletionToolChoiceOption.Visitor<T> visitor)
-
validate
final ChatCompletionToolChoiceOption validate()
-
ofBehavior
final static ChatCompletionToolChoiceOption ofBehavior(ChatCompletionToolChoiceOption.Behavior behavior)
none
means the model will not call any tool 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.
-
ofChatCompletionNamedToolChoice
final static ChatCompletionToolChoiceOption ofChatCompletionNamedToolChoice(ChatCompletionNamedToolChoice chatCompletionNamedToolChoice)
Specifies a tool the model should use. Use to force the model to call a specific function.
-
-
-
-