Class ChatCompletionCreateParams.FunctionCall
-
- All Implemented Interfaces:
@Deprecated(message = "deprecated") public final class ChatCompletionCreateParams.FunctionCall
Deprecated in favor of
tool_choice
.Controls which (if any) function is called by the model.
none
means the model will not call a function and instead generates a message.auto
means the model can pick between generating a message or calling a function.Specifying a particular function via
{"name": "my_function"}
forces the model to call that function.none
is the default when no functions are present.auto
is the default if functions are present.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ChatCompletionCreateParams.FunctionCall.Visitor
An interface that defines how to map each variant of FunctionCall to a value of type T.
public final class
ChatCompletionCreateParams.FunctionCall.Auto
none
means the model will not call a function and instead generates a message.auto
means the model can pick between generating a message or calling a function.
-
Method Summary
Modifier and Type Method Description final Optional<ChatCompletionCreateParams.FunctionCall.Auto>
auto()
none
means the model will not call a function and instead generates a message.final Optional<ChatCompletionFunctionCallOption>
functionCallOption()
Specifying a particular function via {"name": "my_function"}
forces the model to call that function.final Boolean
isAuto()
final Boolean
isFunctionCallOption()
final ChatCompletionCreateParams.FunctionCall.Auto
asAuto()
none
means the model will not call a function and instead generates a message.final ChatCompletionFunctionCallOption
asFunctionCallOption()
Specifying a particular function via {"name": "my_function"}
forces the model to call that function.final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ChatCompletionCreateParams.FunctionCall.Visitor<T> visitor)
final ChatCompletionCreateParams.FunctionCall
validate()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionCreateParams.FunctionCall
ofAuto(ChatCompletionCreateParams.FunctionCall.Auto auto)
none
means the model will not call a function and instead generates a message.final static ChatCompletionCreateParams.FunctionCall
ofFunctionCallOption(ChatCompletionFunctionCallOption functionCallOption)
Specifying a particular function via {"name": "my_function"}
forces the model to call that function.-
-
Method Detail
-
auto
final Optional<ChatCompletionCreateParams.FunctionCall.Auto> auto()
none
means the model will not call a function and instead generates a message.auto
means the model can pick between generating a message or calling a function.
-
functionCallOption
final Optional<ChatCompletionFunctionCallOption> functionCallOption()
Specifying a particular function via
{"name": "my_function"}
forces the model to call that function.
-
isFunctionCallOption
final Boolean isFunctionCallOption()
-
asAuto
final ChatCompletionCreateParams.FunctionCall.Auto asAuto()
none
means the model will not call a function and instead generates a message.auto
means the model can pick between generating a message or calling a function.
-
asFunctionCallOption
final ChatCompletionFunctionCallOption asFunctionCallOption()
Specifying a particular function via
{"name": "my_function"}
forces the model to call that function.
-
accept
final <T extends Any> T accept(ChatCompletionCreateParams.FunctionCall.Visitor<T> visitor)
-
validate
final ChatCompletionCreateParams.FunctionCall validate()
-
ofAuto
final static ChatCompletionCreateParams.FunctionCall ofAuto(ChatCompletionCreateParams.FunctionCall.Auto auto)
none
means the model will not call a function and instead generates a message.auto
means the model can pick between generating a message or calling a function.
-
ofFunctionCallOption
final static ChatCompletionCreateParams.FunctionCall ofFunctionCallOption(ChatCompletionFunctionCallOption functionCallOption)
Specifying a particular function via
{"name": "my_function"}
forces the model to call that function.
-
-
-
-