Skip to content

Conversation

@njhale
Copy link
Member

@njhale njhale commented Jun 27, 2024

Enable users to set credential overrides on run.

e.g.

const g = new gptscript.GPTScript();
try {
  const run = await g.run('./test.gpt', {
    disableCache: true,
    credentialOverride: "sys.openai:OPENAI_API_KEY",
  });
  console.log(await run.text());
} catch (e) {
  console.error(e);
}
g.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 node-gptscript

Enable users to set credential overrides on `run`.

e.g.

```typescript
const g = new gptscript.GPTScript();
try {
  const run = await g.run('./test.gpt', {
    disableCache: true,
    credentialOverride: "sys.openai:OPENAI_API_KEY",
  });
  console.log(await run.text());
} catch (e) {
  console.error(e);
}
g.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 <[email protected]>
@njhale njhale marked this pull request as draft June 27, 2024 15:38
@njhale njhale marked this pull request as ready for review June 27, 2024 16:48
@njhale njhale merged commit 10706b1 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.

2 participants