voyageai-cli 1.23.0 → 1.23.1
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/package.json +1 -1
- package/src/commands/ping.js +2 -2
- package/src/lib/api.js +6 -8
package/package.json
CHANGED
package/src/commands/ping.js
CHANGED
package/src/lib/api.js
CHANGED
|
@@ -36,14 +36,12 @@ function requireApiKey() {
|
|
|
36
36
|
const { getConfigValue } = require('./config');
|
|
37
37
|
const key = process.env.VOYAGE_API_KEY || getConfigValue('apiKey');
|
|
38
38
|
if (!key) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
console.error(' or Voyage AI platform → Dashboard → API Keys');
|
|
46
|
-
process.exit(1);
|
|
39
|
+
const msg = 'VOYAGE_API_KEY is not set.\n\n' +
|
|
40
|
+
'Option 1: export VOYAGE_API_KEY="your-key-here"\n' +
|
|
41
|
+
'Option 2: vai config set api-key <your-key>\n\n' +
|
|
42
|
+
'Get one from MongoDB Atlas > AI Models > Create model API key\n' +
|
|
43
|
+
' or Voyage AI platform > Dashboard > API Keys';
|
|
44
|
+
throw new Error(msg);
|
|
47
45
|
}
|
|
48
46
|
return key;
|
|
49
47
|
}
|