Skip to content

enhance: support credential override #34

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 2 commits into from
Jun 27, 2024

Conversation

njhale
Copy link
Member

@njhale njhale commented Jun 27, 2024

Enable users to set credential overrides on run.

gptscript = GPTScript()

run = gptscript.run('./test.gpt',
opts=Options(credentialOverride='sys.openai:OPENAI_API_KEY')
output = await run.text()
print(output)

gptscript.close()
tools: github.com/gptscript-ai/dalle-image-generation

You are an expert in image generation. Please generate a lion standing proudly in the savannah.

Addresses gptscript-ai/gptscript#553 for py-gptscript

@njhale njhale marked this pull request as ready for review June 27, 2024 16:48
njhale added 2 commits June 27, 2024 16:51
Enable users to set credential overrides on `run`.

```python
gptscript = GPTScript()

run = gptscript.run('./test.gpt',
opts=Options(credentialOverride='sys.openai:OPENAI_API_KEY')
output = await run.text()
print(output)

gptscript.close()
```

```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 <4175918+njhale@users.noreply.github.com>
Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
@njhale njhale force-pushed the enhance/credential-override branch from d46f7d6 to fd3ae1d Compare June 27, 2024 20:53
@njhale njhale merged commit 9c9bae5 into gptscript-ai:main Jun 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants