Skip to content

Commit a095fff

Browse files
committed
renaming
Signed-off-by: Grant Linville <[email protected]>
1 parent 1ae7a02 commit a095fff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/gptscript/gptscript.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func New(opts *Options) (*GPTScript, error) {
107107
closeServer()
108108
return nil, err
109109
}
110-
oaiClient.SetEnv(extraEnv)
110+
oaiClient.SetEnvs(extraEnv)
111111

112112
remoteClient := remote.New(runner, extraEnv, cacheClient, cliCfg, opts.CredentialContext)
113113
if err := registry.AddClient(remoteClient); err != nil {

pkg/openai/client.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type Client struct {
4747
setSeed bool
4848
cliCfg *config.CLIConfig
4949
credCtx string
50-
env []string
50+
envs []string
5151
}
5252

5353
type Options struct {
@@ -163,8 +163,8 @@ func (c *Client) ValidAuth() error {
163163
return nil
164164
}
165165

166-
func (c *Client) SetEnv(env []string) {
167-
c.env = env
166+
func (c *Client) SetEnvs(env []string) {
167+
c.envs = env
168168
}
169169

170170
func (c *Client) Supports(ctx context.Context, modelName string) (bool, error) {
@@ -570,7 +570,7 @@ func (c *Client) call(ctx context.Context, request openai.ChatCompletionRequest,
570570
}
571571

572572
func (c *Client) RetrieveAPIKey() error {
573-
k, err := prompt.GetModelProviderCredential(BuiltinCredName, "OPENAI_API_KEY", "Please provide your OpenAI API key:", c.credCtx, c.env, c.cliCfg)
573+
k, err := prompt.GetModelProviderCredential(BuiltinCredName, "OPENAI_API_KEY", "Please provide your OpenAI API key:", c.credCtx, c.envs, c.cliCfg)
574574
if err != nil {
575575
return err
576576
}

0 commit comments

Comments
 (0)