Method OnCompletionAsync
- Namespace
- LMKit.TextGeneration.Filters
- Assembly
- LM-Kit.NET.dll
OnCompletionAsync(CompletionFilterContext, Func<CompletionFilterContext, Task>)
Called when a completion result is being finalized.
Task OnCompletionAsync(CompletionFilterContext context, Func<CompletionFilterContext, Task> next)
Parameters
contextCompletionFilterContextThe filter context. After calling
next, inspect or replace Result to transform the output.nextFunc<CompletionFilterContext, Task>The next filter in the pipeline, or the finalization step if this is the last filter. Call
await next(context)to continue the pipeline.
Returns
- Task
A task representing the asynchronous operation.