Skip to content

Commit

Permalink
Revert "chore: stop setting GPTSCRIPT_ env vars for children"
Browse files Browse the repository at this point in the history
This reverts commit 1578250.
  • Loading branch information
thedadams committed Sep 27, 2024
1 parent 1578250 commit 2af5143
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gptscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,14 @@ func NewGPTScript(opts ...GlobalOptions) (*GPTScript, error) {
opt.URL = "http://" + opt.URL
}

opt.Env = append(opt.Env, "GPTSCRIPT_URL="+opt.URL)

if opt.Token == "" {
opt.Token = os.Getenv("GPTSCRIPT_TOKEN")
}
if opt.Token != "" {
opt.Env = append(opt.Env, "GPTSCRIPT_TOKEN="+opt.Token)
}

return &GPTScript{
globalOpts: opt,
Expand Down

0 comments on commit 2af5143

Please sign in to comment.