Skip to content

fix: use array and new pluralized name for credential overrides #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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