Uses of Class
com.hw.langchain.tools.base.BaseTool
Package
Description
-
Uses of BaseTool in com.hw.langchain.agents.agent
Modifier and TypeMethodDescriptionstatic AgentExecutor
AgentExecutor.fromAgentAndTools
(BaseSingleActionAgent agent, List<BaseTool> tools) Create from agent and tools.static BaseSingleActionAgent
Agent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) static BaseSingleActionAgent
BaseSingleActionAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) AgentExecutor.takeNextStep
(Map<String, BaseTool> nameToToolMap, Map<String, Object> inputs, List<org.apache.commons.lang3.tuple.Pair<AgentAction, String>> intermediateSteps) Take a single step in the thought-action-observation loop.static void
Agent.validateTools
(List<BaseTool> tools) Validate that appropriate tools are passed in. -
Uses of BaseTool in com.hw.langchain.agents.chat.base
Modifier and TypeMethodDescriptionstatic BasePromptTemplate
ChatAgent.createPrompt
(List<BaseTool> tools, String systemMessagePrefix, String systemMessageSuffix, String humanMessage, String formatInstructions, List<String> inputVariables) static Agent
ChatAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, AgentOutputParser outputParser, String systemMessagePrefix, String systemMessageSuffix, String humanMessage, String formatInstructions, List<String> inputVariables, Map<String, Object> kwargs) Construct an agent from an LLM and tools.static Agent
ChatAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) Construct an agent from an LLM and tools.static void
ChatAgent.validateTools
(List<BaseTool> tools) -
Uses of BaseTool in com.hw.langchain.agents.initialize
Modifier and TypeMethodDescriptionstatic AgentExecutor
Initialize.initializeAgent
(List<BaseTool> tools, BaseLanguageModel llm, AgentType agent) static AgentExecutor
Initialize.initializeAgent
(List<BaseTool> tools, BaseLanguageModel llm, AgentType agent, String agentPath, Map<String, Object> agentKwargs, Map<String, Object> kwargs) Load an agent executor given tools and LLM. -
Uses of BaseTool in com.hw.langchain.agents.load.tools
Modifier and TypeMethodDescriptionstatic BaseTool
LoadTools.getLLMMath
(BaseLanguageModel llm) static BaseTool
LoadTools.getSerpapi
(Map<String, Object> kwargs) -
Uses of BaseTool in com.hw.langchain.agents.mrkl.base
Modifier and TypeMethodDescriptionstatic PromptTemplate
ZeroShotAgent.createPrompt
(List<BaseTool> tools, String prefix, String suffix, String formatInstructions, List<String> inputVariables) Create prompt in the style of the zero shot agent.static Agent
ZeroShotAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, AgentOutputParser outputParser, String prefix, String suffix, String formatInstructions, List<String> inputVariables, Map<String, Object> kwargs) Construct an agent from an LLM and tools.static Agent
ZeroShotAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) Construct an agent from an LLM and tools.static void
ZeroShotAgent.validateTools
(List<BaseTool> tools) -
Uses of BaseTool in com.hw.langchain.agents.toolkits.base
-
Uses of BaseTool in com.hw.langchain.agents.tools
Modifier and TypeClassDescriptionclass
Tool that is run when invalid tool name is encountered by agent. -
Uses of BaseTool in com.hw.langchain.agents.utils
Modifier and TypeMethodDescriptionstatic void
Utils.validateToolsSingleInput
(String className, List<BaseTool> tools) -
Uses of BaseTool in com.hw.langchain.tools.base