Actions21
Overview
This node provides a conversational text completion feature, allowing users to send a series of messages to a language model or intelligent agent and receive generated responses. It is useful for building chatbots, virtual assistants, or any application requiring interactive dialogue with an AI model. For example, you can use it to simulate customer support conversations, generate creative writing prompts, or automate question-answering tasks.
Properties
| Name | Meaning |
|---|---|
| 模型 (assistantId) | The model or intelligent agent identifier to use for generating responses. Can be any string; if unknown, any value can be entered. |
| 消息 (messages) | A collection of message objects forming the conversation history. Each message includes: - 文本 (content): The text content to send. - 角色 (role): The role shaping the model's response, options are 用户 (user), 助手 (assistant), 系统 (system). |
| 简化输出 (simplify) | Boolean flag indicating whether to return a simplified version of the response instead of raw data. Defaults to true. |
| 语音列表 (voice) | Selects a voice for text-to-speech output when enabled. Options include official voices and cloned voices. Multiple tokens default to using the first token. |
Output
The node outputs JSON data containing the model's generated response based on the input messages. If text-to-speech is used, the output may also include audio data corresponding to the selected voice. The simplified output option returns a cleaner, more concise response format rather than detailed raw data.
Dependencies
- Requires access to an external conversational AI service or API that supports the specified model and message format.
- For voice synthesis, requires integration with a text-to-speech service providing the listed voices.
- Proper authentication credentials (e.g., API keys or tokens) must be configured in n8n to authorize requests to these services.
Troubleshooting
- Common issues:
- Invalid or empty model identifier may cause failures or unexpected responses.
- Incorrectly formatted messages (missing content or role) can lead to errors or poor results.
- Voice selection without enabling TTS or missing TTS credentials will not produce audio output.
- Error messages:
- Authentication errors indicate missing or invalid API credentials; verify and update them in n8n settings.
- Network or timeout errors suggest connectivity problems; check internet access and service availability.
- Validation errors usually point to malformed input properties; ensure all required fields are correctly filled.
Links and References
- No direct links available from the source code. For best results, consult documentation of the conversational AI and TTS services you integrate with this node.