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: README.md
+105-16
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,7 @@ Additionally, you need the `gptscript` binary. You can install it on your system
18
18
19
19
## Client
20
20
21
-
There are currently a couple "global" options, and the client helps to manage those. A client without any options is
22
-
likely what you want. However, here are the current global options:
23
-
24
-
-`gptscriptURL`: The URL (including `http(s)://) of an "SDK server" to use instead of the fork/exec model.
25
-
-`gptscriptBin`: The path to a `gptscript` binary to use instead of the bundled one.
21
+
The client allows the caller to run gptscript files, tools, and other operations (see below). There are currently no options for this client, so calling `NewClient()` is all you need. Although, the intention is that a single client is all you need for the life of your application, you should call `Close()` on the client when you are done.
26
22
27
23
## Options
28
24
@@ -32,12 +28,12 @@ None of the options is required, and the defaults will reduce the number of call
32
28
-`cache`: Enable or disable caching. Default (true).
33
29
-`cacheDir`: Specify the cache directory.
34
30
-`quiet`: No output logging
35
-
-`chdir`: Change current working directory
36
31
-`subTool`: Use tool of this name, not the first tool
37
32
-`input`: Input arguments for the tool run
38
33
-`workspace`: Directory to use for the workspace, if specified it will not be deleted on exit
39
34
-`inlcudeEvents`: Whether to include the streaming of events. Default (false). Note that if this is true, you must stream the events. See below for details.
40
35
-`chatState`: The chat state to continue, or null to start a new chat and return the state
36
+
-`confirm`: Prompt before running potentially dangerous commands
Using the `confirm: true` option allows a user to inspect potentially dangerous commands before they are run. The caller has the ability to allow or disallow their running. In order to do this, a caller should look for the `CallConfirm` event. This also means that `IncludeEvent` should be `true`.
0 commit comments