File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 26
26
27
27
- name : Initialize vector store
28
28
run : bun run init-vector-store
29
+ env :
30
+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
29
31
30
32
- name : Set up Docker Buildx
31
33
uses : docker/setup-buildx-action@v3
Original file line number Diff line number Diff line change 1
1
import { MDocument } from "@mastra/rag"
2
- import { TMP_DIR , vectorStore , VectorStoreMetadata } from "../src/lib/vector-store" ;
2
+ import { vectorStore , VectorStoreMetadata } from "../src/lib/vector-store" ;
3
3
import { getContent } from "../src/lib/utils/content" ;
4
4
import { embedMany } from "ai" ;
5
5
import { openai } from "@ai-sdk/openai" ;
6
- import fs from "fs/promises" ;
7
6
8
- const BATCH_SIZE = 50 ;
7
+ const BATCH_SIZE = process . env . BATCH_SIZE ? parseInt ( process . env . BATCH_SIZE ) : 50 ;
9
8
10
9
async function initVectorStore ( ) {
11
10
// Delete index content
You can’t perform that action at this time.
0 commit comments