Skip to content

柠檬水聊天模型节点(Lemonade Chat Model node)#

使用 Lemonade 聊天模型节点可以在 n8n 中运行由 Lemonade 服务器管理的可聊天语言模型。该节点作为兼容 LangChain 的聊天模型根节点,适用于聊天风格的工作负载。它允许你选择托管在 Lemonade 服务器上的模型,并使用常用的采样和解码选项来控制生成行为。

🌐 Use the Lemonade Chat Model node to run chat-capable language models managed by a Lemonade server from within n8n. This node functions as a LangChain-compatible chat model root node and is suitable for chat-style workloads. It lets you select a model hosted on your Lemonade server, and control generation behavior using common sampling and decoding options.

在本页上,你将找到节点参数列表以及可用的选项来优化生成。

🌐 On this page, you'll find a list of the node parameters, and available options to refine generation.

凭证

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

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)#

将生成补全的模型。模型通过 Lemonade 服务器加载和管理。此参数是必需的。请选择由你的 Lemonade 服务器提供的模型名称(例如,模型别名如“gpt-4”,或任何 Lemonade 提供的自定义模型名称)。

🌐 The model which will generate the completion. Models are loaded and managed through the Lemonade server. This parameter is required. Select the model name made available by your Lemonade server (for example, a model alias like "gpt-4", or any custom model name exposed by Lemonade).

模型由 Lemonade 服务器提供;如果你没有看到预期的模型,请检查你的 Lemonade 服务器配置和凭证。

🌐 Models are provided by the Lemonade server; if you don't see the model you expect, verify your Lemonade server configuration and credentials.

节点选项(Node options)#

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

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

采样温度(Sampling Temperature)#

控制生成文本的随机性。较低的数值使输出更集中和确定,而较高的数值则使输出更具多样性和随机性。

🌐 Controls the randomness of the generated text. Lower values make the output more focused and deterministic, while higher values make it more diverse and random.

属性
类型 数字
必填
默认值 0.7

热门问题(Top P)#

控制模型在生成文本时可以选择哪些单词。较低的数值会逐步移除最不可能的选项,因此模型只能从更小、更高置信度的词汇池中选择。

🌐 Controls which words the model can choose from when generating text. Lower values progressively remove the least likely options, so the model can only pick from a smaller, higher-confidence pool.

属性
类型 数字
必填
默认 1

频率惩罚(Frequency Penalty)#

调整对已出现在生成文本中的词元的惩罚。正值会抑制重复,负值会鼓励重复。

🌐 Adjusts the penalty for tokens that have already appeared in the generated text. Positive values discourage repetition, negative values encourage it.

属性
类型 数字
必填
默认 0

在线惩罚(Presence Penalty)#

根据令牌在生成文本中迄今为止的出现情况调整对其的惩罚。正值会惩罚已经出现过的令牌,从而鼓励多样性。

🌐 Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity.

属性
类型 数字
必填
默认 0

生成的最大令牌数(Max Tokens to Generate)#

生成的最大令牌数。设置为 -1 表示无限制。在将其设置为较大值时要小心,因为这可能导致输出过长。

🌐 The maximum number of tokens to generate. Set to -1 for no limit. Be cautious when setting this to a large value, as it can lead to long outputs.

属性
类型 数字
必填
默认 -1

停止序列(Stop Sequences)#

以逗号分隔的序列列表,模型将在这些序列处停止生成文本。使用此方法定义响应的明确终止字符串。

🌐 Comma-separated list of sequences where the model will stop generating text. Use this to define explicit termination strings for responses.

属性
类型 string
必填
默认 ""

模板和示例(Templates and examples)#

Template widget placeholder.

有关该服务的更多信息,请参阅 Lemonade Server 的文档

🌐 Refer to Lemonade Server's documentation for more information about the service.

View n8n's Advanced AI documentation.