MessageInjectingChatClient.EnqueueMessages Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enqueues one or more messages to be used at the next opportunity.
public void EnqueueMessages(Microsoft.Agents.AI.AgentSession session, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage> messages);
member this.EnqueueMessages : Microsoft.Agents.AI.AgentSession * seq<Microsoft.Extensions.AI.ChatMessage> -> unit
Public Sub EnqueueMessages (session As AgentSession, messages As IEnumerable(Of ChatMessage))
Parameters
- session
- AgentSession
The agent session to enqueue messages for.
- messages
- IEnumerable<ChatMessage>
The messages to enqueue.
Remarks
This method is thread-safe and can be called concurrently from tool delegates or other code while the function execution loop is in progress. The enqueued messages will be picked up at the next opportunity.