SiliconFlow icon

SiliconFlow

Interact with SiliconFlow AI models

Actions4

Chat → Complete

AI-generated

Overview

This node interacts with SiliconFlow AI models to generate chat completions. It is designed to create conversational AI responses based on input messages or a simple prompt. This is useful for building chatbots, virtual assistants, or any application requiring AI-generated conversational text. Users can specify the model, input messages or prompt, and various parameters to control the response generation.

Use Case Examples

  1. Generating a customer support chatbot response based on user messages.
  2. Creating an AI assistant that responds to user queries with detailed or simple text outputs.
  3. Using different models to experiment with response styles and capabilities.

Properties

Name Meaning
Model The AI model used to generate the chat completion. Supports models that can handle tool calls.
Messages A collection of messages forming the conversation history. Each message has a role (system, user, assistant) and content. Used as input for the chat completion.
Prompt A simple prompt text alternative to providing multiple messages. Used as a single user message if messages are not provided.
Output Mode Determines the format of the output. 'Simple' returns only the message content as a string, while 'Detailed' returns a structured object including message content, usage statistics, and metadata.
Additional Fields Optional parameters to customize the chat completion generation, including max tokens, temperature, top_p, top_k, min_p, frequency penalty, number of generations, thinking mode, thinking budget, stop sequences, streaming option, and response format.

Output

JSON

  • message - The generated message content from the AI model.
  • model - The model identifier used for generating the completion.
  • finishReason - Reason why the generation finished (e.g., stop sequence, max tokens).
  • usage - Token usage statistics for the request.
  • reasoning - Optional reasoning content if provided by the model.
  • toolCalls - Optional tool call metadata if the model used tools.
  • _rawResponse - The full raw response from the API for debugging or extended use.

Dependencies

  • Requires an API key credential for SiliconFlow API access.
  • Uses HTTP POST requests to the SiliconFlow API endpoint for chat completions.

Troubleshooting

  • Error if neither messages nor prompt is provided: Ensure at least one of these inputs is set.
  • API errors may occur if the model ID is invalid or the API key is incorrect.
  • Streaming option requires proper handling of Server-Sent Events in the client.
  • Stop sequences must be comma-separated strings; invalid formats may cause errors.

Discussion