Table of Contents

Method WithInput

Namespace
LMKit.Agents.Orchestration.Nodes
Assembly
LM-Kit.NET.dll

WithInput(string)

Returns a new NodeContext identical to this one but with the specified input. Used by SequentialNode to pipe one node's output to the next without mutating the prior context.

public NodeContext WithInput(string newInput)

Parameters

newInput string

Returns

NodeContext

Examples

Forwarding a transformed input to a downstream node from a custom container:

// Inside a custom IOrchestrationNode that wraps a child:
public async Task<NodeResult> InvokeAsync(NodeContext context, CancellationToken ct)
{
    var transformed = context.WithInput("[summary] " + context.Input);
    return await _child.InvokeAsync(transformed, ct);
}
Share