File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ const overallChain = new SimpleSequentialChain({
3535 verbose : true ,
3636} ) ;
3737const review = await overallChain . run ( "Tragedy at sunset on the beach" ) ;
38+ console . log ( review ) ;
3839/*
3940 variable review contains the generated play review based on the input title and synopsis generated in the first step:
4041
Original file line number Diff line number Diff line change @@ -53,8 +53,11 @@ export class SimpleSequentialChain
5353 implements SimpleSequentialChainInput
5454{
5555 chains : Array < BaseChain > ;
56+
5657 inputKey = "input" ;
58+
5759 outputKey = "output" ;
60+
5861 trimOutputs : boolean ;
5962
6063 get inputKeys ( ) {
@@ -87,7 +90,7 @@ export class SimpleSequentialChain
8790 if ( this . trimOutputs ) {
8891 input = input . trim ( ) ;
8992 }
90- this . callbackManager . handleText ( input , this . verbose ) ;
93+ await this . callbackManager . handleText ( input , this . verbose ) ;
9194 }
9295 return { [ this . outputKey ] : input } ;
9396 }
You can’t perform that action at this time.
0 commit comments