Skip to content

Commit 53f7fbd

Browse files
authored
Merge pull request #562 from thedadams/pass-default-model-to-ui
fix: pass default model configuration to the UI
2 parents 6055f37 + 1360435 commit 53f7fbd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cli/gptscript.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
361361
gptOpt.Env = append(gptOpt.Env, system.BinEnvVar+"="+system.Bin())
362362
}
363363

364+
// If the DefaultModel is set, then pass the correct environment variable.
365+
if r.DefaultModel != "" {
366+
gptOpt.Env = append(gptOpt.Env, "GPTSCRIPT_SDKSERVER_DEFAULT_MODEL="+r.DefaultModel)
367+
}
368+
364369
args = append([]string{args[0]}, "--file="+file)
365370

366371
if len(args) > 2 {

0 commit comments

Comments
 (0)