ChatHistoryProvider.InvokedContext Class

Definition

Contains the context information provided to InvokedCoreAsync(ChatHistoryProvider+InvokedContext, CancellationToken).

public sealed class ChatHistoryProvider.InvokedContext
type ChatHistoryProvider.InvokedContext = class
Public NotInheritable Class ChatHistoryProvider.InvokedContext
Inheritance
ChatHistoryProvider.InvokedContext

Remarks

This class provides context about a completed agent invocation, including the accumulated request messages (user input, chat history and any others provided by AI context providers) that were used and the response messages that were generated. It also indicates whether the invocation succeeded or failed.

Constructors

Name Description
ChatHistoryProvider.InvokedContext(AIAgent, AgentSession, IEnumerable<ChatMessage>, Exception)

Initializes a new instance of the ChatHistoryProvider.InvokedContext class for a failed invocation.

ChatHistoryProvider.InvokedContext(AIAgent, AgentSession, IEnumerable<ChatMessage>, IEnumerable<ChatMessage>)

Initializes a new instance of the ChatHistoryProvider.InvokedContext class for a successful invocation.

Properties

Name Description
Agent

Gets the agent that is being invoked.

InvokeException

Gets the Exception that was thrown during the invocation, if the invocation failed.

RequestMessages

Gets the accumulated request messages (user input, chat history and any others provided by AI context providers) that were used by the agent for this invocation.

ResponseMessages

Gets the collection of response messages generated during this invocation if the invocation succeeded.

Session

Gets the agent session associated with the agent invocation.

Applies to