Skip to content

Commit 77b3878

Browse files
authored
Merge pull request #88 from thedadams/add-cache-dir-opt
feat: add CacheDir option
2 parents 220bd4f + ce058f1 commit 77b3878

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)