(LangGraph教程)0. Welcome to the course!
https://academy.langchain.com/courses/intro-to-langgraphhttps://github.com/shangxiang0907/langchain-academyhttps://github.com/shangxiang0907/langchain-academy/blob/main/module-0/basics.ipynb文章目录Getting Set UpIntroductionSetupPython versionClone repoCreate an environment and install dependenciesRunning notebooksSign up for LangSmithSet up OpenAI API keyTavily for web searchSet up LangSmith StudioNote: LangSmith Studio was formerly LangGraph StudioSlack CommunityModule 0 ResourcesGetting Set Up (Video Guide)Getting Set Up中文:环境设置Introduction中文:简介Welcome to LangChain Academy’s Introduction to LangGraph course!欢迎来到 LangChain Academy 的 LangGraph 入门课程!This course is divided into six modules, starting with the basics and gradually progressing to more advanced topics.本课程分为六个模块,从基础知识开始,逐步深入到更高级的主题。Each module includes video lessons to walk you through key concepts, along with corresponding notebooks.每个模块都包含讲解关键概念的视频课程,以及与之对应的笔记本。You’ll also find astudiosubdirectory in each module, featuring a set of relevant graphs that we’ll explore using the LangGraph API and Studio.每个模块中还包含一个studio子目录,其中提供了一组相关的图;我们将使用 LangGraph API 和 Studio 对它们进行探索。Setup中文:设置Here’s our recommended setup to get started with the course.下面是我们建议的课程入门设置。We’ll be using the set of notebooks located here.我们将使用位于此处的一组笔记本。If you prefer to download the notebooks manually, you can access a ZIP file here.如果你希望手动下载这些笔记本,可以在此处获取 ZIP 文件。Each module will also include links to the corresponding notebooks, with additional options to access them in Google Colab for a quick start.每个模块还会提供相应笔记本的链接,并额外提供在 Google Colab 中打开的选项,方便你快速开始。Python version中文:Python 版本Please make sure you’re using a Python version higher than 3.11 but lower than 3.14, specifically 3.11, 3.12, or 3.13.请确保你使用的 Python 版本高于 3.11 且低于 3.14,具体可使用 3.11、3.12 或 3.13。python3 --versionClone repo中文:克隆代码仓库git clone https://github.com/langchain-ai/langchain-academy.git $ cd langchain-academyCreate an environment and install dependencies中文:创建环境并安装依赖项$ python3 -m venv lc-academy-env $ source lc-academy-env/bin/activate $ pip install -r requirements.txt我ubuntu里装的是python3.14,用uv先装python3.13,不会影响默认的uv pythoninstall3.13然后把上面命令改成用:python3.13-mvenv lc-academy-env第一次报错了,不知道为啥为了方便,可以:按 Ctrl+Shift+P选择 Python: Select Interpreter选择或手动输入:/home/user/projects/langchain-academy/lc-academy-env/bin/pythonRunning notebooks中文:运行笔记本If you don’t have Jupyter set up, follow installation instructions here.如果你尚未设置 Jupyter,请按照此处的安装说明操作。$ jupyter notebookSign up for LangSmith中文:注册 LangSmithCreate a LangSmith account and API key.创建一个 LangSmith 账户和 API 密钥。You can reference LangSmith docs here.你可以在此处查看 LangSmith 文档。Then, set然后设置:LANGSMITH_API_KEY="your-key" LANGSMITH_TRACING_V2=true LANGSMITH_PROJECT="langchain-academy" # If you are on the EU instance: LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.com代码注释翻译:# If you are on the EU instance:表示“如果你使用的是欧盟实例”。in your environment.在你的环境中完成上述设置。https://docs.langchain.com/langsmith/observability-quickstart#prerequisites参考文章:VSCode Python扩展自动加载.env环境变量机制(Python插件)python.terminal.useEnvFileSet up OpenAI API key中文:设置 OpenAI API 密钥If you don’t have an OpenAI API key, you can sign up here.如果你没有 OpenAI API 密钥,可以在此处注册。Note that OpenAI no longer has a free tier.请注意,OpenAI 已不再提供免费层级。You will need to add funds to your OpenAI account.你需要为 OpenAI 账户充值。You can use other models.你也可以使用其他模型。Your results may differ from those in the course video, but that is not unusual in LLM development.你的结果可能与课程视频中的结果不同,但这在 LLM 开发中并不罕见。Be sure to set up keys and alter invocations for any alternate models.如果使用其他模型,请务必设置相应密钥并修改调用方式。Then, set然后设置:OPENAI_API_KEYin your environment.在你的环境中完成上述设置。Tavily for web search中文:使用 Tavily 进行网络搜索Tavily Search API is a search engine optimized for LLMs and RAG, aimed at efficient, quick, and persistent search results.Tavily Search API 是一款针对 LLM 和 RAG 优化的搜索引擎,旨在高效、快速且持续地提供搜索结果。You can sign up for an API key here.你可以在此处注册 API 密钥。It’s easy to sign up and offers a generous free tier.注册过程很简单,并且提供额度充足的免费层级。Some lessons in Module 4 will use Tavily.模块4中的部分课程会使用 Tavily。Then, set然后设置:TAVILY_API_KEYin your environment.在你的环境中完成上述设置。Set up LangSmith Studio中文:设置 LangSmith StudioNote: LangSmith Studio was formerly LangGraph Studio中文:注意:LangSmith Studio 原名为 LangGraph Studio。LangSmith Studio is a custom IDE for viewing and testing agents.中文:LangSmith Studio 是一个用于查看和测试智能体的定制 IDE。Studio can be run locally and opened in your browser on Mac, Windows, and Linux.中文:在 Mac、Windows 和 Linux 上,Studio 都可以在本地运行并通过浏览器打开。See documentation here.中文:请在此处查看文档。Graphs for LangSmith Studio are in the module-x/studio/ folders.中文:LangSmith Studio 使用的图位于module-x/studio/文件夹中。To start the local development server, run the following command in your terminal in the /studio directory each module:中文:若要启动本地开发服务器,请在每个模块的/studio目录中,通过终端运行以下命令:langgraph devYou should see the following output:你应该会看到以下输出:- 🚀 API: http://127.0.0.1:2024 - 🎨 Studio UI: https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024 - 📚 API Docs: http://127.0.0.1:2024/docshttps://aws.smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024Open your browser and navigate to the Studio UI:https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024打开浏览器并前往 Studio UI:https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024To use Studio, you will need to create a .env file with the relevant API keys中文:若要使用 Studio,需要创建一个包含相关 API 密钥的.env文件。Run this from the command line to create these files for module 1 to 6, as an example:中文:以下命令演示了如何通过命令行为模块1至模块6创建这些文件:for i in {1..5}; do cp module-$i/studio/.env.example module-$i/studio/.env echo "OPENAI_API_KEY=\"$OPENAI_API_KEY\"" module-$i/studio/.env done echo "TAVILY_API_KEY=\"$TAVILY_API_KEY\"" module-4/studio/.env现在不需要执行截图中的循环命令。Studio 已经打开,而且页面显示绿色 Connected,说明本地开发服务运行正常。截图中的命令只负责给每个module-*/studio创建 .env,并不负责启动 Studio。但当前仓库已经改成让所有 Studio 统一读取根目录的 .env:"env": "../../.env"Slack Community中文:Slack 社区If you’re interested in connecting with other learners, you can join our Slack Community here.如果你希望与其他学习者交流,可以在此处加入我们的 Slack 社区。If you have any questions, we encourage you to ask and explore in our community-run Forum.如果你有任何问题,我们鼓励你在社区运营的论坛中提问和探索。We encourage you to pay it forward within the community and help other learners.我们鼓励你在社区中将善意传递下去,帮助其他学习者。Please note that our Slack Community is not an official support channel.请注意,我们的 Slack 社区并非官方支持渠道。If you are a customer and need product support, reach out to support@langchain.dev.如果你是客户并需要产品支持,请联系 support@langchain.dev。Module 0 Resources中文:模块0资源Getting Set Up (Video Guide)中文:环境设置(视频指南)Notebook Reference: basics.ipynb中文:笔记本参考文件:basics.ipynbDownload Notebook onGitHub中文:在GitHub上下载笔记本。View Notebook onGoogle Colab中文:在Google Colab上查看笔记本。

