Skip to content

Commit

Permalink
docs: provide info on the generic credential tool (gptscript-ai#471)
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Linville <[email protected]>
  • Loading branch information
g-linville authored Jun 10, 2024
1 parent 039376c commit a2e23a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/docs/03-tools/04-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ credentials: credential-tool-2.gpt
(tool stuff here)
```

### Generic Credential Tool

GPTScript also provides a generic credential tool (`github.com/gptscript-ai/credential`) that is ideal for cases
where you only need to set one environment variable. Here is an example of how to use it:

```yaml
credentials: github.com/gptscript-ai/credential as myCredentialName with MY_ENV_VAR as env and "this message will be displayed to the user" as message and key as field

(tool stuff here)
```

When this tool is run, the user will be shown the message and prompted to enter a key. The value entered will be set as
the environment variable `MY_ENV_VAR` and stored in a credential called `myCredentialName`.

See [the repo](https://github.com/gptscript-ai/credential) for more information.

## Credential Tool Arguments

A credential tool may define arguments. Here is an example:
Expand Down

0 comments on commit a2e23a5

Please sign in to comment.