Repository navigation
docs: add the runnable LangChain docs example - #41
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
将已实测、已公开的 LangChain 文档首读示例整理为可直接运行的 examples/langchain_docs.py,补齐英中 README 与 Agent 任务入口。读者通过 uv 直接运行,无需复制展示帖代码或准备模型、钱包、账户 key。
脚本只在原公开代码前增加 PEP 723 依赖声明,固定当前 langchain[mcp]1.4.9 / FastMCP4.1.6 / MCP2.3.0;保持普通 UA 默认、显式内部 QA 标记以及 beta 提示。README 命令关闭 LangSmith tracing。
验证:
验收项: README 与 AGENTS 能直接定位运行文件;脚本依赖、beta及无模型首读边界清楚,不改现有示例与 TypeScript 路径。
Follow-up validation at 2026-11-07 16:19 UTC: downloaded the exact merged
examples/langchain_docs.pyfromf6199662a459abebccba5c3451d80bf5e9a199e4(SHA256d0bc55c7698c166c8d859fc60c59bf5c264858d40b18cf49c4fc49e699baab18) into a fresh task directory and empty task-local uv cache.uv run --script --python 3.11 examples/langchain_docs.pycompleted with Python 3.11.14 and native exit 0: PEP 723 installed 86 packages, protocol 2026-07-28, exactlysearch_docs/read_doc, both successful, with the expected Quickstart result and non-empty document. Thelangchain.mcpbeta warning remained visible. Total dependency setup plus execution was 5.76 seconds for this one run, not a performance benchmark.The run used
BLOCKVECTRA_INTERNAL_QA=1andLANGSMITH_TRACING=false, no model, account, API key or chain RPC. It is internal first-use QA, not customer adoption. HTTP counts were not traced and are unknown; no four-request count is inferred from the earlier SDK run. Top-level dependency pins are not a complete transitive lock. The task environment was removed after retaining the resolved package list and raw output; no source or published file was changed.