Skip to content

AI Complete

Type: ai-complete  ·  Package: AI Activities v1.0.0  ·  Output: string

Sends a prompt to a large language model and returns its answer as text. Use it to summarise, draft, translate, classify, or answer questions about some content.

If what you need is specific fields (a serial number, a date, an amount), use AI Extract instead: it returns an object rather than text you would then have to parse.

Sends system (the model’s role and rules) and prompt (the task at hand), plus the images if there are any, and returns the answer text.

ParameterEditorDescription
credentialcredentialZoan Cloud credential holding the provider’s API key.
promptexpressionThe question or task for the model.
ParameterEditorDescription
providerenumAI provider. Defaults to Anthropic (Claude).
modelexpressionModel id. Leave empty to use the provider’s default model.
systemexpressionSystem instructions: the model’s role, rules and output style.
imageslistPaths of images to send with the prompt (.jpg, .png, .gif, .webp).
effortenumHow much work the model puts in: low, medium, high, xhigh, max.
thinkingbooleanLet the model reason before answering.
maxTokensexpressionMaximum length of the answer, in tokens. Default 16000.
timeoutexpressionSeconds to wait. Default 600.

Returns a string with the model’s answer.

The split matters: system describes who the model is and what rules it follows for the whole request; prompt is the task at hand. Putting the rules in the prompt works, but they get diluted when the content is long.

system → "You are a support email classifier. Answer with exactly one of these
words: incident, question, spam."
prompt → = emailBody

Classify an incoming email and branch on it:

AI Complete credential = = credential("anthropic-key")
system = "You are a support email classifier…"
prompt = = email["body"]
maxTokens = 10
→ output: kind
If condition = = kind == "incident"
...

Summarise a long contract:

PDF Get Text path = = contractPath → output: text
AI Complete credential = = credential("anthropic-key")
system = "Summarise as bullets, five at most, in English."
prompt = = text
→ output: summary
MessageWhat happened
The model hit the 'maxTokens' limit before finishingThe answer does not fit. Raise maxTokens or ask for less text.
The credential does not contain an Anthropic API keyThe credential exists but is empty or holds something else.
Claude declined this request for safety reasonsThe model refused the content. This is an answer from the model, not a configuration failure.