File tree 5 files changed +19
-4
lines changed
components/vectordbs/typescript/astra
5 files changed +19
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " create-llama " : patch
3
+ ---
4
+
5
+ fix: missing params when init Astra vectorstore
Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ async function loadAndIndex() {
14
14
15
15
// create vector store and a collection
16
16
const collectionName = process . env . ASTRA_DB_COLLECTION ! ;
17
- const vectorStore = new AstraDBVectorStore ( ) ;
17
+ const vectorStore = new AstraDBVectorStore ( {
18
+ params : {
19
+ endpoint : process . env . ASTRA_DB_ENDPOINT ! ,
20
+ token : process . env . ASTRA_DB_APPLICATION_TOKEN ! ,
21
+ } ,
22
+ } ) ;
18
23
await vectorStore . createAndConnect ( collectionName , {
19
24
vector : {
20
25
dimension : parseInt ( process . env . EMBEDDING_DIM ! ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ import { checkRequiredEnvVars } from "./shared";
5
5
6
6
export async function getDataSource ( params ?: any ) {
7
7
checkRequiredEnvVars ( ) ;
8
- const store = new AstraDBVectorStore ( ) ;
8
+ const store = new AstraDBVectorStore ( {
9
+ params : {
10
+ endpoint : process . env . ASTRA_DB_ENDPOINT ! ,
11
+ token : process . env . ASTRA_DB_APPLICATION_TOKEN ! ,
12
+ } ,
13
+ } ) ;
9
14
await store . connect ( process . env . ASTRA_DB_COLLECTION ! ) ;
10
15
return await VectorStoreIndex . fromVectorStore ( store ) ;
11
16
}
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.19 " ,
24
+ "llamaindex" : " 0.6.21 " ,
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.19 " ,
30
+ "llamaindex" : " 0.6.21 " ,
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