AI Chat

ai.chat AI v0.1.0

Sends one chat completion to any OpenAI-compatible endpoint (OpenAI, OpenRouter, local Ollama at http://localhost:11434/v1, LM Studio). The prompt comes from an input field or a {{ }} template; outputs the reply, finish reason, and token usage.

Ports

DirectionPortLabel
InputinputPayload
OutputoutputReply

Properties

PropertyTypeDefaultDescription
Credential
credentialId
credential "" Use a stored credential for this connection — its fields are filled in at run start. Pick "None" to enter the connection details manually.
accepts credential templates: openai-compat
Base URL
baseUrl
string "https://api.openai.com/v1" OpenAI-compatible API base. Examples: https://api.openai.com/v1, http://localhost:11434/v1 (Ollama), http://localhost:1234/v1 (LM Studio).
API key
apiKey
string "" Bearer key — supports ${credential.openai-compat.apiKey}. Leave blank for local servers.
Model
model
string "" Model name, e.g. gpt-4o-mini or qwen2.5:0.5b.
System prompt
systemPrompt
string "" Optional system message prepended to the conversation.
Prompt from
promptMode
select "field" Read the prompt from an input field, or build it from a {{ }} template.
fieldtemplate
Prompt field
promptField
string "" Dot-path to the prompt text on the input. Leave blank to send the whole payload (stringified).
Shown when (promptMode ?? "field") === "field"
Prompt template
prompt
string "" Prompt with {{ }} expressions over the input, e.g. Summarize: {{ $json.article }} — same semantics as the Set node.
Shown when promptMode === "template"
Temperature
temperature
string "" Sampling temperature, e.g. 0.2. Leave blank to omit (the server default).
Max tokens
maxTokens
int 0 Cap on generated tokens. 0 = omit (the server default).
JSON mode
jsonMode
boolean false Ask the model for a JSON object (response_format json_object) and parse the reply into replyJson.
Timeout (ms)
timeoutMs
int 120000 Abort the completion after this many milliseconds.

This page is generated from the node registry by gen-node-docs.mjs on every site build — ports, properties, defaults and visibility rules cannot drift from the code.