Actions3
- Large Language Model Actions
- Vision Model Actions
- Text to Image Actions
Large Language Model → Chat Completion
AI-generatedSummary
Sends a chat conversation to a selected ModelScope language model and returns its completion, token usage, and processing metadata. Configure one or more messages with System, User, or Assistant roles; choose a supplied message template if useful, and adjust generation settings as needed.
Inputs
- Model (required) — Select one of the listed ModelScope language models; defaults to ZhipuAI/GLM-5.2.
- Message Template — Choose Custom, Code Generation, Text Analysis, or Translation. The operation reads the Messages field to build the request; the source does not apply the selected template to message content.
- Messages — Provide one or more messages, each with a System, User, or Assistant role and text content. At least one message must contain non-whitespace text.
- Temperature — Controls output randomness from 0 to 2; defaults to 0.7.
- Max Tokens — Maximum generated token count, from 1 to 8192; defaults to 2048.
- Stream — Enable streaming; defaults to false.
Output shape
A single JSON item per input item.
With streaming disabled, the item contains response fields such as id, model, choices, usage, status, processing_time, input_tokens, output_tokens, total_tokens, and completed_at. With streaming enabled, it contains {"stream":true,"response":...} instead. Requires ModelScope API credentials with an access token; errors are thrown unless the node is configured to continue on fail.