openai-text-completions
Advanced tools
Comparing version
16
index.js
@@ -29,2 +29,11 @@ #!/usr/bin/env node | ||
// Function for checking if the API key has been set | ||
function checkAPIKey() { | ||
if (apiKey === 'YOUR_API_KEY') { | ||
console.error('API key has not been set. Use the "key" command to set the API key.'); | ||
} else { | ||
console.log('API key is set.'); | ||
} | ||
} | ||
// Set up command-line interface using Commander.js | ||
@@ -44,2 +53,7 @@ program | ||
}) | ||
.parse(process.argv); | ||
.parse(process.argv); | ||
program | ||
.command('check-key') | ||
.description('Check if the API key has been set') | ||
.action(checkAPIKey); |
{ | ||
"name": "openai-text-completions", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A global npm package for generating text completions using the OpenAI API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
2678
10.8%50
35.14%41
5.13%