Skip to content

Commit 4b83849

Browse files
authored
Merge pull request #34 from njhale/fix/opts
fix: correct default model env var name
2 parents bcf7d41 + b4784e1 commit 4b83849

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gptscript_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ func TestConfirm(t *testing.T) {
774774
func TestConfirmDeny(t *testing.T) {
775775
var eventContent string
776776
tools := ToolDef{
777-
Instructions: "List the files in the current directory",
777+
Instructions: "List the files in the current directory as '.'. If that doesn't work print the word FAIL.",
778778
Tools: []string{"sys.exec"},
779779
}
780780

@@ -828,11 +828,11 @@ func TestConfirmDeny(t *testing.T) {
828828
t.Errorf("Error reading output: %v", err)
829829
}
830830

831-
if !strings.Contains(strings.ToLower(eventContent), "authorization error") {
831+
if !strings.Contains(strings.ToLower(eventContent), "fail") {
832832
t.Errorf("Unexpected event output: %s", eventContent)
833833
}
834834

835-
if !strings.Contains(strings.ToLower(out), "authorization error") {
835+
if !strings.Contains(strings.ToLower(out), "fail") {
836836
t.Errorf("Unexpected output: %s", out)
837837
}
838838

opts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func (g GlobalOptions) toEnv() []string {
1818
args = append(args, "OPENAI_BASE_URL="+g.OpenAIBaseURL)
1919
}
2020
if g.DefaultModel != "" {
21-
args = append(args, "GPTSCRIPT_DEFAULT_MODEL="+g.DefaultModel)
21+
args = append(args, "GPTSCRIPT_SDKSERVER_DEFAULT_MODEL="+g.DefaultModel)
2222
}
2323

2424
return args

0 commit comments

Comments
 (0)