InMemoryChatHistoryProvider.GetMessages(AgentSession) 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.
Gets the chat messages stored for the specified session.
public System.Collections.Generic.List<Microsoft.Extensions.AI.ChatMessage> GetMessages(Microsoft.Agents.AI.AgentSession? session);
member this.GetMessages : Microsoft.Agents.AI.AgentSession -> System.Collections.Generic.List<Microsoft.Extensions.AI.ChatMessage>
Public Function GetMessages (session As AgentSession) As List(Of ChatMessage)
Parameters
- session
- AgentSession
The agent session containing the state.
Returns
A list of chat messages, or an empty list if no state is found.