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