InMemoryChatHistoryProvider.SetMessages Method

Definition

Sets the chat messages for the specified session.

public void SetMessages(Microsoft.Agents.AI.AgentSession? session, System.Collections.Generic.List<Microsoft.Extensions.AI.ChatMessage> messages);
member this.SetMessages : Microsoft.Agents.AI.AgentSession * System.Collections.Generic.List<Microsoft.Extensions.AI.ChatMessage> -> unit
Public Sub SetMessages (session As AgentSession, messages As List(Of ChatMessage))

Parameters

session
AgentSession

The agent session containing the state.

messages
List<ChatMessage>

The messages to store.

Exceptions

messages is null.

Applies to