@@ -366,7 +366,7 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
366
366
367
367
// If the file is external, then set the SCRIPTS_PATH to the current working directory. Otherwise,
368
368
// 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" ) {
370
370
absPathToScript , err := filepath .Abs (file )
371
371
if err != nil {
372
372
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) {
469
469
// Don't use cmd.Context() because then sigint will cancel everything
470
470
return tui .Run (context .Background (), args [0 ], tui.RunOptions {
471
471
ClientOpts : & gptscript2.GlobalOptions {
472
- OpenAIAPIKey : r .OpenAIOptions . APIKey ,
473
- OpenAIBaseURL : r .OpenAIOptions . BaseURL ,
472
+ OpenAIAPIKey : r .APIKey ,
473
+ OpenAIBaseURL : r .BaseURL ,
474
474
DefaultModel : r .DefaultModel ,
475
475
DefaultModelProvider : r .DefaultModelProvider ,
476
476
},
0 commit comments