人工智能中的工具是什么?#
¥What's a tool in AI?
在 AI 中,'tools' 具有特定的含义。工具类似于插件,你的 AI 可以使用它们来访问额外的上下文或资源。
¥In AI, 'tools' has a specific meaning. Tools act like addons that your AI can use to access extra context or resources.
以下是几种其他表达方式:
¥Here are a couple of other ways of expressing it:
工具是代理可以用来与世界 (source) 交互的接口。
¥Tools are interfaces that an agent can use to interact with the world (source)
我们可以将这些工具视为 AI 模型可以调用的函数 (source)。
¥We can think of these tools as being almost like functions that your AI model can call (source)
n8n 中的 AI 工具#
¥AI tools in n8n
n8n 提供了一个工具 sub-nodes,你可以将其连接到你的 AI 代理。除了提供一些常用工具(例如 维基百科 和 SerpAPI)之外,n8n 还提供了三个功能强大的工具:
¥n8n provides tool sub-nodes that you can connect to your AI agent. As well as providing some popular tools, such as Wikipedia and SerpAPI, n8n provides three especially powerful tools:
- 调用 n8n 工作流工具:用于将任何 n8n 工作流加载为工具。
¥Call n8n Workflow Tool: use this to load any n8n workflow as a tool.
- 自定义代码工具:编写你的代理可以运行的代码。
¥Custom Code Tool: write code that your agent can run.
- HTTP 请求工具:调用 API 获取网站或数据。
¥HTTP Request Tool: make calls to fetch a website or data from an API.
以下三个示例重点介绍 Call n8n 工作流程工具:
¥The next three examples highlight the Call n8n Workflow Tool:
你还可以了解如何使用 允许 AI 使用 $fromAI() 函数动态指定工具参数。
¥You can also learn how to let AI dynamically specify parameters for tools with the $fromAI() function.