Constructor DelegateOrchestrationStreamHandler
- Namespace
- LMKit.Agents.Orchestration.Streaming
- Assembly
- LM-Kit.NET.dll
DelegateOrchestrationStreamHandler(Func<OrchestrationStreamToken, CancellationToken, Task>, Func<IOrchestrator, string, CancellationToken, Task>, Func<OrchestrationResult, CancellationToken, Task>, Func<Exception, CancellationToken, Task>)
Initializes a new instance with async callbacks.
public DelegateOrchestrationStreamHandler(Func<OrchestrationStreamToken, CancellationToken, Task> onTokenAsync = null, Func<IOrchestrator, string, CancellationToken, Task> onStartAsync = null, Func<OrchestrationResult, CancellationToken, Task> onCompleteAsync = null, Func<Exception, CancellationToken, Task> onErrorAsync = null)
Parameters
onTokenAsyncFunc<OrchestrationStreamToken, CancellationToken, Task>Called for each token.
onStartAsyncFunc<IOrchestrator, string, CancellationToken, Task>Called when orchestration starts.
onCompleteAsyncFunc<OrchestrationResult, CancellationToken, Task>Called when orchestration completes.
onErrorAsyncFunc<Exception, CancellationToken, Task>Called on error.
DelegateOrchestrationStreamHandler(Action<OrchestrationStreamToken>, Action<IOrchestrator, string>, Action<OrchestrationResult>, Action<Exception>)
Initializes a new instance with synchronous callbacks.
public DelegateOrchestrationStreamHandler(Action<OrchestrationStreamToken> onToken = null, Action<IOrchestrator, string> onStart = null, Action<OrchestrationResult> onComplete = null, Action<Exception> onError = null)
Parameters
onTokenAction<OrchestrationStreamToken>Called for each token.
onStartAction<IOrchestrator, string>Called when orchestration starts.
onCompleteAction<OrchestrationResult>Called when orchestration completes.
onErrorAction<Exception>Called on error.