Class ResponseCompactParams.PromptCacheOptions.Builder
-
- All Implemented Interfaces:
public final class ResponseCompactParams.PromptCacheOptions.BuilderA builder for PromptCacheOptions.
-
-
Method Summary
-
-
Method Detail
-
mode
final ResponseCompactParams.PromptCacheOptions.Builder mode(ResponseCompactParams.PromptCacheOptions.Mode mode)
Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to
implicit. Withimplicit, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. Withexplicit, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.
-
mode
final ResponseCompactParams.PromptCacheOptions.Builder mode(JsonField<ResponseCompactParams.PromptCacheOptions.Mode> mode)
Sets Builder.mode to an arbitrary JSON value.
You should usually call Builder.mode with a well-typed Mode value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
ttl
final ResponseCompactParams.PromptCacheOptions.Builder ttl(ResponseCompactParams.PromptCacheOptions.Ttl ttl)
The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to
30m, which is currently the only supported value. The backend may retain cache entries for longer.
-
ttl
final ResponseCompactParams.PromptCacheOptions.Builder ttl(JsonField<ResponseCompactParams.PromptCacheOptions.Ttl> ttl)
Sets Builder.ttl to an arbitrary JSON value.
You should usually call Builder.ttl with a well-typed Ttl value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ResponseCompactParams.PromptCacheOptions.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseCompactParams.PromptCacheOptions.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseCompactParams.PromptCacheOptions.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseCompactParams.PromptCacheOptions.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseCompactParams.PromptCacheOptions.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseCompactParams.PromptCacheOptions build()
Returns an immutable instance of PromptCacheOptions.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-