ChatCompletionsToolSelectionPreset Class

public final class ChatCompletionsToolSelectionPreset
extends ExpandableStringEnum<ChatCompletionsToolSelectionPreset>

Represents a generic policy for how a chat completions tool may be selected.

Field Summary

Modifier and Type Field and Description
static final ChatCompletionsToolSelectionPreset AUTO

Specifies that the model may either use any of the tools provided in this chat completions request or instead return a standard chat completions response as if no tools were provided.

static final ChatCompletionsToolSelectionPreset NONE

Specifies that the model should not respond with a tool call and should instead provide a standard chat completions response.

static final ChatCompletionsToolSelectionPreset REQUIRED

Specifies that the model must call one or more tools.

Constructor Summary

Constructor Description
ChatCompletionsToolSelectionPreset()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ChatCompletionsToolSelectionPreset value.

Method Summary

Modifier and Type Method and Description
static ChatCompletionsToolSelectionPreset fromString(String name)

Creates or finds a ChatCompletionsToolSelectionPreset from its string representation.

static Collection<ChatCompletionsToolSelectionPreset> values()

Gets known ChatCompletionsToolSelectionPreset values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

AUTO

public static final ChatCompletionsToolSelectionPreset AUTO

Specifies that the model may either use any of the tools provided in this chat completions request or instead return a standard chat completions response as if no tools were provided.

NONE

public static final ChatCompletionsToolSelectionPreset NONE

Specifies that the model should not respond with a tool call and should instead provide a standard chat completions response. Response content may still be influenced by the provided tool definitions.

REQUIRED

public static final ChatCompletionsToolSelectionPreset REQUIRED

Specifies that the model must call one or more tools.

Constructor Details

ChatCompletionsToolSelectionPreset

@Deprecated
public ChatCompletionsToolSelectionPreset()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ChatCompletionsToolSelectionPreset value.

Method Details

fromString

public static ChatCompletionsToolSelectionPreset fromString(String name)

Creates or finds a ChatCompletionsToolSelectionPreset from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding ChatCompletionsToolSelectionPreset.

values

public static Collection<ChatCompletionsToolSelectionPreset> values()

Gets known ChatCompletionsToolSelectionPreset values.

Returns:

known ChatCompletionsToolSelectionPreset values.

Applies to