Class ResponseCreateParams.PromptCacheOptions.Builder
-
- All Implemented Interfaces:
public final class ResponseCreateParams.PromptCacheOptions.BuilderA builder for PromptCacheOptions.
-
-
Method Summary
-
-
Method Detail
-
mode
final ResponseCreateParams.PromptCacheOptions.Builder mode(ResponseCreateParams.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 ResponseCreateParams.PromptCacheOptions.Builder mode(JsonField<ResponseCreateParams.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 ResponseCreateParams.PromptCacheOptions.Builder ttl(ResponseCreateParams.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 ResponseCreateParams.PromptCacheOptions.Builder ttl(JsonField<ResponseCreateParams.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 ResponseCreateParams.PromptCacheOptions.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseCreateParams.PromptCacheOptions.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseCreateParams.PromptCacheOptions.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseCreateParams.PromptCacheOptions.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseCreateParams.PromptCacheOptions.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseCreateParams.PromptCacheOptions build()
Returns an immutable instance of PromptCacheOptions.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-