Skip to content

Commit e21606a

Browse files
authored
fix(eino_doc): callback demo error (#1449)
1 parent 3e0128e commit e21606a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/zh/docs/eino/overview/_index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,14 @@ Eino 会在上述代码背后自动完成一些重要工作:
122122
```go
123123
handler := NewHandlerBuilder().
124124
OnStartFn(
125-
func(ctx context.Context, info *RunInfo, input CallbackInput) context.Context) {
125+
func(ctx context.Context, info *RunInfo, input CallbackInput) context.Context {
126126
log.Infof("onStart, runInfo: %v, input: %v", info, input)
127+
return ctx
127128
}).
128129
OnEndFn(
129-
func(ctx context.Context, info *RunInfo, output CallbackOutput) context.Context) {
130+
func(ctx context.Context, info *RunInfo, output CallbackOutput) context.Context {
130131
log.Infof("onEnd, runInfo: %v, out: %v", info, output)
132+
return ctx
131133
}).
132134
Build()
133135

0 commit comments

Comments
 (0)