Actions24
- Agent Actions
- Chat Actions
- File Actions
- Image Actions
- Model Actions
- Prompt Actions
- RAG Actions
- TTS Actions
- User Actions
- Video Actions
Chat → Completion V2
AI-generatedOverview
This node performs chat completions using the Straico API's v2 chat completion endpoint. It is designed to handle conversational AI scenarios where previous chat messages and new messages are combined to generate a response from a selected language model. This is useful for building chatbots, virtual assistants, or any application requiring multi-turn conversational AI.
Use Case Examples
- A customer support chatbot that maintains context by including previous messages and appends new user queries to generate relevant responses.
- An interactive assistant that uses multiple models or a smart LLM selector to optimize response quality or cost based on user preferences.
Properties
| Name | Meaning |
|---|---|
| Model Names or IDs | Select one or more models for chat completion. Leave empty to use the smart LLM selector for automatic model selection. |
| Previous Messages | An array of message objects from previous chat completions to maintain conversation context. Typically dragged and dropped from previous node outputs. |
| New Messages | New messages to add to the chat completion, appended after previous messages. Each message includes a role (user or assistant) and content items (text or image URLs). |
| Smart LLM Selector | Optional collection to specify pricing strategy for automatic model selection when no explicit models are provided. |
| Additional Fields | Optional parameters to control generation such as temperature (creativity), max tokens (response length), and whether to replace failed models with similar ones. |
Output
JSON
id- Identifier of the chat completion response.message- The generated chat completion message content.model- The model used for generating the chat completion.usage- Token usage statistics for the completion.created_at- Timestamp when the completion was created.
Dependencies
- Straico API key credential for authentication
Troubleshooting
- Ensure either 'Model Names or IDs' or 'Smart LLM Selector' is provided, but not both simultaneously, to avoid configuration errors.
- Verify the format of 'Previous Messages' input; it must be a valid JSON array of message objects with roles and content.
- If no messages are provided (neither previous nor new), the node will throw an error indicating that at least one message is required.
- Check API authentication credentials if requests fail due to authorization errors.