Package org.springframework.ai.anthropic
Class AnthropicCacheOptions.Builder
java.lang.Object
org.springframework.ai.anthropic.AnthropicCacheOptions.Builder
- Enclosing class:
- AnthropicCacheOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()cacheToolResults(@Nullable Boolean cacheToolResults) Place acache_controlbreakpoint on the last tool result message of the request so that tool outputs are cached across tool-calling rounds.contentLengthFunction(@Nullable Function<@Nullable String, Integer> contentLengthFunction) messageTypeMinContentLength(MessageType messageType, Integer minContentLength) messageTypeMinContentLengths(@Nullable Map<MessageType, Integer> messageTypeMinContentLengths) messageTypeTtl(@Nullable Map<MessageType, AnthropicCacheTtl> messageTypeTtl) messageTypeTtl(MessageType messageType, AnthropicCacheTtl ttl) multiBlockSystemCaching(@Nullable Boolean multiBlockSystemCaching) strategy(@Nullable AnthropicCacheStrategy strategy)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
strategy
-
contentLengthFunction
public AnthropicCacheOptions.Builder contentLengthFunction(@Nullable Function<@Nullable String, Integer> contentLengthFunction) -
messageTypeTtl
public AnthropicCacheOptions.Builder messageTypeTtl(@Nullable Map<MessageType, AnthropicCacheTtl> messageTypeTtl) -
messageTypeTtl
-
messageTypeMinContentLengths
public AnthropicCacheOptions.Builder messageTypeMinContentLengths(@Nullable Map<MessageType, Integer> messageTypeMinContentLengths) -
messageTypeMinContentLength
public AnthropicCacheOptions.Builder messageTypeMinContentLength(MessageType messageType, Integer minContentLength) -
multiBlockSystemCaching
public AnthropicCacheOptions.Builder multiBlockSystemCaching(@Nullable Boolean multiBlockSystemCaching) -
cacheToolResults
Place acache_controlbreakpoint on the last tool result message of the request so that tool outputs are cached across tool-calling rounds. Takes effect withAnthropicCacheStrategy.CONVERSATION_HISTORY.- Parameters:
cacheToolResults- whether to cache tool result messages- Returns:
- this builder
- Since:
- 2.0.0
-
build
-