Skip to content

Conversation

@Shrey327
Copy link
Contributor

@Shrey327 Shrey327 commented Dec 7, 2025

Overview

Fixed the agentic RAG tutorial to use the @tool decorator instead of create_retriever_tool. The previous approach caused a TypeError when used with LangGraph's ToolNode because create_retriever_tool returns a functools.partial object, which is incompatible with typing.get_type_hints().

Type of change

Type: Fix typo/bug/link/formatting

Related issues/PRs

  • GitHub issue: N/A
  • Feature PR: N/A

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • 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

Additional notes

The issue manifests as: TypeError: functools.partial(...) is not a module, class, method, or function during graph compilation/execution. The @tool decorator creates a proper StructuredTool that ToolNode can correctly inspect.

@Shrey327 Shrey327 requested a review from lnhsingh as a code owner December 7, 2025 19:20
@github-actions github-actions bot added langgraph For docs changes to LangGraph oss labels Dec 7, 2025
@Shrey327 Shrey327 requested a review from mdrxy as a code owner December 7, 2025 19:35
@github-actions github-actions bot added langchain For docs changes to LangChain python For content related to the Python version of LangChain projects labels Dec 7, 2025
@github-actions github-actions bot removed langchain For docs changes to LangChain python For content related to the Python version of LangChain projects labels Dec 8, 2025
@lnhsingh lnhsingh merged commit 1089929 into langchain-ai:main Dec 8, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

langgraph For docs changes to LangGraph oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants