Table of Contents

Method StreamContentAsync

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

StreamContentAsync(IOrchestrator, string, OrchestrationOptions, CancellationToken)

Streams only content text from the orchestration (filters out agent transitions, tool calls, etc.).

public static IAsyncEnumerable<string> StreamContentAsync(this IOrchestrator orchestrator, string input, OrchestrationOptions options = null, CancellationToken cancellationToken = default)

Parameters

orchestrator IOrchestrator

The orchestrator to execute.

input string

The input prompt.

options OrchestrationOptions

Optional orchestration options.

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<string>

An async enumerable of content text strings.

Examples

await foreach (var text in orchestrator.StreamContentAsync("Task"))
{
    Console.Write(text);
}
Share