File tree Expand file tree Collapse file tree 5 files changed +9
-11
lines changed
templates/types/streaming/fastapi/app/services Expand file tree Collapse file tree 5 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,6 @@ export async function runCreateLlama({
90
90
...dataSourceArgs ,
91
91
"--vector-db" ,
92
92
vectorDb ,
93
- "--open-ai-key" ,
94
- process . env . OPENAI_API_KEY ,
95
93
"--use-pnpm" ,
96
94
"--port" ,
97
95
port ,
@@ -103,8 +101,6 @@ export async function runCreateLlama({
103
101
tools ?? "none" ,
104
102
"--observability" ,
105
103
"none" ,
106
- "--llama-cloud-key" ,
107
- process . env . LLAMA_CLOUD_API_KEY ,
108
104
] ;
109
105
110
106
if ( templateUI ) {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import ora from "ora";
3
3
import { red } from "picocolors" ;
4
4
import prompts from "prompts" ;
5
5
import { ModelConfigParams , ModelConfigQuestionsParams } from "." ;
6
+ import { isCI } from "../../questions" ;
6
7
import { questionHandlers } from "../../questions/utils" ;
7
8
8
9
const OPENAI_API_URL = "https://api.openai.com/v1" ;
@@ -30,7 +31,7 @@ export async function askOpenAIQuestions({
30
31
} ,
31
32
} ;
32
33
33
- if ( ! config . apiKey ) {
34
+ if ( ! config . apiKey && ! isCI ) {
34
35
const { key } = await prompts (
35
36
{
36
37
type : "text" ,
Original file line number Diff line number Diff line change @@ -4,10 +4,12 @@ import { askProQuestions } from "./questions";
4
4
import { askSimpleQuestions } from "./simple" ;
5
5
import { QuestionArgs , QuestionResults } from "./types" ;
6
6
7
+ export const isCI = ciInfo . isCI || process . env . PLAYWRIGHT_TEST === "1" ;
8
+
7
9
export const askQuestions = async (
8
10
args : QuestionArgs ,
9
11
) : Promise < QuestionResults > => {
10
- if ( ciInfo . isCI || process . env . PLAYWRIGHT_TEST === "1" ) {
12
+ if ( isCI ) {
11
13
return await getCIQuestionResults ( args ) ;
12
14
} else if ( args . pro ) {
13
15
// TODO: refactor pro questions to return a result object
Original file line number Diff line number Diff line change 1
1
import { blue , green } from "picocolors" ;
2
2
import prompts from "prompts" ;
3
+ import { isCI } from "." ;
3
4
import { COMMUNITY_OWNER , COMMUNITY_REPO } from "../helpers/constant" ;
4
5
import { EXAMPLE_FILE } from "../helpers/datasources" ;
5
6
import { getAvailableLlamapackOptions } from "../helpers/llama-pack" ;
@@ -386,7 +387,7 @@ export const askProQuestions = async (program: QuestionArgs) => {
386
387
387
388
// Ask for LlamaCloud API key when using a LlamaCloud index or LlamaParse
388
389
if ( isUsingLlamaCloud || program . useLlamaParse ) {
389
- if ( ! program . llamaCloudKey ) {
390
+ if ( ! program . llamaCloudKey && ! isCI ) {
390
391
// if already set, don't ask again
391
392
// Ask for LlamaCloud API key
392
393
const { llamaCloudKey } = await prompts (
Original file line number Diff line number Diff line change @@ -242,13 +242,11 @@ def _add_file_to_llama_cloud_index(
242
242
except ImportError as e :
243
243
raise ValueError ("LlamaCloudFileService is not found" ) from e
244
244
245
- project_id = index ._get_project_id ()
246
- pipeline_id = index ._get_pipeline_id ()
247
245
# LlamaCloudIndex is a managed index so we can directly use the files
248
246
upload_file = (file_name , BytesIO (file_data ))
249
247
doc_id = LLamaCloudFileService .add_file_to_pipeline (
250
- project_id ,
251
- pipeline_id ,
248
+ index . project . id ,
249
+ index . pipeline . id ,
252
250
upload_file ,
253
251
custom_metadata = {},
254
252
)
You can’t perform that action at this time.
0 commit comments