Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add CacheDir option #88

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/gptscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {fileURLToPath} from "url"
import {gunzipSync} from "zlib"

export interface GlobalOpts {
CacheDir?: string
APIKey?: string
BaseURL?: string
DefaultModel?: string
Expand Down Expand Up @@ -46,6 +47,7 @@ export interface RunOpts {
env?: string[]
forceSequential?: boolean

CacheDir?: string
APIKey?: string
BaseURL?: string
DefaultModel?: string
Expand Down Expand Up @@ -73,7 +75,7 @@ export class GPTScript {


private ready: boolean
private opts: GlobalOpts
private readonly opts: GlobalOpts

constructor(opts?: GlobalOpts) {
this.opts = opts || {}
Expand Down Expand Up @@ -194,7 +196,6 @@ export class GPTScript {
if (this.opts.Env) {
opts.env = this.opts.Env.concat(opts.env || [])
}

return (new Run("evaluate", tool, {...this.opts, ...opts}, GPTScript.serverURL)).nextChat(opts.input)
}

Expand Down