Skip to content

Commit 1360435

Browse files
committed
fix: pass default model configuration to the UI
Signed-off-by: Donnie Adams <[email protected]>
1 parent 6055f37 commit 1360435

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)