Skip to content

Vercel AI Gateway 聊天模型节点(Vercel AI Gateway Chat Model node)#

使用 Vercel AI Gateway Chat Model 节点,将 AI Gateway 聊天模型与对话代理结合使用。

🌐 Use the Vercel AI Gateway Chat Model node to use AI Gateway chat models with conversational agents.

本页包含 Vercel AI 网关聊天模型节点的节点参数以及更多资源的链接。

🌐 On this page, you'll find the node parameters for the Vercel AI Gateway Chat Model node and links to more resources.

凭证

你可以在此处找到此节点的认证信息。

Parameter resolution in sub-nodes

Sub-nodes behave differently to other nodes when processing multiple items using an expression.

Most nodes, including root nodes, take any number of items as input, process these items, and output the results. You can use expressions to refer to input items, and the node resolves the expression for each item in turn. For example, given an input of five name values, the expression {{ $json.name }} resolves to each name in turn.

In sub-nodes, the expression always resolves to the first item. For example, given an input of five name values, the expression {{ $json.name }} always resolves to the first name.

节点参数(Node parameters)#

模型(Model)#

选择用于生成补全的模型。

🌐 Select the model to use to generate the completion.

n8n 会从 AI Gateway 动态加载模型,你只会看到你账户可用的模型。

🌐 n8n dynamically loads models from the AI Gateway and you'll only see the models available to your account.

节点选项(Node options)#

使用这些选项来进一步细化节点的行为。

🌐 Use these options to further refine the node's behavior.

频率惩罚(Frequency Penalty)#

使用此选项可以控制模型重复自身的几率。较高的数值可以降低模型重复的可能性。

🌐 Use this option to control the chance of the model repeating itself. Higher values reduce the chance of the model repeating itself.

最大令牌数(Maximum Number of Tokens)#

请输入使用的最大令牌数,这将设置完成时长。

🌐 Enter the maximum number of tokens used, which sets the completion length.

响应格式(Response Format)#

选择 文本JSONJSON 确保模型返回有效的 JSON。

🌐 Choose Text or JSON. JSON ensures the model returns valid JSON.

在线惩罚(Presence Penalty)#

使用此选项可以控制模型谈论新话题的可能性。较高的数值会增加模型谈论新话题的机会。

🌐 Use this option to control the chance of the model talking about new topics. Higher values increase the chance of the model talking about new topics.

采样温度(Sampling Temperature)#

使用此选项可以控制采样过程的随机性。较高的温度会产生更多样化的采样,但也增加了产生幻觉的风险。

🌐 Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.

超时(Timeout)#

请输入最大请求时间(以毫秒为单位)。

🌐 Enter the maximum request time in milliseconds.

最大重试次数(Max Retries)#

请输入请求重试的最大次数。

🌐 Enter the maximum number of times to retry a request.

热门问题(Top P)#

使用此选项设置生成内容应使用的概率。使用较低的值可以忽略不太可能的选项。

🌐 Use this option to set the probability the completion should use. Use a lower value to ignore less probable options.

模板和示例(Templates and examples)#

Template widget placeholder.

}

由于 Vercel AI Gateway 与 OpenAI API 兼容,你可以参考 LangChains 的 OpenAI 文档 了解有关该服务的更多信息。

🌐 As the Vercel AI Gateway is API-compatible with OpenAI, you can refer to LangChains's OpenAI documentation for more information about the service.

View n8n's Advanced AI documentation.