← 返回 Skills 市场
mattheliu

ernie-integration

作者 Mattheliu · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ⚠ suspicious
287
总下载
0
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install ernie-integration
功能描述
Step-by-step guide for integrating Baidu ERNIE 5.0 (Qianfan) models into Clawdbot. Use when someone asks how to add ERNIE models, configure Baidu Qianfan, or...
使用说明 (SKILL.md)

ERNIE Model Integration

Complete guide for adding Baidu ERNIE 5.0 (Qianfan) models to Clawdbot.

Overview

ERNIE 5.0 is Baidu's latest large language model with deep thinking capabilities:

  • ERNIE 5.0 (ernie-5.0-thinking-preview) - Advanced reasoning model with 128K context window via OpenAI-compatible API

Prerequisites

  • Clawdbot installed and configured
  • API key from Baidu Qianfan platform (see Getting API Key section)

Getting API Key

Baidu Qianfan Platform

  1. Visit https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application
  2. Register a Baidu Cloud account if you don't have one
  3. Navigate to the API Keys section
  4. Create a new API key
  5. Copy the key (format: bce-v3/ALTAK-...)

Note: The API key uses Baidu's BCE authentication format.

Integration Steps

Step 1: Set environment variable

Add to ~/.bashrc or ~/.zshrc for persistence:

export ERNIE_API_KEY="bce-v3/ALTAK-your-key-here"
source ~/.zshrc  # or source ~/.bashrc

Security note: Never commit API keys to version control. Rotate keys regularly on the Qianfan console.

Step 2: Add provider configuration

Edit your clawdbot.json config:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "ernie/ernie-5.0-thinking-preview"
      },
      "models": {
        "ernie/ernie-5.0-thinking-preview": {
          "alias": "ernie-5.0"
        }
      }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "ernie": {
        "baseUrl": "https://qianfan.baidubce.com/v2",
        "apiKey": "${ERNIE_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "ernie-5.0-thinking-preview",
            "name": "ERNIE 5.0",
            "contextWindow": 128000,
            "maxTokens": 65536
          }
        ]
      }
    }
  }
}

Step 3: Restart Clawdbot

clawdbot gateway restart

Step 4: Verify integration

clawdbot models list

You should see ERNIE models in the list.

Step 5: Use the model

Set as default:

clawdbot models set ernie/ernie-5.0-thinking-preview

Or use model alias in chat:

/model ernie-5.0

Model Parameters

ERNIE 5.0 Specifications

Parameter Value
Model ID ernie-5.0-thinking-preview
Context Window 128K tokens
Max Input 119K tokens
Max Output 1 - 65536 tokens
RPM (Rate Per Minute) 60
TPM (Tokens Per Minute) 150,000

Supported Request Parameters

Parameter Type Description
model string Model ID (required)
messages array Chat context messages (required)
stream boolean Enable streaming response
temperature number Output randomness (model-specific range)
top_p number Nucleus sampling parameter
max_tokens integer Maximum output tokens
stop array Stop sequences (up to 4 elements)
frequency_penalty number Frequency-based repetition penalty
presence_penalty number Presence-based repetition penalty

Thinking Mode Parameters

ERNIE 5.0 supports deep thinking mode:

Parameter Type Description
enable_thinking boolean Enable thinking mode
thinking_budget integer Max thinking chain tokens (default: 16384)
thinking_strategy string short_think or chain_of_draft
reasoning_effort string low, medium (default), or high

Troubleshooting

Model not appearing in list

Check config syntax:

clawdbot gateway config.get | grep -A 20 ernie

Verify API key is set:

echo $ERNIE_API_KEY

Authentication errors

  • Verify API key format is bce-v3/ALTAK-...
  • Check key is valid on Qianfan console
  • Ensure correct base URL: https://qianfan.baidubce.com/v2

Connection issues

Test API endpoint directly:

curl -X POST "https://qianfan.baidubce.com/v2/chat/completions" \
  -H "Authorization: Bearer $ERNIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ernie-5.0-thinking-preview", "messages": [{"role": "user", "content": "test"}]}'

Rate limit errors

ERNIE 5.0 has the following rate limits:

  • RPM: 60 requests per minute
  • TPM: 150,000 tokens per minute

If you hit rate limits, reduce request frequency or apply for higher quotas on Qianfan console.

Model Recommendations

  • ERNIE 5.0 (ernie/ernie-5.0-thinking-preview) - Best for complex reasoning tasks, deep analysis, and tasks requiring extensive thinking

References

