ChatCompletionToolChoiceOption class sealed
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.
- Implementers
- Annotations
-
- @freezed
Constructors
-
ChatCompletionToolChoiceOption.fromJson(Map<
String, dynamic> json) -
Object construction from a JSON representation
factory
- ChatCompletionToolChoiceOption.mode(ChatCompletionToolChoiceMode value)
-
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.constfactory - ChatCompletionToolChoiceOption.tool(ChatCompletionNamedToolChoice value)
-
No Description
constfactory
Properties
Methods
-
map<
TResult extends Object?> ({required TResult mode(ChatCompletionToolChoiceOptionEnumeration value), required TResult tool(ChatCompletionToolChoiceOptionChatCompletionNamedToolChoice value)}) → TResult -
inherited
-
mapOrNull<
TResult extends Object?> ({TResult? mode(ChatCompletionToolChoiceOptionEnumeration value)?, TResult? tool(ChatCompletionToolChoiceOptionChatCompletionNamedToolChoice value)?}) → TResult? -
inherited
-
maybeMap<
TResult extends Object?> ({TResult mode(ChatCompletionToolChoiceOptionEnumeration value)?, TResult tool(ChatCompletionToolChoiceOptionChatCompletionNamedToolChoice value)?, required TResult orElse()}) → TResult -
inherited
-
maybeWhen<
TResult extends Object?> ({TResult mode(ChatCompletionToolChoiceMode value)?, TResult tool(ChatCompletionNamedToolChoice value)?, required TResult orElse()}) → TResult -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ChatCompletionToolChoiceOption to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult mode(ChatCompletionToolChoiceMode value), required TResult tool(ChatCompletionNamedToolChoice value)}) → TResult -
inherited
-
whenOrNull<
TResult extends Object?> ({TResult? mode(ChatCompletionToolChoiceMode value)?, TResult? tool(ChatCompletionNamedToolChoice value)?}) → TResult? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited