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
orchestratorIOrchestratorThe orchestrator to execute.
inputstringThe input prompt.
optionsOrchestrationOptionsOptional orchestration options.
cancellationTokenCancellationTokenCancellation token.
Returns
- IAsyncEnumerable<string>
An async enumerable of content text strings.
Examples
await foreach (var text in orchestrator.StreamContentAsync("Task"))
{
Console.Write(text);
}