Skip to content

将 LangSmith 与 n8n 一起使用#

¥Use LangSmith with n8n

LangSmith 是由 LangChain 团队创建的开发者平台。你可以将 n8n 实例连接到 LangSmith,以记录和监控 n8n 中的运行,就像在 LangChain 应用中一样。

¥LangSmith is a developer platform created by the LangChain team. You can connect your n8n instance to LangSmith to record and monitor runs in n8n, just as you can in a LangChain application.

Feature availability

仅限自托管 n8n。

¥Self-hosted n8n only.

将你的 n8n 实例连接到 LangSmith#

¥Connect your n8n instance to LangSmith

  1. 获取 API 密钥所需的 登录 LangSmith

¥Log in to LangSmith and get your API key.

  1. 设置 LangSmith 环境变量:

¥Set the LangSmith environment variables:

变量
LANGCHAIN_ENDPOINT "https://api.smith.langchain.com"
LANGCHAIN_TRACING_V2 true
LANGCHAIN_API_KEY 将其设置为你的 API 密钥。

设置变量,使其在托管 n8n 实例的环境中全局可用。你可以按照与其余常规配置相同的方式来完成此操作。

¥Set the variables so that they're available globally in the environment where you host your n8n instance. You can do this in the same way as the rest of your general configuration.

  1. 重启 n8n。

¥Restart n8n.

有关使用 LangSmith 的信息,请参阅 LangSmith 文档

¥For information on using LangSmith, refer to LangSmith's documentation.