Class ActivateSkillToolConfig.Builder
java.lang.Object
dev.langchain4j.skills.ActivateSkillToolConfig.Builder
- Enclosing class:
ActivateSkillToolConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()description(String description) Sets the description of theactivate_skilltool.Sets the name of theactivate_skilltool.parameterDescription(String parameterDescription) Sets the description of the parameter that specifies which skill to activate.parameterName(String parameterName) Sets the name of the parameter that specifies which skill to activate.throwToolArgumentsExceptions(Boolean throwToolArgumentsExceptions) Controls which exception type is thrown when tool arguments are missing, invalid, or cannot be parsed.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the name of theactivate_skilltool.Default value is "activate_skill".
-
description
Sets the description of theactivate_skilltool.Default value is "Returns the full instructions for a skill. Call this before following any skill-specific steps.".
-
parameterName
Sets the name of the parameter that specifies which skill to activate.Default value is "skill_name".
-
parameterDescription
Sets the description of the parameter that specifies which skill to activate.Default value is "The name of the skill to activate".
-
throwToolArgumentsExceptions
public ActivateSkillToolConfig.Builder throwToolArgumentsExceptions(Boolean throwToolArgumentsExceptions) Controls which exception type is thrown when tool arguments are missing, invalid, or cannot be parsed.Although all errors produced by this tool are argument-related, this strategy throws
ToolExecutionExceptionby default instead ofToolArgumentsException.The reason is historical: by default, AI Services fail fast when a
ToolArgumentsExceptionis thrown, whereasToolExecutionExceptionallows the error message to be returned to the LLM. For these tools, returning the error message to the LLM is usually the desired behavior.If this flag is set to
true,ToolArgumentsExceptionwill be thrown instead.- Parameters:
throwToolArgumentsExceptions- whether to throwToolArgumentsException- Returns:
- this builder
-
build
-