SessionMaxResponseOutputTokens class sealed
Maximum number of output tokens for a single assistant response,
inclusive of tool calls. Provide an integer between 1 and 4096 to
limit output tokens, or inf for the maximum available tokens for a
given model. Defaults to inf.
- Available extensions
- Annotations
-
- @freezed
Constructors
-
SessionMaxResponseOutputTokens.fromJson(Map<
String, dynamic> json) -
Object construction from a JSON representation
factory
- SessionMaxResponseOutputTokens.int(int value)
-
Provide an integer between 1 and 4096 to limit output tokens.
constfactory
- SessionMaxResponseOutputTokens.string(String value)
-
Use inf for the maximum available tokens for a given model.
constfactory
Properties
Methods
-
map<
TResult extends Object?> ({required TResult int(SessionMaxResponseOutputTokensInt value), required TResult string(SessionMaxResponseOutputTokensString value)}) → TResult -
Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? int(SessionMaxResponseOutputTokensInt value)?, TResult? string(SessionMaxResponseOutputTokensString value)?}) → TResult? -
Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult int(SessionMaxResponseOutputTokensInt value)?, TResult string(SessionMaxResponseOutputTokensString value)?, required TResult orElse()}) → TResult -
Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult int(int value)?, TResult string(String value)?, required TResult orElse()}) → TResult -
Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this SessionMaxResponseOutputTokens to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult int(int value), required TResult string(String value)}) → TResult -
Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? int(int value)?, TResult? string(String value)?}) → TResult? -
Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited