File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,14 @@ import (
12
12
"github.com/gptscript-ai/gptscript/pkg/cache"
13
13
env2 "github.com/gptscript-ai/gptscript/pkg/env"
14
14
"github.com/gptscript-ai/gptscript/pkg/loader"
15
+ "github.com/gptscript-ai/gptscript/pkg/mvl"
15
16
"github.com/gptscript-ai/gptscript/pkg/openai"
16
17
"github.com/gptscript-ai/gptscript/pkg/runner"
17
18
"github.com/gptscript-ai/gptscript/pkg/types"
18
19
)
19
20
21
+ var log = mvl .Package ()
22
+
20
23
type Client struct {
21
24
clientsLock sync.Mutex
22
25
cache * cache.Client
@@ -102,6 +105,7 @@ func (c *Client) clientFromURL(apiURL string) (*openai.Client, error) {
102
105
env := "GPTSCRIPT_PROVIDER_" + env2 .ToEnvLike (parsed .Hostname ()) + "_API_KEY"
103
106
apiKey := os .Getenv (env )
104
107
if apiKey == "" {
108
+ log .Warnf ("No API key found for %s" , env )
105
109
apiKey = "<unset>"
106
110
}
107
111
return openai .NewClient (openai.Options {
You can’t perform that action at this time.
0 commit comments