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.
const
factory
SessionMaxResponseOutputTokens.string(String value)
Use inf for the maximum available tokens for a given model.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Object
no setterinherited

Methods

map<TResult extends Object?>({required TResult int(SessionMaxResponseOutputTokensInt value), required TResult string(SessionMaxResponseOutputTokensString value)}) → TResult

Available on SessionMaxResponseOutputTokens, provided by the SessionMaxResponseOutputTokensPatterns extension

A switch-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 of map that fallback to returning null.
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 of map that fallback to returning orElse.
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 of when that fallback to an orElse callback.
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

A switch-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 of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited