Skip to content

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 <4175918+njhale@users.noreply.github.com>
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
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