Skip to content

Commit

Permalink
Merge pull request #562 from thedadams/pass-default-model-to-ui
Browse files Browse the repository at this point in the history
fix: pass default model configuration to the UI
  • Loading branch information
thedadams authored Jun 26, 2024
2 parents 6055f37 + 1360435 commit 53f7fbd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cli/gptscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
gptOpt.Env = append(gptOpt.Env, system.BinEnvVar+"="+system.Bin())
}

// If the DefaultModel is set, then pass the correct environment variable.
if r.DefaultModel != "" {
gptOpt.Env = append(gptOpt.Env, "GPTSCRIPT_SDKSERVER_DEFAULT_MODEL="+r.DefaultModel)
}

args = append([]string{args[0]}, "--file="+file)

if len(args) > 2 {
Expand Down

0 comments on commit 53f7fbd

Please sign in to comment.