Skip to content

Commit 970faae

Browse files
fix CI
1 parent ad6d42e commit 970faae

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626

2727
- name: Initialize vector store
2828
run: bun run init-vector-store
29+
env:
30+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2931

3032
- name: Set up Docker Buildx
3133
uses: docker/setup-buildx-action@v3

scripts/init-vector-store.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
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";
33
import { getContent } from "../src/lib/utils/content";
44
import { embedMany } from "ai";
55
import { openai } from "@ai-sdk/openai";
6-
import fs from "fs/promises";
76

8-
const BATCH_SIZE = 50;
7+
const BATCH_SIZE = process.env.BATCH_SIZE ? parseInt(process.env.BATCH_SIZE) : 50;
98

109
async function initVectorStore() {
1110
// Delete index content

0 commit comments

Comments
 (0)