You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/03-tools/03-openapi.md
+6-13
Original file line number
Diff line number
Diff line change
@@ -54,12 +54,8 @@ OAuth and OIDC schemes will be ignored.
54
54
GPTScript will look at the `security` defined on the operation (or defined globally, if it is not defined on the operation) before it makes the request.
55
55
It will set the necessary headers, cookies, or query parameters based on the corresponding security scheme.
56
56
57
-
Environment variables must be set for each security scheme that will be used by the operation.
58
-
`<HOSTNAME>`is the hostname of the server, but all caps, and with dashes (`-`) and dots (`.`) replaced with underscores (`_`).
59
-
`<SCHEME NAME>`is the name of the security scheme, but all caps, and with dashes (`-`) and dots (`.`) replaced with underscores (`_`).
60
-
61
-
- For `apiKey`-type and `http`-type with `bearer` scheme, the environment variable is `GPTSCRIPT_<HOSTNAME>_<SCHEME NAME>`
62
-
- For `http`-type with `basic` scheme, the environment variables are `GPTSCRIPT_<HOSTNAME>_<SCHEME NAME>_USERNAME` and `GPTSCRIPT_<HOSTNAME>_<SCHEME NAME>_PASSWORD`
57
+
When internally generating the tool for the operation with a supported security scheme, GPTScript will include a credential tool.
58
+
This tool will prompt the user to enter their credentials. This will make the key available to GPTScript during the tool's execution.
63
59
64
60
#### Example
65
61
@@ -85,10 +81,10 @@ security:
85
81
```
86
82
87
83
In this example, we have two security schemes, and both are defined as the defaults on the global level.
88
-
They are separate entries in the global `security` array, so they are treated as a logical OR, and GPTScript will only
89
-
need the environment variable for one or the other to make the request.
84
+
They are separate entries in the global `security` array, so they are treated as a logical OR, and GPTScript will prompt
85
+
the user to enter the credential for the first one (basic auth).
90
86
91
-
When put into the same entry, they would be a logical AND, and the environment variables for both would be required.
87
+
When put into the same entry, they would be a logical AND, and both would be required.
92
88
It would look like this:
93
89
94
90
```yaml
@@ -97,10 +93,7 @@ security:
97
93
MyAPIKey: []
98
94
```
99
95
100
-
The environment variable names are as follows:
101
-
102
-
- `GPTSCRIPT_API_EXAMPLE_COM_MYBASIC_USERNAME`and `GPTSCRIPT_API_EXAMPLE_COM_MYBASIC_PASSWORD` for basic auth
103
-
- `GPTSCRIPT_API_EXAMPLE_COM_MYAPIKEY`for the API key
96
+
In this case, GPTScript will prompt the user for both the basic auth credentials and the API key.
0 commit comments