Class ActivateSkillToolConfig.Builder

java.lang.Object
dev.langchain4j.skills.ActivateSkillToolConfig.Builder
Enclosing class:
ActivateSkillToolConfig

public static class ActivateSkillToolConfig.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      Sets the name of the activate_skill tool.

      Default value is "activate_skill".

    • description

      public ActivateSkillToolConfig.Builder description(String description)
      Sets the description of the activate_skill tool.

      Default value is "Returns the full instructions for a skill. Call this before following any skill-specific steps.".

    • parameterName

      public ActivateSkillToolConfig.Builder parameterName(String parameterName)
      Sets the name of the parameter that specifies which skill to activate.

      Default value is "skill_name".

    • parameterDescription

      public ActivateSkillToolConfig.Builder parameterDescription(String 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 ToolExecutionException by default instead of ToolArgumentsException.

      The reason is historical: by default, AI Services fail fast when a ToolArgumentsException is thrown, whereas ToolExecutionException allows 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, ToolArgumentsException will be thrown instead.

      Parameters:
      throwToolArgumentsExceptions - whether to throw ToolArgumentsException
      Returns:
      this builder
    • build

      public ActivateSkillToolConfig build()