Skip to content

Commit

Permalink
chore: stop passing GPTSCRIPT_ env vars to children
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Sep 27, 2024
1 parent d8777f9 commit 472cafb
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/gptscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,6 @@ export class GPTScript {
if (!this.opts.URL) {
this.opts.URL = GPTScript.serverURL
}

if (!this.opts.Env) {
this.opts.Env = []
}
if (this.opts.URL) {
this.opts.Env.push(`GPTSCRIPT_URL=${this.opts.URL}`)
}

if (this.opts.Token) {
this.opts.Env.push(`GPTSCRIPT_TOKEN=${this.opts.Token}`)
}
}
}

Expand Down Expand Up @@ -411,14 +400,6 @@ export class GPTScript {
try {
await fetch(`${GPTScript.serverURL}/healthz`)
this.opts.URL = GPTScript.serverURL
if (!this.opts.Env) {
this.opts.Env = []
}
this.opts.Env.push(`GPTSCRIPT_URL=${this.opts.URL}`)
if (this.opts.Token) {
this.opts.Env.push(`GPTSCRIPT_TOKEN=${this.opts.Token}`)
}

return
} catch {
if (count === 0) {
Expand Down

0 comments on commit 472cafb

Please sign in to comment.