MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / build_langchain_tools

Function build_langchain_tools

workflow/nodes.py:38–49  ·  view source on GitHub ↗
(tool_specs: list[ToolSpec])

Source from the content-addressed store, hash-verified

36
37
38def build_langchain_tools(tool_specs: list[ToolSpec]) -> list[Any]:
39 try:
40 from langchain.agents import Tool
41 except ImportError as exc:
42 raise RuntimeError(
43 "LangChain is required to build workflow tools. Install project dependencies first."
44 ) from exc
45
46 return [
47 Tool(name=tool.name, description=tool.description, func=tool.handler)
48 for tool in tool_specs
49 ]
50
51
52async def agent_node(

Callers 1

build_nodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected