Class FunctionInvocationComposition
- Namespace
- Oscova.Agents.Middleware
- Assembly
- Oscova.Agents.dll
Composes function-invocation middleware onto a single Microsoft.Extensions.AI.FunctionInvokingChatClient.
Each call to UseFunctionInvocation creates a new FICC, and once a FICC sees a
Microsoft.Extensions.AI.FunctionCallContent it buffers every later streaming update until the inner
stream completes. Stacking FICCs therefore makes the outer ones hold back the entire post-tool
answer and release it in one burst. Routing the per-tool configurators through a single FICC
keeps the stream flowing while preserving the existing invoker composition.
public static class FunctionInvocationCompositionInheritance
Inherited Members
Methods
- Begin(ICollection<Action<FunctionInvokingChatClient>>)
-
Begins a composition scope. While active, Oscova.Agents.Middleware.FunctionInvocationComposition.Contribute(Microsoft.Extensions.AI.ChatClientBuilder,System.Action{Microsoft.Extensions.AI.FunctionInvokingChatClient}) records configurators into
configuratorsinstead of adding a separate FICC to the builder. Dispose to end. - Contribute(ChatClientBuilder, Action<FunctionInvokingChatClient>)
-
Records
configureinto the active composition (returning the builder unchanged), or adds a standalone Microsoft.Extensions.AI.FunctionInvokingChatClient when no composition is active.