Compare commits

...

1 Commits

Author SHA1 Message Date
leehuwuj c486ed2380 move up openai api key question 2024-03-12 11:30:20 +07:00
2 changed files with 18 additions and 13 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"create-llama": patch
---
Move up OpenAI API key question
+13 -13
View File
@@ -429,6 +429,19 @@ export const askQuestions = async (
}
}
if (!program.openAiKey) {
const { key } = await prompts(
{
type: "text",
name: "key",
message: "Please provide your OpenAI API key (leave blank to skip):",
},
handlers,
);
program.openAiKey = key;
preferences.openAiKey = key;
}
if (!program.model) {
if (ciInfo.isCI) {
program.model = getPrefOrDefault("model");
@@ -705,19 +718,6 @@ export const askQuestions = async (
}
}
if (!program.openAiKey) {
const { key } = await prompts(
{
type: "text",
name: "key",
message: "Please provide your OpenAI API key (leave blank to skip):",
},
handlers,
);
program.openAiKey = key;
preferences.openAiKey = key;
}
if (program.framework !== "fastapi" && program.eslint === undefined) {
if (ciInfo.isCI) {
program.eslint = getPrefOrDefault("eslint");