InMemoryChatHistoryProvider.SetMessages 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.
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.