Skip to content

enhance: support credential override #39

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
Jun 27, 2024

Conversation

njhale
Copy link
Member

@njhale njhale commented Jun 27, 2024

Enable users to set credential overrides on Run.

e.g.

run, err := g.Run(
  ctx,
  "./test.gpt",
  gptscript.Options{
    DisableCache:  true,
    IncludeEvents: true,
    CredentialOverride: "sys.openai:OPENAI_API_KEY",
  },
)
tools: github.com/gptscript-ai/dalle-image-generation

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

Depends on gptscript-ai/gptscript#570

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

Enable users to set credential overrides on `Run`.

e.g.

```go
run, err := g.Run(
  ctx,
  "./test.gpt",
  gptscript.Options{
    DisableCache:  true,
    IncludeEvents: true,
    CredentialOverride: "sys.openai:OPENAI_API_KEY",
  },
)
```

```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 <[email protected]>
Copy link
Collaborator

@thedadams thedadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this to the other SDKs, too?

@njhale
Copy link
Member Author

njhale commented Jun 27, 2024

Can you add this to the other SDKs, too?

@thedadams was planning on it, just wanted to get an approval on the implementation here before adding it to the other SDKs

@njhale njhale merged commit b6855cd 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.

3 participants