Skip to content

Commit 136573a

Browse files
authored
chore: add credentialContexts to GlobalOptions (#53)
Signed-off-by: Grant Linville <[email protected]>
1 parent e030247 commit 136573a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

gptscript/opts.py

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(self,
5858
confirm: bool = False,
5959
prompt: bool = False,
6060
credentialOverrides: list[str] = None,
61+
credentialContexts: list[str] = None,
6162
location: str = "",
6263
env: list[str] = None,
6364
forceSequential: bool = False,
@@ -76,6 +77,7 @@ def __init__(self,
7677
self.confirm = confirm
7778
self.prompt = prompt
7879
self.credentialOverrides = credentialOverrides
80+
self.credentialContexts = credentialContexts
7981
self.location = location
8082
self.env = env
8183
self.forceSequential = forceSequential
@@ -92,6 +94,7 @@ def merge_global_opts(self, other: GlobalOptions) -> Self:
9294
cp.confirm = self.confirm
9395
cp.prompt = self.prompt
9496
cp.credentialOverrides = self.credentialOverrides
97+
cp.credentialContexts = self.credentialContexts
9598
cp.location = self.location
9699
cp.env = self.env
97100
cp.forceSequential = self.forceSequential

tests/fixtures/global-tools.gpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Runbook 3
44

55
---
66
Name: tool_1
7-
Global Tools: github.com/gptscript-ai/knowledge, github.com/drpebcak/duckdb, github.com/gptscript-ai/browser, github.com/gptscript-ai/browser-search/google, github.com/gptscript-ai/browser-search/google-question-answerer
7+
Global Tools: github.com/drpebcak/duckdb, github.com/gptscript-ai/browser, github.com/gptscript-ai/browser-search/google, github.com/gptscript-ai/browser-search/google-question-answerer
88

99
Say Hello!
1010

0 commit comments

Comments
 (0)