次の方法で共有


McpToolRegistrationService.SendChatHistoryAsync Method

Definition

Overloads

Name Description
SendChatHistoryAsync(ChatMessageStore, ITurnContext, CancellationToken)

Sends chat history from a ChatMessageStore to the MCP platform.

SendChatHistoryAsync(IEnumerable<ChatMessage>, ITurnContext, CancellationToken)

Sends chat history to the MCP platform.

SendChatHistoryAsync(ChatMessageStore, ITurnContext, ToolOptions, CancellationToken)

Sends chat history from a ChatMessageStore to the MCP platform.

SendChatHistoryAsync(IEnumerable<ChatMessage>, ITurnContext, ToolOptions, CancellationToken)

Sends chat history to the MCP platform.

SendChatHistoryAsync(ChatMessageStore, ITurnContext, CancellationToken)

Source:
McpToolRegistrationService.cs

Sends chat history from a ChatMessageStore to the MCP platform.

public System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult> SendChatHistoryAsync(Microsoft.Agents.AI.ChatMessageStore chatMessageStore, Microsoft.Agents.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken = default);
abstract member SendChatHistoryAsync : Microsoft.Agents.AI.ChatMessageStore * Microsoft.Agents.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
override this.SendChatHistoryAsync : Microsoft.Agents.AI.ChatMessageStore * Microsoft.Agents.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
Public Function SendChatHistoryAsync (chatMessageStore As ChatMessageStore, turnContext As ITurnContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)

Parameters

chatMessageStore
Microsoft.Agents.AI.ChatMessageStore

The chat message store containing the conversation history. Empty stores are valid and will result in an empty array being forwarded to the MCP platform.

turnContext
ITurnContext

Turn context for the current request.

cancellationToken
CancellationToken

Cancellation token.

Returns

An OperationResult indicating success or failure.

Implements

Applies to

SendChatHistoryAsync(IEnumerable<ChatMessage>, ITurnContext, CancellationToken)

Source:
McpToolRegistrationService.cs

Sends chat history to the MCP platform.

public System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult> SendChatHistoryAsync(System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage> chatMessages, Microsoft.Agents.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken = default);
abstract member SendChatHistoryAsync : seq<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Agents.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
override this.SendChatHistoryAsync : seq<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Agents.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
Public Function SendChatHistoryAsync (chatMessages As IEnumerable(Of ChatMessage), turnContext As ITurnContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)

Parameters

chatMessages
IEnumerable<ChatMessage>

The chat messages to send. Empty collections are valid and will be forwarded to the MCP platform.

turnContext
ITurnContext

Turn context for the current request.

cancellationToken
CancellationToken

Cancellation token.

Returns

An OperationResult indicating success or failure.

Implements

Applies to

SendChatHistoryAsync(ChatMessageStore, ITurnContext, ToolOptions, CancellationToken)

Source:
McpToolRegistrationService.cs

Sends chat history from a ChatMessageStore to the MCP platform.

public System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult> SendChatHistoryAsync(Microsoft.Agents.AI.ChatMessageStore chatMessageStore, Microsoft.Agents.Builder.ITurnContext turnContext, Microsoft.Agents.A365.Tooling.Models.ToolOptions toolOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member SendChatHistoryAsync : Microsoft.Agents.AI.ChatMessageStore * Microsoft.Agents.Builder.ITurnContext * Microsoft.Agents.A365.Tooling.Models.ToolOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
override this.SendChatHistoryAsync : Microsoft.Agents.AI.ChatMessageStore * Microsoft.Agents.Builder.ITurnContext * Microsoft.Agents.A365.Tooling.Models.ToolOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
Public Function SendChatHistoryAsync (chatMessageStore As ChatMessageStore, turnContext As ITurnContext, toolOptions As ToolOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)

Parameters

chatMessageStore
Microsoft.Agents.AI.ChatMessageStore

The chat message store containing the conversation history. Empty stores are valid and will result in an empty array being forwarded to the MCP platform.

turnContext
ITurnContext

Turn context for the current request.

toolOptions
ToolOptions

Tool options for configuration.

cancellationToken
CancellationToken

Cancellation token.

Returns

An OperationResult indicating success or failure.

Implements

Applies to

SendChatHistoryAsync(IEnumerable<ChatMessage>, ITurnContext, ToolOptions, CancellationToken)

Source:
McpToolRegistrationService.cs

Sends chat history to the MCP platform.

public System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult> SendChatHistoryAsync(System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage> chatMessages, Microsoft.Agents.Builder.ITurnContext turnContext, Microsoft.Agents.A365.Tooling.Models.ToolOptions toolOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member SendChatHistoryAsync : seq<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Agents.Builder.ITurnContext * Microsoft.Agents.A365.Tooling.Models.ToolOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
override this.SendChatHistoryAsync : seq<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Agents.Builder.ITurnContext * Microsoft.Agents.A365.Tooling.Models.ToolOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
Public Function SendChatHistoryAsync (chatMessages As IEnumerable(Of ChatMessage), turnContext As ITurnContext, toolOptions As ToolOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)

Parameters

chatMessages
IEnumerable<ChatMessage>

The chat messages to send. Empty collections are valid and will be forwarded to the MCP platform.

turnContext
ITurnContext

Turn context for the current request.

toolOptions
ToolOptions

Tool options for configuration.

cancellationToken
CancellationToken

Cancellation token.

Returns

An OperationResult indicating success or failure.

Implements

Applies to