aixxai 1.5.4 → 1.5.5
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/aixxai-1.5.4.tgz +0 -0
- package/package.json +1 -1
- package/src/commands/install.js +15 -0
package/aixxai-1.5.4.tgz
ADDED
|
Binary file
|
package/package.json
CHANGED
package/src/commands/install.js
CHANGED
|
@@ -355,9 +355,24 @@ export async function install(subArgs) {
|
|
|
355
355
|
console.log('\n╔══════════════════════════════════════════╗');
|
|
356
356
|
console.log('║ 🎉 安装完成! ║');
|
|
357
357
|
console.log('╚══════════════════════════════════════════╝\n');
|
|
358
|
+
printQuickStart(apiKey);
|
|
358
359
|
printInstallBroadcast();
|
|
359
360
|
}
|
|
360
361
|
|
|
362
|
+
/**
|
|
363
|
+
* 安装完成后的 QuickStart——给用户一段"复制就能跑"的代码。
|
|
364
|
+
* 目标:让新用户在30秒内成功调通第一个模型,建立正反馈。
|
|
365
|
+
*/
|
|
366
|
+
function printQuickStart(apiKey) {
|
|
367
|
+
const key = apiKey || '你的API_KEY';
|
|
368
|
+
console.log('⚡ 30秒验证(复制粘贴到终端跑一下):\n');
|
|
369
|
+
console.log('curl -s https://baodan.run/v1/chat/completions \\');
|
|
370
|
+
console.log(' -H "Authorization: Bearer ' + key + '" \\');
|
|
371
|
+
console.log(' -H "Content-Type: application/json" \\');
|
|
372
|
+
console.log(' -d \'{"model":"deepseek-chat","messages":[{"role":"user","content":"你好"}],"max_tokens":50}\'');
|
|
373
|
+
console.log('\n 跑通了你就会看到 AI 回复你"你好"。\n');
|
|
374
|
+
}
|
|
375
|
+
|
|
361
376
|
async function testConnectivity(apiKey) {
|
|
362
377
|
// 用 /v1/models(带key)测试真实可用性,而不是 /api/status(管理接口,域名下404)
|
|
363
378
|
const url = DEFAULT_BASE_URL + '/models';
|