Actions6
- Chat Actions
- Completion Actions
- Feedback Actions
Chat → Stop Generation
AI-generatedOverview
The node interacts with the Dify AI platform, specifically allowing users to stop an ongoing chat message generation task. This is useful in scenarios where a chat response is taking too long, is no longer needed, or if you want to cancel a generation due to changed context or user input.
For example, if you have a chatbot integrated into your workflow and a user decides to abort the current AI-generated reply, this operation can be triggered to halt the generation process immediately.
Properties
| Name | Meaning |
|---|---|
| Task ID | The unique identifier of the chat message generation task that you want to stop. |
| User ID | (Optional) The identifier of the user associated with the task, used for tracking or authorization purposes. |
Output
The output JSON contains the result of the stop request for the chat generation task. It typically includes confirmation that the task was stopped or relevant status information returned by the Dify API.
If the operation fails, the output will contain an error message describing the issue.
No binary data is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Dify AI platform.
- The node expects the base URL and API key to be configured in the credentials.
- Network access to the Dify API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing Task ID: The stop operation requires a valid task identifier; ensure it is correctly provided.
- Authentication errors: Verify that the API key credential is correct and has sufficient permissions.
- Network connectivity problems: Ensure the node can reach the Dify API endpoint.
Error messages:
"The operation "stop" is not supported for resource "chat": This indicates a misconfiguration of the operation parameter.- Errors containing
"error": "<message>"in the output JSON indicate API-level failures; check the message for details.
To resolve errors, verify input parameters, credentials, and network connectivity.
Links and References
- Dify AI Platform Documentation (for API details and authentication)
- n8n Documentation on Creating Custom Nodes