安全使用建议
This is an instruction-only integration guide that appears legitimate for adding Baidu ERNIE to Clawdbot, but note a metadata mismatch: the SKILL.md tells you to create and export ERNIE_API_KEY, while the skill's registry metadata lists no required environment variables. Before installing or following automated install steps: (1) treat ERNIE_API_KEY as a sensitive secret—do not commit it to version control and prefer a secrets manager over plain ~/.bashrc when possible; (2) verify the baseUrl (https://qianfan.baidubce.com/v2) and the official Baidu docs/console links yourself; (3) confirm how Clawdbot stores the apiKey in clawdbot.json so it isn't logged or exposed; (4) ask the skill author or registry maintainer to update the skill metadata to declare ERNIE_API_KEY as a required credential so automated reviewers and users see the dependency; and (5) rotate the key if you test it in shared/suspect environments. This looks like sloppy metadata rather than malicious behavior, but the omission reduces transparency—proceed carefully.
功能分析
Type: OpenClaw Skill Name: ernie-integration Version: 1.0.4 The skill bundle is a legitimate integration guide for Baidu ERNIE 5.0 (Qianfan) models. It contains standard documentation, configuration examples for 'clawdbot.json', and transparent 'curl' commands for API testing using official Baidu endpoints (qianfan.baidubce.com). No malicious code, data exfiltration, or harmful prompt injection attempts were identified in SKILL.md, README.md, or the configuration examples.
能力评估
Purpose & Capability
The skill's name/description (ERNIE integration) matches the runtime instructions (how to add ERNIE, editing clawdbot.json, example requests). However the declared metadata lists no required environment variables or primary credential while the instructions explicitly require ERNIE_API_KEY (Baidu BCE API key). That discrepancy is incoherent and may mislead automated checks or users.
Instruction Scope
SKILL.md stays within the stated purpose: it explains how to obtain a Baidu Qianfan API key, set ERNIE_API_KEY in shell rc, add provider config to clawdbot.json, restart the gateway, and test the endpoint. It only references config files and shell environment variables directly relevant to integration and does not request unrelated system files or other credentials.
Install Mechanism
There is no install specification and no code is written to disk by the skill itself (instruction-only). This is the lowest-risk install mechanism; nothing is downloaded or executed by the skill package.
Credentials
The instructions require a Baidu Qianfan API key (ERNIE_API_KEY) which is an appropriate and necessary secret for the stated purpose. However the skill metadata does not declare this required environment variable or a primary credential. That omission reduces transparency and could cause automation or reviewers to miss that a secret will be used. The number and scope of environment variables in the instructions are otherwise proportional (only the single service API key).
Persistence & Privilege
The skill does not request always:true and does not claim any special persistent privileges. It does not modify other skills' configurations and only instructs users to update their own clawdbot.json and shell rc files (normal for integration guides).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ernie-integration
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ernie-integration 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
- Updated security note in the environment variable section to clarify API key handling: never commit API keys to version control and rotate keys regularly. - No other changes detected.
v1.0.3
- Improved security guidance: clarified that API keys should never be committed to version control and should be rotated regularly. - No functional changes to usage or integration steps.
v1.0.2
- Added a security note advising against storing API keys in plaintext config files and recommending environment variables and regular key rotation. - Clarified instruction to add the environment variable in `.bashrc` or `.zshrc` for persistence. - No other major changes to integration steps or configuration.
v1.0.1
- Removed the local settings file: .claude/settings.local.json. - No changes to user-facing documentation or integration steps. - This update improves repository cleanliness by removing unnecessary local configuration.
v1.0.0
ERNIE integration guide for Clawdbot—initial release: - Provides a detailed, step-by-step guide to integrating Baidu ERNIE 5.0 models via Qianfan API into Clawdbot. - Includes instructions for obtaining and configuring the required API key. - Documents sample configuration, environment setup, and troubleshooting steps. - Lists model parameters, usage examples, rate limits, and integration verification steps.
元数据
Slug ernie-integration
版本 1.0.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

ernie-integration 是什么?

Step-by-step guide for integrating Baidu ERNIE 5.0 (Qianfan) models into Clawdbot. Use when someone asks how to add ERNIE models, configure Baidu Qianfan, or... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 287 次。

如何安装 ernie-integration?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ernie-integration」即可一键安装,无需额外配置。

ernie-integration 是免费的吗?

是的,ernie-integration 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ernie-integration 支持哪些平台?

ernie-integration 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ernie-integration?

由 Mattheliu(@mattheliu)开发并维护,当前版本 v1.0.4。

💬 留言讨论