MCPcopy Create free account
hub / github.com/cloudwego/eino-examples / NewBatchNode

Function NewBatchNode

compose/batch/batch/node.go:51–62  ·  view source on GitHub ↗

NewBatchNode creates a new batch processing node. Example: batchNode := batch.NewBatchNode(&batch.NodeConfig[Request, Response]{ Name: "MyBatchProcessor", InnerTask: myWorkflow, MaxConcurrency: 5, })

(config *NodeConfig[I, O])

Source from the content-addressed store, hash-verified

49// MaxConcurrency: 5,
50// })
51func NewBatchNode[I, O any](config *NodeConfig[I, O]) *Node[I, O] {
52 name := config.Name
53 if name == "" {
54 name = "Node"
55 }
56 return &Node[I, O]{
57 name: name,
58 innerTask: config.InnerTask,
59 maxConcurrency: config.MaxConcurrency,
60 innerCompileOptions: config.InnerCompileOptions,
61 }
62}
63
64// GetType returns the node name for callback identification.
65// Implements components.Typer interface.

Callers 8

runBasicSequentialFunction · 0.92
runConcurrentFunction · 0.92
runWithCompileOptionsFunction · 0.92
runWithInvokeOptionsFunction · 0.92
runWithErrorFunction · 0.92
runInterruptAndResumeFunction · 0.92
runParentGraphWithReduceFunction · 0.92
buildWorkflowFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected