Class SemanticKernelAgent
- Namespace
- AutoGen.SemanticKernel
- Assembly
- AutoGen.SemanticKernel.dll
Semantic Kernel Agent
- IMessage<T> where T is Microsoft.SemanticKernel.ChatMessageContent
- IMessage<T> where T is Microsoft.SemanticKernel.ChatMessageContent
- (streaming) IMessage<T> where T is Microsoft.SemanticKernel.StreamingChatMessageContent
To support more AutoGen built-in IMessage, register with SemanticKernelChatMessageContentConnector.
public class SemanticKernelAgent : IStreamingAgent, IAgent, IAgentMetaInformation
- Inheritance
-
SemanticKernelAgent
- Implements
- Inherited Members
- Extension Methods
Constructors
SemanticKernelAgent(Kernel, string, string, PromptExecutionSettings?)
public SemanticKernelAgent(Kernel kernel, string name, string systemMessage = "You are a helpful AI assistant", PromptExecutionSettings? settings = null)
Parameters
Properties
Name
public string Name { get; }
Property Value
Methods
GenerateReplyAsync(IEnumerable<IMessage>, GenerateReplyOptions?, CancellationToken)
Generate reply
public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Parameters
messages
IEnumerable<IMessage>conversation history
options
GenerateReplyOptionscompletion option. If provided, it should override existing option if there's any
cancellationToken
CancellationToken
Returns
GenerateStreamingReplyAsync(IEnumerable<IMessage>, GenerateReplyOptions?, CancellationToken)
public IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Parameters
messages
IEnumerable<IMessage>options
GenerateReplyOptionscancellationToken
CancellationToken