Class SemanticCacheAdvisor.Builder
java.lang.Object
org.springframework.ai.chat.cache.semantic.SemanticCacheAdvisor.Builder
- Enclosing class:
SemanticCacheAdvisor
Builder class for creating SemanticCacheAdvisor instances. Provides a fluent API
for configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a new SemanticCacheAdvisor instance.cache(SemanticCache cache) Sets the semantic cache implementation.order(int order) Sets the advisor order.scheduler(reactor.core.scheduler.Scheduler scheduler) Sets the scheduler for async operations.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cache
Sets the semantic cache implementation.- Parameters:
cache- The cache implementation to use- Returns:
- This builder instance
-
order
Sets the advisor order.- Parameters:
order- The order value for this advisor- Returns:
- This builder instance
-
scheduler
Sets the scheduler for async operations.- Parameters:
scheduler- The scheduler to use- Returns:
- This builder instance
-
build
Builds and returns a new SemanticCacheAdvisor instance.- Returns:
- A new SemanticCacheAdvisor configured with this builder's settings
-