Class LC4jToolMapBuilder<T extends LC4jToolMapBuilder<T>>

java.lang.Object
org.bsc.langgraph4j.langchain4j.tool.LC4jToolMapBuilder<T>
Direct Known Subclasses:
LC4jToolService.Builder

public class LC4jToolMapBuilder<T extends LC4jToolMapBuilder<T>> extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected T
     
    Optional<dev.langchain4j.skills.Skills>
     
    final T
    skills(dev.langchain4j.skills.Skill... skills)
     
    final T
    skills(Collection<? extends dev.langchain4j.skills.Skill> skillList)
     
    final T
    tool(dev.langchain4j.agent.tool.ToolSpecification spec, dev.langchain4j.service.tool.ToolExecutor executor)
    Sets the tool specification with executor for the graph builder.
    final T
    tool(dev.langchain4j.mcp.client.McpClient mcpClient)
    add tools published by the mcp client
    final T
    tool(Map.Entry<dev.langchain4j.agent.tool.ToolSpecification,dev.langchain4j.service.tool.ToolExecutor> entry)
     
    Map<dev.langchain4j.agent.tool.ToolSpecification,dev.langchain4j.service.tool.ToolExecutor>
     
    final T
    toolsFromObject(Object objectWithTools)
    Sets the tool specification for the graph builder.
    final T
    toolsFromObject(Object... objectWithTools)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LC4jToolMapBuilder

      public LC4jToolMapBuilder()
  • Method Details

    • toolMap

      public Map<dev.langchain4j.agent.tool.ToolSpecification,dev.langchain4j.service.tool.ToolExecutor> toolMap()
    • skills

      public Optional<dev.langchain4j.skills.Skills> skills()
    • result

      protected T result()
    • toolsFromObject

      public final T toolsFromObject(Object objectWithTools)
      Sets the tool specification for the graph builder.
      Parameters:
      objectWithTools - the tool specification
      Returns:
      the updated GraphBuilder instance
    • toolsFromObject

      public final T toolsFromObject(Object... objectWithTools)
    • tool

      public final T tool(dev.langchain4j.agent.tool.ToolSpecification spec, dev.langchain4j.service.tool.ToolExecutor executor)
      Sets the tool specification with executor for the graph builder.
      Parameters:
      spec - the tool specification
      executor - the tool executor
      Returns:
      the updated builder instance
    • tool

      public final T tool(Map.Entry<dev.langchain4j.agent.tool.ToolSpecification,dev.langchain4j.service.tool.ToolExecutor> entry)
    • tool

      public final T tool(dev.langchain4j.mcp.client.McpClient mcpClient)
      add tools published by the mcp client
      Parameters:
      mcpClient - mcpClient instance
      Returns:
      the updated builder instance
    • skills

      public final T skills(dev.langchain4j.skills.Skill... skills)
    • skills

      public final T skills(Collection<? extends dev.langchain4j.skills.Skill> skillList)