Skip to content

Commit ce058f1

Browse files
committedSep 3, 2024
feat: add CacheDir option
Signed-off-by: Donnie Adams <donnie@acorn.io>
1 parent 220bd4f commit ce058f1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/gptscript.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {fileURLToPath} from "url"
55
import {gunzipSync} from "zlib"
66

77
export interface GlobalOpts {
8+
CacheDir?: string
89
APIKey?: string
910
BaseURL?: string
1011
DefaultModel?: string
@@ -46,6 +47,7 @@ export interface RunOpts {
4647
env?: string[]
4748
forceSequential?: boolean
4849

50+
CacheDir?: string
4951
APIKey?: string
5052
BaseURL?: string
5153
DefaultModel?: string
@@ -73,7 +75,7 @@ export class GPTScript {
7375

7476

7577
private ready: boolean
76-
private opts: GlobalOpts
78+
private readonly opts: GlobalOpts
7779

7880
constructor(opts?: GlobalOpts) {
7981
this.opts = opts || {}
@@ -194,7 +196,6 @@ export class GPTScript {
194196
if (this.opts.Env) {
195197
opts.env = this.opts.Env.concat(opts.env || [])
196198
}
197-
198199
return (new Run("evaluate", tool, {...this.opts, ...opts}, GPTScript.serverURL)).nextChat(opts.input)
199200
}
200201

0 commit comments

Comments
 (0)