File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export interface RunOptions {
16
16
variables ?: Variable [ ] ;
17
17
threadId ?: string ;
18
18
rawResponse ?: boolean ;
19
+ runTools ?: boolean ;
19
20
}
20
21
21
22
export interface RunOptionsStream extends RunOptions {
@@ -166,6 +167,9 @@ export class Pipe {
166
167
const stream = this . hasTools ? false : requestedStream ;
167
168
this . warnIfToolsWithStream ( requestedStream ) ;
168
169
170
+ const runTools = options . runTools ?? true ;
171
+ delete options . runTools ;
172
+
169
173
const body = { ...options , stream} ;
170
174
171
175
let response = await this . createRequest <
@@ -175,10 +179,7 @@ export class Pipe {
175
179
return { } as RunResponse | RunResponseStream ;
176
180
}
177
181
178
- // logger('pipe.run.response');
179
- // logger(response, {depth: null, colors: true});
180
-
181
- if ( stream ) {
182
+ if ( stream || ! runTools ) {
182
183
return response as RunResponseStream ;
183
184
}
184
185
You canβt perform that action at this time.
0 commit comments