Skip to content

Commit c43ab02

Browse files
authored
fix(docs): update module import for ToolNode in sql-agent.mdx (#1357)
## Overview update module import for ToolNode in sql-agent.mdx langgraph tutorial ## Type of change **Type:** Update existing documentation ## Related issues/PRs ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [ ] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [ ] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes <!-- Any other information that would be helpful for reviewers --> The code needed a update to run due to an error importing [ToolNode](https://reference.langchain.com/python/langgraph/agents/?h=toolnode#langgraph.prebuilt.tool_node.ToolNode) Following [guideline for quick edit](https://docs.langchain.com/oss/python/contributing/documentation#quick-edit%3A-fix-a-typo)
1 parent 90b3703 commit c43ab02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oss/langgraph/sql-agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,10 @@ Putting these steps in dedicated nodes lets us (1) force tool-calls when needed,
270270
```python
271271
from typing import Literal
272272

273-
from langchain.agents import ToolNode
274273
from langchain.messages import AIMessage
275274
from langchain_core.runnables import RunnableConfig
276275
from langgraph.graph import END, START, MessagesState, StateGraph
276+
from langgraph.prebuilt import ToolNode
277277

278278

279279
get_schema_tool = next(tool for tool in tools if tool.name == "sql_db_schema")

0 commit comments

Comments
 (0)