相关新闻

视觉AI技术趋势解析:从模型小型化到工业应用实战

视觉AI技术趋势解析:从模型小型化到工业应用实战

1. 项目概述:从一份报告窥见视觉AI的现在与未来最近,斯坦福大学发布的年度AI指数报告又一次成了圈内热议的焦点。作为一名长期泡在计算机视觉和机器人感知一线的从业者,我拿到报告后,第一时间就翻到了视觉相关部分。这份报告的价值…

2026/10/25 14:04:59 阅读更多 →
从7.97米跳远成绩看双足机器人高动态运动控制技术

从7.97米跳远成绩看双足机器人高动态运动控制技术

2023年以来,双足机器人从“能走”到“能跑”,再到“能跳”,每一步都卡在同一个工程问题上:怎么在极短的时间内,完成高功率爆发、空中姿态调整和落地缓冲这一整套动作。天骄机器人以7.97米的成绩拿下跳远冠军&#xff0…

2026/10/24 6:58:18 阅读更多 →
从AI剧到互动影游:用Flask与状态机构建动态剧情应用

从AI剧到互动影游:用Flask与状态机构建动态剧情应用

最近 AI 圈有个很有意思的现象:一位中专学历的创作者,用一套 AI 工具链“手搓”出了一部爆款 AI 剧,不仅在国内平台刷屏,甚至引发了海外影视行业的关注。紧接着,这个 IP 又要往“互动影游”方向走。很多人都在问&#…

