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
选择文本或 JSON。JSON 确保模型返回有效的 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
相关资源#
¥Related resources
由于 Vercel AI 网关与 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.