Chat Model
AI-generatedOverview
This node interacts with the Novita AI API to perform chat completions using a specified language model. It sends a user message along with an optional system prompt to the chat model and returns the model's response. This node is useful for scenarios where conversational AI or chatbot functionality is needed, such as customer support automation, virtual assistants, or interactive content generation.
Use Case Examples
- A user inputs a question or statement, and the node returns a relevant AI-generated response.
- A system prompt is set to define the assistant's behavior, and the node generates replies consistent with that behavior.
Properties
| Name | Meaning |
|---|---|
| Model Name or ID | The identifier of the AI model to use for generating chat completions. Can be selected from a list or specified via expression. |
| System Prompt | An optional system message to set the behavior or context of the assistant. |
| Message | The user message to send to the chat model for generating a response. |
| Temperature | Sampling temperature to control the randomness of the output. Higher values produce more creative responses. |
| Additional Fields | Optional parameters to fine-tune the chat completion such as frequency penalty, max tokens, presence penalty, and top_p. |
Output
JSON
response- The text response generated by the chat model based on the input message and optional system prompt.
Dependencies
- Novita AI API key credential
Troubleshooting
- Ensure a valid API key is provided; otherwise, the node will throw an error indicating no valid API key.
- If the API response format is invalid or missing expected fields, the node will throw an error about invalid response format.
- Network or API errors during the request will cause the node to fail unless 'Continue On Fail' is enabled, in which case errors are returned in the output.
Links
- Novita AI Chat Completions API - Official API endpoint used by the node to send chat messages and receive completions.