Update OPENAI_KEY to use as a fallback

This commit is contained in:
iamshabell
2023-02-14 12:09:19 +03:00
parent 574f0c335c
commit 4acdba11f2

View File

@@ -5,7 +5,7 @@ import { execSync } from "child_process";
import inquirer from "inquirer";
import fetch from "node-fetch";
let OPENAI_KEY = process.env.OPENAI_KEY;
let OPENAI_KEY = process.env.OPENAI_KEY ?? process.env.OPENAI_API_KEY;
export async function main() {
console.log(chalk.white("▲ ") + chalk.green("Welcome to AICommits!"));