跳到主要内容

LLM 节点(type = "llm")

负责与底层 AI 服务交互。

Schema

  • 参考: LlmNode.json
  • 核心字段(常用):
    • data.inputsValuesmodelName / temperature / systemPrompt / prompt
    • data.outputs:一般为 result: string 或结构化 JSON 字符串

执行由 LlmNodeExecutor 负责。

示例

最小化的 LLM 节点(示意):

{
"id": "llm_0",
"type": "llm",
"data": {
"inputsValues": {
"modelName": { "type": "constant", "content": "gpt-4.1-mini" },
"temperature": { "type": "constant", "content": 0.2 },
"systemPrompt": { "type": "constant", "content": "你是一个只输出 JSON 的助手。" },
"prompt": { "type": "ref", "content": ["start_0", "query"] }
}
}
}