File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -339,25 +339,28 @@ export class Pipe {
339
339
}
340
340
341
341
private async createRequest < T > ( endpoint : string , body : any ) : Promise < T > {
342
+ const isProdEnv = this . prod ;
342
343
const prodOptions = {
343
344
endpoint,
344
345
body : {
345
346
...body ,
346
347
name : this . pipe . name ,
347
348
} ,
348
349
} ;
349
- const providerString = this . pipe . model . split ( ':' ) [ 0 ] ;
350
- const modelProvider = getProvider ( providerString ) ;
351
- const localOptions = {
352
- endpoint,
353
- body : {
354
- ...body ,
355
- pipe : this . pipe ,
356
- llmApiKey : getLLMApiKey ( modelProvider ) ,
357
- } ,
358
- } ;
359
350
360
- const isProdEnv = this . prod ;
351
+ let localOptions = { } as any ;
352
+ if ( ! isProdEnv ) {
353
+ const providerString = this . pipe . model . split ( ':' ) [ 0 ] ;
354
+ const modelProvider = getProvider ( providerString ) ;
355
+ localOptions = {
356
+ endpoint,
357
+ body : {
358
+ ...body ,
359
+ pipe : this . pipe ,
360
+ llmApiKey : getLLMApiKey ( modelProvider ) ,
361
+ } ,
362
+ } ;
363
+ }
361
364
362
365
if ( ! isProdEnv ) {
363
366
const isServerRunning = await isLocalServerRunning ( ) ;
You can’t perform that action at this time.
0 commit comments