Skip to content

Commit

Permalink
Merge pull request #37 from njhale/fix/update-cred-overrides
Browse files Browse the repository at this point in the history
fix: use array and new pluralized name for credential overrides
  • Loading branch information
njhale authored Jul 1, 2024
2 parents 9c9bae5 + f8a486d commit dfd496f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gptscript/opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self,
chatState: str = "",
confirm: bool = False,
prompt: bool = False,
credentialOverride: str = "",
credentialOverrides: list[str] = None,
env: list[str] = None,
apiKey: str = "",
baseURL: str = "",
Expand All @@ -44,5 +44,5 @@ def __init__(self,
self.chatState = chatState
self.confirm = confirm
self.prompt = prompt
self.credentialOverride = credentialOverride
self.credentialOverrides = credentialOverrides
self.env = env
4 changes: 2 additions & 2 deletions tests/test_gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ async def collect_events(run: Run, e: CallFrame | RunFrame | PromptFrame):
@pytest.mark.asyncio
async def test_credential_override(gptscript):
run = gptscript.run(
"./tests/fixtures/credential-override.gpt",
os.getcwd() + "/tests/fixtures/credential-override.gpt",
Options(
disableCache=True,
credentialOverride='test.ts.credential_override:TEST_CRED=foo'
credentialOverrides=['test.ts.credential_override:TEST_CRED=foo']
),
)
assert "foo" in await run.text(), "Expect credential override to have correct output"
Expand Down

0 comments on commit dfd496f

Please sign in to comment.