Class AugmentedToolCallbackProvider.Builder<T extends Record>
java.lang.Object
org.springframework.ai.tool.augment.AugmentedToolCallbackProvider.Builder<T>
- Enclosing class:
AugmentedToolCallbackProvider<T extends Record>
Builder for
AugmentedToolCallbackProvider.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionargumentConsumer(Consumer<AugmentedArgumentEvent<T>> argumentConsumer) Sets the argument consumerargumentType(Class<T> argumentType) Sets the argument typebuild()Builds theAugmentedToolCallbackProviderinstance.delegate(ToolCallbackProvider delegate) Sets the delegate ToolCallbackProviderremoveExtraArgumentsAfterProcessing(boolean removeExtraArgumentsAfterProcessing) Sets whether to remove extra arguments after processingtoolObject(Object toolObject) Sets the tool object (alternative to delegate)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
delegate
Sets the delegate ToolCallbackProvider- Parameters:
delegate- the delegate provider- Returns:
- this builder
-
toolObject
Sets the tool object (alternative to delegate)- Parameters:
toolObject- the tool object- Returns:
- this builder
-
argumentType
Sets the argument type- Parameters:
argumentType- the class of the argument type- Returns:
- this builder
-
argumentConsumer
public AugmentedToolCallbackProvider.Builder<T> argumentConsumer(Consumer<AugmentedArgumentEvent<T>> argumentConsumer) Sets the argument consumer- Parameters:
argumentConsumer- the consumer for arguments- Returns:
- this builder
-
removeExtraArgumentsAfterProcessing
public AugmentedToolCallbackProvider.Builder<T> removeExtraArgumentsAfterProcessing(boolean removeExtraArgumentsAfterProcessing) Sets whether to remove extra arguments after processing- Parameters:
removeExtraArgumentsAfterProcessing- true to remove extra arguments- Returns:
- this builder
-
build
Builds theAugmentedToolCallbackProviderinstance.- Returns:
- the built instance
- Throws:
IllegalStateException- if required fields are not set
-