McpToolRegistrationService.SendChatHistoryAsync 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.
Overloads
| Name | Description |
|---|---|
| SendChatHistoryAsync(ITurnContext, ChatHistory, CancellationToken) |
Sends chat history to the MCP platform for real-time threat protection. |
| SendChatHistoryAsync(ITurnContext, ChatHistory, ToolOptions, CancellationToken) |
Sends chat history to the MCP platform for real-time threat protection. |
SendChatHistoryAsync(ITurnContext, ChatHistory, CancellationToken)
Sends chat history to the MCP platform for real-time threat protection.
public System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult> SendChatHistoryAsync(Microsoft.Agents.Builder.ITurnContext turnContext, Microsoft.SemanticKernel.ChatCompletion.ChatHistory chatHistory, System.Threading.CancellationToken cancellationToken = default);
abstract member SendChatHistoryAsync : Microsoft.Agents.Builder.ITurnContext * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
override this.SendChatHistoryAsync : Microsoft.Agents.Builder.ITurnContext * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
Public Function SendChatHistoryAsync (turnContext As ITurnContext, chatHistory As ChatHistory, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)
Parameters
- turnContext
- ITurnContext
The turn context containing conversation information.
- chatHistory
- ChatHistory
The chat history to send.
- cancellationToken
- CancellationToken
A cancellation token to cancel the operation.
Returns
A task representing the asynchronous operation that returns an OperationResult indicating success or failure.
Implements
Applies to
SendChatHistoryAsync(ITurnContext, ChatHistory, ToolOptions, CancellationToken)
Sends chat history to the MCP platform for real-time threat protection.
public System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult> SendChatHistoryAsync(Microsoft.Agents.Builder.ITurnContext turnContext, Microsoft.SemanticKernel.ChatCompletion.ChatHistory chatHistory, Microsoft.Agents.A365.Tooling.Models.ToolOptions toolOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member SendChatHistoryAsync : Microsoft.Agents.Builder.ITurnContext * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.Agents.A365.Tooling.Models.ToolOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
override this.SendChatHistoryAsync : Microsoft.Agents.Builder.ITurnContext * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.Agents.A365.Tooling.Models.ToolOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.A365.Runtime.OperationResult>
Public Function SendChatHistoryAsync (turnContext As ITurnContext, chatHistory As ChatHistory, toolOptions As ToolOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OperationResult)
Parameters
- turnContext
- ITurnContext
The turn context containing conversation information.
- chatHistory
- ChatHistory
The chat history to send.
- toolOptions
- ToolOptions
Tool options for sending chat history.
- cancellationToken
- CancellationToken
A cancellation token to cancel the operation.
Returns
A task representing the asynchronous operation that returns an OperationResult indicating success or failure.