diff --git a/gptscript_test.go b/gptscript_test.go index 938f5e6..9a667da 100644 --- a/gptscript_test.go +++ b/gptscript_test.go @@ -774,7 +774,7 @@ func TestConfirm(t *testing.T) { func TestConfirmDeny(t *testing.T) { var eventContent string tools := ToolDef{ - Instructions: "List the files in the current directory", + Instructions: "List the files in the current directory as '.'. If that doesn't work print the word FAIL.", Tools: []string{"sys.exec"}, } @@ -828,11 +828,11 @@ func TestConfirmDeny(t *testing.T) { t.Errorf("Error reading output: %v", err) } - if !strings.Contains(strings.ToLower(eventContent), "authorization error") { + if !strings.Contains(strings.ToLower(eventContent), "fail") { t.Errorf("Unexpected event output: %s", eventContent) } - if !strings.Contains(strings.ToLower(out), "authorization error") { + if !strings.Contains(strings.ToLower(out), "fail") { t.Errorf("Unexpected output: %s", out) } diff --git a/opts.go b/opts.go index 03f2cd4..3df9467 100644 --- a/opts.go +++ b/opts.go @@ -18,7 +18,7 @@ func (g GlobalOptions) toEnv() []string { args = append(args, "OPENAI_BASE_URL="+g.OpenAIBaseURL) } if g.DefaultModel != "" { - args = append(args, "GPTSCRIPT_DEFAULT_MODEL="+g.DefaultModel) + args = append(args, "GPTSCRIPT_SDKSERVER_DEFAULT_MODEL="+g.DefaultModel) } return args