Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Basic LLM Chain

ai.chain_llm · version 1.7 · AI

Sends a prompt to a chat model and returns its answer.

Ports

PortKindLabelRequiredMax connections
input 0main
input 1ai_languageModelyes1
input 2ai_outputParser1
output 0main

Credentials

This node uses no credentials.

Parameters

NameTypeDefaultRequiredShown whenDescription
promptTypeoptions"auto"Prompt Source. One of auto, define.
textstringpromptType = definePrompt.
hasOutputParserbooleanfalseRequire Specific Output Format.
messagesfixed_collectionChat Messages.
messages.messageValuescollectionMessage.
messages.messageValues.typeoptions"SystemMessagePromptTemplate"Role. One of SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate.
messages.messageValues.messageTypeoptions"text"Content Type. One of text, imageBinary, imageUrl.
messages.messageValues.messagestring
messages.messageValues.binaryImageDataKeystring"data"Binary Field.
messages.messageValues.imageUrlstringImage URL.

Import

Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.

Source typeVersion rangeStatusFixtures
@n8n/n8n-nodes-langchain.chainLlm1unverified