Saltar al contenido principal

LLM

Category: AI & ML
Node id: llm

General-purpose LLM inference supporting multiple providers

What it does​

  • Multi-provider LLM inference (OpenAI, Anthropic, Hunyuan)
  • System prompt customization
  • Temperature and token limit control
  • Token usage tracking
  • Configurable model selection

Use cases​

  • General-purpose text generation and completion
  • Question answering with custom system prompts
  • Content creation across multiple LLM providers

Runtime​

  • Performance tier: variable

Input ports​

NameTypeRequiredDescription
prompttextYesThe user prompt to send to the LLM

Output ports​

NameTypeRequiredDescription
resultjsonNoMain result containing response, usage statistics, and max_tokens
successbooleanNoWhether the operation succeeded

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
ProviderproviderenumNoopenaiopenai, anthropic, hunyuanLLM provider to use
ModelmodelstringNogpt-4Model name to use
System Promptsystem_prompttextNo""System prompt to prepend

Auth​

SettingNameTypeRequiredDefaultAllowed valuesDescription
API Keyapi_keysecretYesAPI key for the LLM provider

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
TemperaturetemperaturenumberNo0.7min 0; max 2Sampling temperature
Max Tokensmax_tokensnumberNo1000Maximum tokens to generate

Errors​

CodeDescription
PROMPT_REQUIREDNo prompt input was provided
INVALID_PROVIDERProvider must be openai, anthropic, or hunyuan
API_KEY_MISSINGAPI key is required but not configured

Runtime notes​

  • The LLM text output is in result.response as a plain string, NOT a structured object. Parse it downstream if you need JSON.
  • result.usage contains token counts; use result.usage.total_tokens for cost tracking.
  • Streaming is handled internally — the node collects the full response before emitting output.
  • The hunyuan provider uses OpenAI-compatible format; set base_url in config to point to the Hunyuan endpoint.

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..