sharween commited on
Commit
06df3d2
·
verified ·
1 Parent(s): f64dbae

Update start-openclaw.sh

Browse files
Files changed (1) hide show
  1. start-openclaw.sh +36 -1
start-openclaw.sh CHANGED
@@ -94,7 +94,42 @@ else
94
 
95
  # 先清理旧残留(防止残留导致问题)
96
  rm -rf "${WEIXIN_DIR}" 2>/dev/null || true
97
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  # 执行完整安装
99
  npx -y @tencent-weixin/openclaw-weixin-cli@latest install
100
  fi
 
94
 
95
  # 先清理旧残留(防止残留导致问题)
96
  rm -rf "${WEIXIN_DIR}" 2>/dev/null || true
97
+
98
+ # 4. 生成配置文件
99
+ cat > /root/.openclaw/openclaw.json <<EOF
100
+ {
101
+ "models": {
102
+ "providers": {
103
+ "nvidia": {
104
+ "baseUrl": "$CLEAN_BASE",
105
+ "apiKey": "$OPENAI_API_KEY",
106
+ "api": "openai-completions",
107
+ "models": [
108
+ { "id": "$MODEL", "name": "$MODEL", "contextWindow": 128000 }
109
+ ]
110
+ }
111
+ }
112
+ },
113
+ "agents": { "defaults": { "model": { "primary": "nvidia/$MODEL" } } },
114
+ "commands": {
115
+ "restart": true
116
+ },
117
+ "gateway": {
118
+ "mode": "local",
119
+ "bind": "lan",
120
+ "port": $PORT,
121
+ "trustedProxies": ["0.0.0.0/0"],
122
+ "auth": { "mode": "token", "token": "$OPENCLAW_GATEWAY_PASSWORD" },
123
+ "controlUi": {
124
+ "enabled": true,
125
+ "allowInsecureAuth": true,
126
+ "dangerouslyDisableDeviceAuth": true,
127
+ "dangerouslyAllowHostHeaderOriginFallback": true
128
+ },
129
+ }
130
+ }
131
+ EOF
132
+
133
  # 执行完整安装
134
  npx -y @tencent-weixin/openclaw-weixin-cli@latest install
135
  fi