Actions6
- Chat Actions
- Embedding Actions
- Image Actions
- Speech Recognition Actions
- Text to Speech Actions
Overview
This node integrates with the DeepInfra API to perform AI-powered chat completions. It allows users to send a sequence of messages with roles (system, user, assistant) to various supported language models and receive generated text completions in response. This is useful for building conversational agents, chatbots, or any application requiring natural language generation based on contextual dialogue.
Typical use cases include:
- Creating AI chatbots that respond to user queries.
- Generating assistant replies in multi-turn conversations.
- Automating customer support interactions.
- Experimenting with different large language models for text generation.
For example, you can send a user message asking for a summary of a document, and the node will return the model's generated summary as a completion.
Properties
| Name | Meaning |
|---|---|
| Model | The AI model to use for generating chat completions. Options include various DeepSeek, Google Gemini, Meta-Llama, and Mistral models. |
| Messages | A collection of messages forming the conversation history. Each message has: • Role: system, user, or assistant. • Content: the text content of the message. |
| Options | Additional parameters controlling generation behavior: • Maximum Tokens: max number of tokens to generate. • Temperature: randomness control (0–2). • Top P: nucleus sampling diversity (0–1). • Stream: whether to stream partial results back. |
Output
The output is a JSON object containing the full response from the DeepInfra chat completion API. This typically includes the generated text completion(s) from the selected model based on the input messages.
The structure of the json output field corresponds directly to the API response and contains fields such as the generated message content and metadata about the completion.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for the DeepInfra service to authenticate requests.
- Uses the official OpenAI-compatible client configured to communicate with DeepInfra’s API endpoint.
- No additional environment variables are required beyond the API key credential.
Troubleshooting
- Common issues:
- Invalid or missing API key will cause authentication errors.
- Providing an unsupported model name or invalid message format may result in API errors.
- Exceeding token limits or rate limits imposed by the API can cause failures.
- Error messages:
- Errors returned from the API are passed through; typical messages include authentication failures, invalid parameters, or quota exceeded.
- If the node is set to continue on fail, errors will be included in the output JSON under an
errorproperty.
- Resolution tips:
- Verify the API key is correctly configured and active.
- Ensure messages follow the required structure with valid roles and non-empty content.
- Adjust token limits and generation options to stay within allowed ranges.