Class ToolCallAdvisor.Builder
java.lang.Object
org.springframework.ai.chat.client.advisor.ToolCallAdvisor.Builder
- Enclosing class:
- ToolCallAdvisor
Builder for creating instances of ToolCallAdvisor.
-
Method Summary
Modifier and TypeMethodDescriptionadvisorOrder(int advisorOrder) Sets the order of the advisor in the advisor chain.build()Builds and returns a new ToolCallAdvisor instance with the configured properties.toolCallingManager(org.springframework.ai.model.tool.ToolCallingManager toolCallingManager) Sets the ToolCallingManager to be used by the advisor.
-
Method Details
-
toolCallingManager
public ToolCallAdvisor.Builder toolCallingManager(org.springframework.ai.model.tool.ToolCallingManager toolCallingManager) Sets the ToolCallingManager to be used by the advisor.- Parameters:
toolCallingManager- the ToolCallingManager instance- Returns:
- this Builder instance for method chaining
-
advisorOrder
Sets the order of the advisor in the advisor chain.- Parameters:
advisorOrder- the order value, must be between HIGHEST_PRECEDENCE and LOWEST_PRECEDENCE- Returns:
- this Builder instance for method chaining
-
build
Builds and returns a new ToolCallAdvisor instance with the configured properties.- Returns:
- a new ToolCallAdvisor instance
- Throws:
IllegalArgumentException- if toolCallingManager is null or advisorOrder is out of valid range
-