LLMs
ChatBaiduWenxin
The ChatBaiduWenxin node is a wrapper around the Baidu Wenxin Chat Endpoints, providing integration with Baidu’s ERNIE-Bot language model.
Node Details
- Name: ChatBaiduWenxin
- Type: ChatBaiduWenxin
- Version: 1.0
- Category: Chat Models
Base Classes
- ChatBaiduWenxin
- Additional base classes from the ChatBaiduWenxin import
Parameters
Credential (Required)
Parameters
Credential (Required)
- Type: baiduApi
- Required Parameters:
- baiduApiKey
- baiduSecretKey
Inputs
Inputs
-
Cache (optional)
- Type: BaseCache
- Description: Caching mechanism for storing and retrieving previous responses
-
Model
- Type: string
- Default: ERNIE-Bot-turbo
- Description: The specific ERNIE model to use (e.g., ERNIE-Bot-turbo)
-
Temperature (optional)
- Type: number
- Default: 0.9
- Range: 0 to 1 (step: 0.1)
- Description: Controls the randomness of the output. Higher values make the output more random, while lower values make it more deterministic.
Functionality
The node initializes a ChatBaiduWenxin instance with the provided parameters:
- Uses the baiduApiKey and baiduSecretKey for authentication
- Sets the specified model name
- Applies the given temperature for response generation
- Enables streaming by default
- Utilizes the provided cache if specified
Usage
This node can be used in various natural language processing tasks, such as:
- Chatbots and conversational AI
- Text generation and completion
- Language translation (particularly for Chinese-English pairs)
- Question answering systems
Output
The node returns an initialized ChatBaiduWenxin model instance, which can be used in subsequent nodes for generating responses or processing text.
Notes
- Ensure you have valid Baidu API credentials before using this node
- The performance and capabilities of the model may vary depending on the chosen model name and parameters
- Be mindful of rate limits and usage quotas associated with your Baidu API account