File tree 1 file changed +23
-23
lines changed
1 file changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -74,34 +74,34 @@ export const askSimpleQuestions = async (
74
74
questionHandlers ,
75
75
) ;
76
76
language = newLanguage ;
77
+ }
78
+
79
+ const { useLlamaCloud : newUseLlamaCloud } = await prompts (
80
+ {
81
+ type : "toggle" ,
82
+ name : "useLlamaCloud" ,
83
+ message : "Do you want to use LlamaCloud services?" ,
84
+ initial : false ,
85
+ active : "Yes" ,
86
+ inactive : "No" ,
87
+ hint : "see https://www.llamaindex.ai/enterprise for more info" ,
88
+ } ,
89
+ questionHandlers ,
90
+ ) ;
91
+ useLlamaCloud = newUseLlamaCloud ;
77
92
78
- const { useLlamaCloud : newUseLlamaCloud } = await prompts (
93
+ if ( useLlamaCloud && ! llamaCloudKey ) {
94
+ // Ask for LlamaCloud API key, if not set
95
+ const { llamaCloudKey : newLlamaCloudKey } = await prompts (
79
96
{
80
- type : "toggle" ,
81
- name : "useLlamaCloud" ,
82
- message : "Do you want to use LlamaCloud services?" ,
83
- initial : false ,
84
- active : "Yes" ,
85
- inactive : "No" ,
86
- hint : "see https://www.llamaindex.ai/enterprise for more info" ,
97
+ type : "text" ,
98
+ name : "llamaCloudKey" ,
99
+ message :
100
+ "Please provide your LlamaCloud API key (leave blank to skip):" ,
87
101
} ,
88
102
questionHandlers ,
89
103
) ;
90
- useLlamaCloud = newUseLlamaCloud ;
91
-
92
- if ( useLlamaCloud && ! llamaCloudKey ) {
93
- // Ask for LlamaCloud API key, if not set
94
- const { llamaCloudKey : newLlamaCloudKey } = await prompts (
95
- {
96
- type : "text" ,
97
- name : "llamaCloudKey" ,
98
- message :
99
- "Please provide your LlamaCloud API key (leave blank to skip):" ,
100
- } ,
101
- questionHandlers ,
102
- ) ;
103
- llamaCloudKey = newLlamaCloudKey || process . env . LLAMA_CLOUD_API_KEY ;
104
- }
104
+ llamaCloudKey = newLlamaCloudKey || process . env . LLAMA_CLOUD_API_KEY ;
105
105
}
106
106
107
107
const results = await convertAnswers ( args , {
You can’t perform that action at this time.
0 commit comments