Skip to content

Commit a2e23a5

Browse files
authored
docs: provide info on the generic credential tool (#471)
Signed-off-by: Grant Linville <[email protected]>
1 parent 039376c commit a2e23a5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/docs/03-tools/04-credentials.md

+16
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ credentials: credential-tool-2.gpt
5050
(tool stuff here)
5151
```
5252

53+
### Generic Credential Tool
54+
55+
GPTScript also provides a generic credential tool (`github.com/gptscript-ai/credential`) that is ideal for cases
56+
where you only need to set one environment variable. Here is an example of how to use it:
57+
58+
```yaml
59+
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
60+
61+
(tool stuff here)
62+
```
63+
64+
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
65+
the environment variable `MY_ENV_VAR` and stored in a credential called `myCredentialName`.
66+
67+
See [the repo](https://github.com/gptscript-ai/credential) for more information.
68+
5369
## Credential Tool Arguments
5470

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

0 commit comments

Comments
 (0)