@@ -23,6 +23,7 @@ import (
23
23
"github.com/gptscript-ai/gptscript/pkg/monitor"
24
24
"github.com/gptscript-ai/gptscript/pkg/mvl"
25
25
"github.com/gptscript-ai/gptscript/pkg/openai"
26
+ "github.com/gptscript-ai/gptscript/pkg/runner"
26
27
"github.com/gptscript-ai/gptscript/pkg/server"
27
28
"github.com/gptscript-ai/gptscript/pkg/types"
28
29
"github.com/gptscript-ai/gptscript/pkg/version"
@@ -61,6 +62,7 @@ type GPTScript struct {
61
62
CredentialOverride string `usage:"Credentials to override (ex: --credential-override github.com/example/cred-tool:API_TOKEN=1234)"`
62
63
ChatState string `usage:"The chat state to continue, or null to start a new chat and return the state"`
63
64
ForceChat bool `usage:"Force an interactive chat session if even the top level tool is not a chat tool"`
65
+ ForceSequential bool `usage:"Force parallel calls to run sequentially"`
64
66
Workspace string `usage:"Directory to use for the workspace, if specified it will not be deleted on exit"`
65
67
66
68
readData []byte
@@ -124,9 +126,13 @@ func (r *GPTScript) NewRunContext(cmd *cobra.Command) context.Context {
124
126
125
127
func (r * GPTScript ) NewGPTScriptOpts () (gptscript.Options , error ) {
126
128
opts := gptscript.Options {
127
- Cache : cache .Options (r .CacheOptions ),
128
- OpenAI : openai .Options (r .OpenAIOptions ),
129
- Monitor : monitor .Options (r .DisplayOptions ),
129
+ Cache : cache .Options (r .CacheOptions ),
130
+ OpenAI : openai .Options (r .OpenAIOptions ),
131
+ Monitor : monitor .Options (r .DisplayOptions ),
132
+ Runner : runner.Options {
133
+ CredentialOverride : r .CredentialOverride ,
134
+ Sequential : r .ForceSequential ,
135
+ },
130
136
Quiet : r .Quiet ,
131
137
Env : os .Environ (),
132
138
CredentialContext : r .CredentialContext ,
@@ -150,8 +156,6 @@ func (r *GPTScript) NewGPTScriptOpts() (gptscript.Options, error) {
150
156
opts .Runner .EndPort = endNum
151
157
}
152
158
153
- opts .Runner .CredentialOverride = r .CredentialOverride
154
-
155
159
if r .EventsStreamTo != "" {
156
160
mf , err := monitor .NewFileFactory (r .EventsStreamTo )
157
161
if err != nil {
0 commit comments