Skip to content
Snippets Groups Projects
Commit de88b322 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix: remove llamacloud for extractor

parent ef88bff2
No related branches found
No related tags found
No related merge requests found
...@@ -34,8 +34,10 @@ export const askSimpleQuestions = async ( ...@@ -34,8 +34,10 @@ export const askSimpleQuestions = async (
); );
let language: TemplateFramework = "fastapi"; let language: TemplateFramework = "fastapi";
let llamaCloudKey = args.llamaCloudKey;
let useLlamaCloud = false;
if (appType !== "extractor") { if (appType !== "extractor") {
const res = await prompts( const { language: newLanguage } = await prompts(
{ {
type: "select", type: "select",
name: "language", name: "language",
...@@ -47,35 +49,35 @@ export const askSimpleQuestions = async ( ...@@ -47,35 +49,35 @@ export const askSimpleQuestions = async (
}, },
questionHandlers, questionHandlers,
); );
language = res.language; language = newLanguage;
}
const { useLlamaCloud } = await prompts( const { useLlamaCloud: newUseLlamaCloud } = await prompts(
{
type: "toggle",
name: "useLlamaCloud",
message: "Do you want to use LlamaCloud services?",
initial: false,
active: "Yes",
inactive: "No",
hint: "see https://www.llamaindex.ai/enterprise for more info",
},
questionHandlers,
);
let llamaCloudKey = args.llamaCloudKey;
if (useLlamaCloud && !llamaCloudKey) {
// Ask for LlamaCloud API key, if not set
const { llamaCloudKey: newLlamaCloudKey } = await prompts(
{ {
type: "text", type: "toggle",
name: "llamaCloudKey", name: "useLlamaCloud",
message: message: "Do you want to use LlamaCloud services?",
"Please provide your LlamaCloud API key (leave blank to skip):", initial: false,
active: "Yes",
inactive: "No",
hint: "see https://www.llamaindex.ai/enterprise for more info",
}, },
questionHandlers, questionHandlers,
); );
llamaCloudKey = newLlamaCloudKey || process.env.LLAMA_CLOUD_API_KEY; useLlamaCloud = newUseLlamaCloud;
if (useLlamaCloud && !llamaCloudKey) {
// Ask for LlamaCloud API key, if not set
const { llamaCloudKey: newLlamaCloudKey } = await prompts(
{
type: "text",
name: "llamaCloudKey",
message:
"Please provide your LlamaCloud API key (leave blank to skip):",
},
questionHandlers,
);
llamaCloudKey = newLlamaCloudKey || process.env.LLAMA_CLOUD_API_KEY;
}
} }
const modelConfig = await askModelConfig({ const modelConfig = await askModelConfig({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment