File tree 6 files changed +14
-10
lines changed
components/vectordbs/typescript/llamacloud
6 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 86
86
python-version : ["3.11"]
87
87
os : [macos-latest, windows-latest, ubuntu-22.04]
88
88
frameworks : ["nextjs", "express"]
89
- datasources : ["--no-files", "--example-file"]
89
+ datasources : ["--no-files", "--example-file", "--llamacloud" ]
90
90
defaults :
91
91
run :
92
92
shell : bash
Original file line number Diff line number Diff line change 2
2
import { expect , test } from "@playwright/test" ;
3
3
import { ChildProcess } from "child_process" ;
4
4
import fs from "fs" ;
5
+ import crypto from "node:crypto" ;
5
6
import path from "path" ;
6
7
import type {
7
8
TemplateFramework ,
@@ -19,9 +20,6 @@ const dataSource: string = process.env.DATASOURCE
19
20
const templateUI : TemplateUI = "shadcn" ;
20
21
const templatePostInstallAction : TemplatePostInstallAction = "runApp" ;
21
22
22
- const llamaCloudProjectName = "create-llama" ;
23
- const llamaCloudIndexName = "e2e-test" ;
24
-
25
23
const appType : AppType = templateFramework === "nextjs" ? "" : "--frontend" ;
26
24
const userMessage =
27
25
dataSource !== "--no-files" ? "Physical standard for letters" : "Hello" ;
@@ -43,9 +41,12 @@ test.describe(`Test streaming template ${templateFramework} ${dataSource} ${temp
43
41
const vectorDb = "none" ;
44
42
45
43
test . beforeAll ( async ( ) => {
44
+ const testId = crypto . randomUUID ( ) ;
45
+ const llamaCloudProjectName = `create-llama` ;
46
+ const llamaCloudIndexName = `e2e-test-${ testId } ` ;
46
47
port = Math . floor ( Math . random ( ) * 10000 ) + 10000 ;
47
48
externalPort = port + 1 ;
48
- cwd = await createTestDir ( ) ;
49
+ cwd = await createTestDir ( testId ) ;
49
50
const result = await runCreateLlama ( {
50
51
cwd,
51
52
templateType : "streaming" ,
Original file line number Diff line number Diff line change @@ -160,8 +160,11 @@ export async function runCreateLlama({
160
160
} ;
161
161
}
162
162
163
- export async function createTestDir ( ) {
164
- const cwd = path . join ( __dirname , "cache" , crypto . randomUUID ( ) ) ;
163
+ export async function createTestDir ( testId ?: string ) {
164
+ if ( ! testId ) {
165
+ testId = crypto . randomUUID ( ) ;
166
+ }
167
+ const cwd = path . join ( __dirname , "cache" , testId ) ;
165
168
await mkdir ( cwd , { recursive : true } ) ;
166
169
return cwd ;
167
170
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ async function* walk(dir: string): AsyncGenerator<string> {
26
26
async function loadAndIndex ( ) {
27
27
const index = await getDataSource ( ) ;
28
28
// ensure the index is available or create a new one
29
- await index . ensureIndex ( ) ;
29
+ await index . ensureIndex ( { verbose : true } ) ;
30
30
const projectId = await index . getProjectId ( ) ;
31
31
const pipelineId = await index . getPipelineId ( ) ;
32
32
Original file line number Diff line number Diff line change 21
21
"dotenv" : " ^16.3.1" ,
22
22
"duck-duck-scrape" : " ^2.2.5" ,
23
23
"express" : " ^4.18.2" ,
24
- "llamaindex" : " 0.6.21 " ,
24
+ "llamaindex" : " 0.6.22 " ,
25
25
"pdf2json" : " 3.0.5" ,
26
26
"ajv" : " ^8.12.0" ,
27
27
"@e2b/code-interpreter" : " 0.0.9-beta.3" ,
Original file line number Diff line number Diff line change 27
27
"duck-duck-scrape" : " ^2.2.5" ,
28
28
"formdata-node" : " ^6.0.3" ,
29
29
"got" : " ^14.4.1" ,
30
- "llamaindex" : " 0.6.21 " ,
30
+ "llamaindex" : " 0.6.22 " ,
31
31
"lucide-react" : " ^0.294.0" ,
32
32
"next" : " ^14.2.4" ,
33
33
"react" : " ^18.2.0" ,
You can’t perform that action at this time.
0 commit comments