IAgentThread.GetMessagesAsync 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.
Retrieve thread messages in descending order (most recent first).
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.Experimental.Agents.IChatMessage>> GetMessagesAsync (int? count = default, string? lastMessageId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessagesAsync : Nullable<int> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.Experimental.Agents.IChatMessage>>
Public Function GetMessagesAsync (Optional count As Nullable(Of Integer) = Nothing, Optional lastMessageId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of IChatMessage))
Parameters
- lastMessageId
- String
The identifier of the last message retrieved
- cancellationToken
- CancellationToken
A cancellation token
Returns
An list of IChatMessage.