Skip to content

Commit 04d0a85

Browse files
committed
feat: add default model provider option
Signed-off-by: Donnie Adams <[email protected]>
1 parent a41859f commit 04d0a85

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ option. Any `env` provided in the run options are appended.
4343

4444
- `APIKey`: Specify an OpenAI API key for authenticating requests
4545
- `BaseURL`: A base URL for an OpenAI compatible API (the default is `https://api.openai.com/v1`)
46-
- `DefaultModel`: The default model to use for OpenAI requests
46+
- `DefaultModel`: The default model to use for chat completion requests
47+
- `DefaultModelProvider`: The default model provider to use for chat completion requests
4748
- `Env`: Replace the system's environment variables with these in the for `KEY=VAL`
4849

4950
## Run Options

src/gptscript.ts

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface GlobalOpts {
77
APIKey?: string
88
BaseURL?: string
99
DefaultModel?: string
10+
DefaultModelProvider?: string
1011
Env?: string[]
1112
}
1213

@@ -24,6 +25,9 @@ function globalOptsToEnv(env: NodeJS.ProcessEnv, opts?: GlobalOpts) {
2425
if (opts.DefaultModel) {
2526
env["GPTSCRIPT_SDKSERVER_DEFAULT_MODEL"] = opts.DefaultModel
2627
}
28+
if (opts.DefaultModelProvider) {
29+
env["GPTSCRIPT_SDKSERVER_DEFAULT_MODEL_PROVIDER"] = opts.DefaultModelProvider
30+
}
2731
}
2832

2933
export interface RunOpts {

0 commit comments

Comments
 (0)