Class SemanticKernelChatMessageContentConnector
- Namespace
- AutoGen.SemanticKernel
- Assembly
- AutoGen.SemanticKernel.dll
This middleware converts the incoming IMessage to Microsoft.SemanticKernel.ChatMessageContent before passing to agent. And converts the reply message from Microsoft.SemanticKernel.ChatMessageContent to IMessage before returning to the caller.
requirement for agent
- Input message type: IMessage<T> where T is Microsoft.SemanticKernel.ChatMessageContent
- Reply message type: IMessage<T> where T is Microsoft.SemanticKernel.ChatMessageContent
- (streaming) Reply message type: IMessage<T> where T is Microsoft.SemanticKernel.StreamingChatMessageContent
This middleware supports the following message types:
This middleware returns the following message types:
- (streaming) TextMessageUpdate
public class SemanticKernelChatMessageContentConnector : IStreamingMiddleware, IMiddleware
- Inheritance
-
SemanticKernelChatMessageContentConnector
- Implements
- Inherited Members
Properties
Name
the name of the middleware
public string? Name { get; }
Property Value
Methods
InvokeAsync(MiddlewareContext, IAgent, CancellationToken)
The method to invoke the middleware
public Task<IMessage> InvokeAsync(MiddlewareContext context, IAgent agent, CancellationToken cancellationToken = default)
Parameters
context
MiddlewareContextagent
IAgentcancellationToken
CancellationToken
Returns
InvokeAsync(MiddlewareContext, IStreamingAgent, CancellationToken)
The streaming version of InvokeAsync(MiddlewareContext, IAgent, CancellationToken).
public IAsyncEnumerable<IMessage> InvokeAsync(MiddlewareContext context, IStreamingAgent agent, CancellationToken cancellationToken = default)
Parameters
context
MiddlewareContextagent
IStreamingAgentcancellationToken
CancellationToken