2026/10/25 23:30:35 阅读更多 →

最新新闻

Electron桌面应用开发实战:从环境搭建到打包发布全流程

Electron桌面应用开发实战:从环境搭建到打包发布全流程

做前端这些年,我大部分时间都在跟浏览器标签页打交道,直到第一次把桌面应用跑起来,才发现原来自己一直被限制在地址栏和刷新按钮围起来的框框里。Electron这个词,最开始是在某段时间频繁出现在同事的讨论里,一个用HTML…

2026/10/26 12:00:21 阅读更多 →
滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

简介:亚太天能T109滑盖智能锁产品说明书是一份PDF格式的官方技术文档,主要面向智能锁安装人员、终端用户及售后维护者,帮助快速掌握产品安装、配置与常见故障处理。全包仅1个PDF文件,大小4.37MB,内容结构清晰&#xff…

2026/10/27 4:06:49 阅读更多 →
PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

上个月我在调试一台高速AGV的驱动系统,整车要求空载跑到8m/s,电机转速已经拉到额定点,驱动器的输出电压也顶到了母线电压极限附近。再往上踩速度指令,转速纹丝不动,三相电流反而开始震荡。那会儿我的第一反应就是&…

2026/10/27 7:21:53 阅读更多 →
C++核心知识点:从内存管理到STL的实战指南

C++核心知识点:从内存管理到STL的实战指南

C 这门语言我前前后后折腾了十几年,用它写过嵌入式驱动、做过游戏服务端,也搭过基础组件库。每次看到新人一头扎进"C 核心知识点"这个搜索词,我其实挺感慨的——这门语言的难点从来不是语法多,而是知识点之间的耦合太深…

2026/10/26 12:00:21 阅读更多 →
T109滑盖智能锁怎么装?安装调试与故障排查全攻略

T109滑盖智能锁怎么装?安装调试与故障排查全攻略

简介:亚太天能T109滑盖智能锁产品说明书以PDF格式发布,适合智能锁用户、安装人员与售后维修人员阅读。内容围绕T109系列指纹密码刷卡锁展开,先介绍前面板、后面板、锁体、机械钥匙、电池盒盖等部件名称与功能,再给出完整安装步骤&…

2026/10/27 6:20:47 阅读更多 →
LLM知识降熵:从信息垄断到理解权下放

LLM知识降熵:从信息垄断到理解权下放

你有没有过这种经历:翻开源码注释、论文摘要或者一份专业报告,每个字都认识,连在一起却像天书。想找人聊聊,身边要么没人懂,要么懂的懒得跟你解释。后来我试着把同一段内容丢给一个大语言模型,几秒钟之后&a…

2026/10/27 4:06:50 阅读更多 →

日新闻

周新闻

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/26 12:00:19 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/27 7:21:50 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/26 8:34:37 阅读更多 →