galaxy-opc 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.mjs +15 -9
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -469,15 +469,21 @@ async function cmdSetup() {
|
|
|
469
469
|
console.log(dim(" 已跳过 OAuth 登录,可稍后执行:openclaw models auth login --provider qwen-portal"));
|
|
470
470
|
}
|
|
471
471
|
} else {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
472
|
+
printQwenCodingPlanGuide();
|
|
473
|
+
const hasKey = await askYesNo(" 你已经拿到 DashScope API Key 了吗?", false);
|
|
474
|
+
if (!hasKey) {
|
|
475
|
+
console.log(dim(" 已跳过 API Key 输入,稍后可运行 npx galaxy-opc setup 继续配置。"));
|
|
476
|
+
} else {
|
|
477
|
+
const key = await ask("\n 请输入 DashScope API Key (sk-...): ");
|
|
478
|
+
if (key) {
|
|
479
|
+
newEnv["DASHSCOPE_API_KEY"] = key;
|
|
480
|
+
defaultModel = "dashscope/qwen-plus";
|
|
481
|
+
newConfig = deepMerge(newConfig, {
|
|
482
|
+
models: { providers: { dashscope: { baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1", apiKey: key, api: "openai-completions", models: [{ id: "qwen-plus", name: "Qwen Plus", contextWindow: 128000, maxTokens: 8192 }] } } },
|
|
483
|
+
agents: { defaults: { model: { primary: "dashscope/qwen-plus" } } },
|
|
484
|
+
});
|
|
485
|
+
console.log(green(" ✓ 已保存"));
|
|
486
|
+
}
|
|
481
487
|
}
|
|
482
488
|
}
|
|
483
489
|
} else if (cnIdx === 1) {
|