@@ -52,7 +52,7 @@ From the perspective of the unified specification of Eino's component interface,
5252- InvokableLambda
5353
5454``` go
55- // input and output types are any types customized by oneself .
55+ // The types of input and output types can be any types.
5656lambda := compose.InvokableLambda (func (ctx context .Context , input string ) (output string , err error ) {
5757 // some logic
5858})
@@ -61,7 +61,7 @@ lambda := compose.InvokableLambda(func(ctx context.Context, input string) (outpu
6161- StreamableLambda
6262
6363``` go
64- // The types of ' input' and 'output' are any custom types.
64+ // The type of input can be any custom type and the type of output must be *schema.StreamReader[O],O can be any type.
6565lambda := compose.StreamableLambda (func (ctx context .Context , input string ) (output *schema .StreamReader [string ], err error ) {
6666 // some logic
6767})
@@ -70,7 +70,7 @@ lambda := compose.StreamableLambda(func(ctx context.Context, input string) (outp
7070- CollectableLambda
7171
7272``` go
73- // The types of ' input' and ' output' can be any custom type.
73+ // The type of input must be *schema.StreamReader[I],I can be any type and the type of output can be any custom type.
7474lambda := compose.CollectableLambda (func (ctx context .Context , input *schema .StreamReader [string ]) (output string , err error ) {
7575 // some logic
7676})
@@ -79,7 +79,7 @@ lambda := compose.CollectableLambda(func(ctx context.Context, input *schema.Stre
7979- TransformableLambda
8080
8181``` go
82- // The types of input and output are any custom types .
82+ // The type of input must be *schema.StreamReader[I],I can be any type and the type of output must be *schema.StreamReader[O],O can be any type .
8383lambda := compose.TransformableLambda (func (ctx context .Context , input *schema .StreamReader [string ]) (output *schema .StreamReader [string ], err error ) {
8484 // some logic
8585})
0 commit comments