diff --git a/gptscript/opts.py b/gptscript/opts.py index 71b7831..932af4c 100644 --- a/gptscript/opts.py +++ b/gptscript/opts.py @@ -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 = "", @@ -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 diff --git a/tests/test_gptscript.py b/tests/test_gptscript.py index 1469d49..c12f719 100644 --- a/tests/test_gptscript.py +++ b/tests/test_gptscript.py @@ -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"