Chat
AI-generatedOverview
This node integrates with the Featherless API to send chat messages to a specified language model. It allows users to interact with AI models by providing a system prompt and user message, then receiving generated responses. This is useful for building conversational agents, virtual assistants, or any application requiring natural language interaction.
Typical use cases include:
- Creating chatbots that respond based on custom instructions.
- Generating text completions or replies in workflows.
- Experimenting with different AI models by specifying their IDs.
For example, you can set a system prompt like "You are a helpful assistant" and send user questions to get AI-generated answers.
Properties
| Name | Meaning |
|---|---|
| Model Name or ID | The identifier of the AI model to use for generating chat completions. You can find available models at https://featherless.ai/models. |
| System Prompt | A system-level message that sets the behavior or persona of the assistant (e.g., "You are a helpful assistant..."). This helps guide the AI's responses. |
| Message | The actual user message or query to send to the chat model. |
| Temperature | Controls randomness in the output. Higher values (e.g., 0.9) make output more diverse; lower values make it more focused and deterministic. |
| Additional Fields | Optional parameters to fine-tune the generation: - Frequency Penalty: Penalizes new tokens based on their existing frequency (-2.0 to 2.0). - Max Tokens: Maximum number of tokens to generate. - Presence Penalty: Penalizes new tokens based on whether they appear in the text so far (-2.0 to 2.0). - Top P: Nucleus sampling parameter (alternative to temperature). |
Output
The node outputs an array of items where each item contains a json field with the following structure:
{
"response": "string"
}
response: The trimmed text content generated by the Featherless chat model in reply to the input message.
No binary data is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Featherless API.
- Makes HTTP POST requests to
https://api.featherless.ai/v1/chat/completions. - The node expects the Featherless API to return a JSON response containing a
choicesarray with message content.
Troubleshooting
- Missing or invalid API key: The node will throw an error if no valid API key is provided. Ensure your API key credential is correctly configured.
- Invalid response format: If the API response does not contain the expected message content, the node throws an error indicating an invalid response format. This could be due to API changes or network issues.
- Network errors or timeouts: Standard HTTP request failures may occur; verify network connectivity and API availability.
- Parameter validation: Make sure required fields like Model and Message are provided; missing these will cause errors.
If you want the node to continue processing other items after an error, enable the "Continue On Fail" option.
Links and References
- Featherless Models — Browse available AI models.
- Featherless API Documentation — Official API reference (assumed, check actual docs).
- n8n Documentation — For general node usage and credential setup.