Overview
This node, "Wiro - Ask AI Chatbot," sends a user-defined prompt to Wiro AI's chatbot service and returns the assistant's generated response. It is designed to interact with various large language models (LLMs) hosted by Wiro AI, allowing users to customize the model and generation parameters.
Common scenarios where this node is beneficial include:
- Generating creative text such as stories or articles based on prompts.
- Answering questions or providing explanations using AI chat models.
- Experimenting with different LLMs and tuning generation parameters for tailored outputs.
- Integrating AI conversational capabilities into automated workflows.
For example, a user might input a historical question prompt and receive a detailed narrative answer, or use it to generate code snippets or summaries depending on the selected model.
Properties
| Name | Meaning |
|---|---|
| Selected Model | Choose from a wide range of LLM chat models provided by Wiro AI, e.g., Qwen2.5-14B-Instruct, Meta-Llama, Mistral, etc. |
| Prompt | The main text prompt sent to the chat model to generate a response. |
| System Prompt | Instructional prompt guiding the modelβs behavior to be helpful, safe, unbiased, and honest. |
| User ID | Optional unique identifier to track user history across requests. |
| Session ID | Optional identifier to maintain conversation context within a session. |
| Temperature | Controls randomness in output; higher values produce more diverse results. |
| Top P | Nucleus sampling parameter controlling token selection probability mass. |
| Top K | Limits token sampling to top K tokens for output diversity control. |
| Repetition Penalty | Penalizes repeated tokens to reduce redundancy in generated text. |
| Length Penalty | Influences the length of the generated output. |
| Max Tokens | Maximum total tokens allowed in the output (0 means no limit). |
| Min Tokens | Minimum total tokens required in the output. |
| Max New Tokens | Maximum number of new tokens to generate (0 means no limit). |
| Min New Tokens | Minimum number of new tokens to generate (-1 means default behavior). |
| Stop Sequences | Semicolon-separated sequences that signal the model to stop generating further tokens. |
| Seed | Random seed value for reproducibility of results. |
| Quantization | Option to enable quantized weights for model efficiency (flag string). |
| Do Sample | Option to enable sampling during generation (flag string). |
Output
The node outputs a JSON object with the following structure:
{
"taskid": "string",
"message": "string",
"status": "completed" | "failed"
}
taskid: Identifier for the generation task returned by the Wiro API.message: The generated text response from the AI chatbot.status: Indicates whether the generation completed successfully (completed) or failed (failed).
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Wiro AI service.
- Makes HTTP POST requests to
https://api.wiro.ai/v1/Run/wiro/chat. - Uses a polling mechanism to wait for the asynchronous completion of the chat generation task.
- Requires network access to Wiro AI endpoints.
- No additional environment variables are explicitly required beyond the API credentials.
Troubleshooting
- Missing or invalid API credentials: The node requires valid API keys to authenticate. Ensure credentials are correctly configured.
- API response missing task ID or socket token: If the Wiro API does not return expected identifiers, the node throws an error indicating invalid response. Check API status and request parameters.
- Task polling failure or timeout: The node polls until the generation task completes. Network issues or API delays may cause timeouts or failures.
- Invalid parameter values: Providing out-of-range or malformed parameters (e.g., negative max tokens) may cause errors or unexpected behavior.
- Empty or nonsensical prompt: The system prompt guides model safety and coherence; ensure prompts are meaningful to avoid irrelevant answers.
To resolve errors:
- Verify API credentials and permissions.
- Confirm all required parameters are set and valid.
- Check network connectivity to Wiro AI services.
- Review prompt content and system prompt instructions for clarity.
Links and References
- Wiro AI Official Website
- Wiro AI API Documentation (Assumed based on typical naming, verify actual URL)
- n8n Documentation on Creating Custom Nodes