mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
c70e594e6c
* rename AgentRunResponse and AgentRunResponseUpdate classes - part1 * rename varialbles, parameters, methods and tests * rollback unnecessary changes
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
namespace Microsoft.Agents.AI.DurableTask;
|
|
|
|
/// <summary>
|
|
/// Handler for processing responses from the agent. This is typically used to send messages to the user.
|
|
/// </summary>
|
|
public interface IAgentResponseHandler
|
|
{
|
|
/// <summary>
|
|
/// Handles a streaming response update from the agent. This is typically used to send messages to the user.
|
|
/// </summary>
|
|
/// <param name="messageStream">
|
|
/// The stream of messages from the agent.
|
|
/// </param>
|
|
/// <param name="cancellationToken">
|
|
/// Signals that the operation should be cancelled.
|
|
/// </param>
|
|
ValueTask OnStreamingResponseUpdateAsync(
|
|
IAsyncEnumerable<AgentResponseUpdate> messageStream,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Handles a discrete response from the agent. This is typically used to send messages to the user.
|
|
/// </summary>
|
|
/// <param name="message">
|
|
/// The message from the agent.
|
|
/// </param>
|
|
/// <param name="cancellationToken">
|
|
/// Signals that the operation should be cancelled.
|
|
/// </param>
|
|
ValueTask OnAgentResponseAsync(
|
|
AgentResponse message,
|
|
CancellationToken cancellationToken);
|
|
}
|