Function
build_langchain_tools
(tool_specs: list[ToolSpec])
Source from the content-addressed store, hash-verified
| 36 | |
| 37 | |
| 38 | def 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 | |
| 52 | async def agent_node( |
Tested by
no test coverage detected