Skip to content

Commit 8b7cf33

Browse files
committed
fix environment
Signed-off-by: Grant Linville <[email protected]>
1 parent 49125f8 commit 8b7cf33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/gptscript.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,11 @@ describe("gptscript module", () => {
887887
}, 20000)
888888

889889
test("dataset operations", async () => {
890-
const workspaceID = await g.createWorkspace("directory")
890+
process.env.GPTSCRIPT_WORKSPACE_ID = await g.createWorkspace("directory")
891+
891892
const client = new gptscript.GPTScript({
892893
APIKey: process.env.OPENAI_API_KEY,
893-
Env: ["GPTSCRIPT_WORKSPACE_ID=" + workspaceID]
894+
Env: Object.entries(process.env).map(([k, v]) => `${k}=${v}`)
894895
})
895896

896897
let datasetID: string

0 commit comments

Comments
 (0)