Package org.springframework.ai.anthropic
Class AnthropicCacheOptions
java.lang.Object
org.springframework.ai.anthropic.AnthropicCacheOptions
Anthropic cache options for configuring prompt caching behavior with the Anthropic Java
SDK.
- Since:
- 1.1.0
- Author:
- Austin Dase, Soby Chacko
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static AnthropicCacheOptionsdisabled()Returns a new disabled cache options instance with strategyNONE.booleaninthashCode()booleanvoidsetContentLengthFunction(Function<@Nullable String, Integer> contentLengthFunction) voidsetMessageTypeMinContentLengths(Map<MessageType, Integer> messageTypeMinContentLengths) voidsetMessageTypeTtl(Map<MessageType, AnthropicCacheTtl> messageTypeTtl) voidsetMultiBlockSystemCaching(boolean multiBlockSystemCaching) voidsetStrategy(AnthropicCacheStrategy strategy) toString()
-
Constructor Details
-
AnthropicCacheOptions
public AnthropicCacheOptions()
-
-
Method Details
-
disabled
Returns a new disabled cache options instance with strategyNONE. Each call returns a fresh instance to avoid shared mutable state. -
builder
-
getStrategy
-
setStrategy
-
getContentLengthFunction
-
setContentLengthFunction
-
getMessageTypeTtl
-
setMessageTypeTtl
-
getMessageTypeMinContentLengths
-
setMessageTypeMinContentLengths
-
isMultiBlockSystemCaching
public boolean isMultiBlockSystemCaching() -
setMultiBlockSystemCaching
public void setMultiBlockSystemCaching(boolean multiBlockSystemCaching) -
equals
-
hashCode
public int hashCode() -
toString
-