@@ -366,7 +366,7 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
366366
367367 // If the file is external, then set the SCRIPTS_PATH to the current working directory. Otherwise,
368368 // set it to the directory of the script and set the file to the base.
369- if ! ( strings .HasPrefix (file , "http://" ) || strings .HasPrefix (file , "https://" ) || strings .HasPrefix (file , "github.com" ) ) {
369+ if ! strings .HasPrefix (file , "http://" ) && ! strings .HasPrefix (file , "https://" ) && ! strings .HasPrefix (file , "github.com" ) {
370370 absPathToScript , err := filepath .Abs (file )
371371 if err != nil {
372372 return fmt .Errorf ("cannot determine absolute path to script %s: %v" , file , err )
@@ -469,8 +469,8 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
469469 // Don't use cmd.Context() because then sigint will cancel everything
470470 return tui .Run (context .Background (), args [0 ], tui.RunOptions {
471471 ClientOpts : & gptscript2.GlobalOptions {
472- OpenAIAPIKey : r .OpenAIOptions . APIKey ,
473- OpenAIBaseURL : r .OpenAIOptions . BaseURL ,
472+ OpenAIAPIKey : r .APIKey ,
473+ OpenAIBaseURL : r .BaseURL ,
474474 DefaultModel : r .DefaultModel ,
475475 DefaultModelProvider : r .DefaultModelProvider ,
476476 },
0 commit comments