Skip to content

Commit 67da30e

Browse files
committed
enhance: support credential override
Enable users to set credential overrides on `Run`. e.g. ```go run, err := g.Run( ctx, "./test.gpt", gptscript.Options{ DisableCache: true, IncludeEvents: true, CredentialOverride: "sys.openai:OPENAI_API_KEY", }, ) ``` ```yaml tools: github.com/gptscript-ai/dalle-image-generation You are an expert in image generation. Please generate a lion standing proudly in the savannah. ``` Signed-off-by: Nick Hale <[email protected]>
1 parent 974f222 commit 67da30e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

opts.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ func (g GlobalOptions) toEnv() []string {
2828
type Options struct {
2929
GlobalOptions `json:",inline"`
3030

31-
Confirm bool `json:"confirm"`
32-
Input string `json:"input"`
33-
DisableCache bool `json:"disableCache"`
34-
CacheDir string `json:"cacheDir"`
35-
SubTool string `json:"subTool"`
36-
Workspace string `json:"workspace"`
37-
ChatState string `json:"chatState"`
38-
IncludeEvents bool `json:"includeEvents"`
39-
Prompt bool `json:"prompt"`
31+
Confirm bool `json:"confirm"`
32+
Input string `json:"input"`
33+
DisableCache bool `json:"disableCache"`
34+
CacheDir string `json:"cacheDir"`
35+
SubTool string `json:"subTool"`
36+
Workspace string `json:"workspace"`
37+
ChatState string `json:"chatState"`
38+
IncludeEvents bool `json:"includeEvents"`
39+
Prompt bool `json:"prompt"`
40+
CredentialOverride string `json:"credentialOverride"`
4041
}

0 commit comments

Comments
 (0)