PromptCacheOptions class
The prompt-caching options that were applied to the response.
Supported for gpt-5.6 and later models.
- Annotations
-
- @immutable
Constructors
- PromptCacheOptions({required PromptCacheMode mode, required PromptCacheTtl ttl})
-
Creates a PromptCacheOptions.
const
-
PromptCacheOptions.fromJson(Map<
String, dynamic> json) -
Creates a PromptCacheOptions from JSON.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- mode → PromptCacheMode
-
Whether implicit prompt-cache breakpoints were enabled.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- ttl → PromptCacheTtl
-
The minimum lifetime applied to each cache breakpoint.
final
Methods
-
copyWith(
{PromptCacheMode? mode, PromptCacheTtl? ttl}) → PromptCacheOptions - Creates a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override