Class GroupChatExtension
public static class GroupChatExtension
- Inheritance
-
GroupChatExtension
- Inherited Members
Fields
CLEAR_MESSAGES
public const string CLEAR_MESSAGES = "[GROUPCHAT_CLEAR_MESSAGES]"
Field Value
TERMINATE
public const string TERMINATE = "[GROUPCHAT_TERMINATE]"
Field Value
Methods
AddInitializeMessage(IAgent, string, IGroupChat)
[Obsolete("please use SendIntroduction")]
public static void AddInitializeMessage(this IAgent agent, string message, IGroupChat groupChat)
Parameters
agent
IAgentmessage
stringgroupChat
IGroupChat
IsGroupChatClearMessage(IMessage)
public static bool IsGroupChatClearMessage(this IMessage message)
Parameters
message
IMessage
Returns
IsGroupChatTerminateMessage(IMessage)
public static bool IsGroupChatTerminateMessage(this IMessage message)
Parameters
message
IMessage
Returns
MessageToKeep(IGroupChat, IEnumerable<IMessage>)
public static IEnumerable<IMessage> MessageToKeep(this IGroupChat _, IEnumerable<IMessage> messages)
Parameters
_
IGroupChatmessages
IEnumerable<IMessage>
Returns
ProcessConversationForAgent(IGroupChat, IEnumerable<IMessage>, IEnumerable<IMessage>)
[Obsolete]
public static IEnumerable<IMessage> ProcessConversationForAgent(this IGroupChat groupChat, IEnumerable<IMessage> initialMessages, IEnumerable<IMessage> messages)
Parameters
groupChat
IGroupChatinitialMessages
IEnumerable<IMessage>messages
IEnumerable<IMessage>
Returns
SendAsync(IGroupChat, IEnumerable<IMessage>, int, CancellationToken)
Send messages to a IGroupChat and return new messages from the group chat.
public static IAsyncEnumerable<IMessage> SendAsync(this IGroupChat groupChat, IEnumerable<IMessage> chatHistory, int maxRound = 10, CancellationToken cancellationToken = default)
Parameters
groupChat
IGroupChatchatHistory
IEnumerable<IMessage>maxRound
intcancellationToken
CancellationToken
Returns
SendIntroduction(IAgent, string, IGroupChat)
Send an instruction message to the group chat.
public static void SendIntroduction(this IAgent agent, string message, IGroupChat groupChat)
Parameters
agent
IAgentmessage
stringgroupChat
IGroupChat