Fix AIContextProvider comments (#971)

This commit is contained in:
westey
2025-09-29 18:11:22 +01:00
committed by GitHub
Unverified
parent e11ec9d941
commit 9e8f5e62e7
@@ -21,7 +21,7 @@ namespace Microsoft.Agents.AI;
public abstract class AIContextProvider
{
/// <summary>
/// Called just before the Model/Agent/etc. is invoked
/// Called just before the Model/Agent/etc. is invoked.
/// Implementers can load any additional context required at this time,
/// and they should return any context that should be passed to the Model/Agent/etc.
/// </summary>
@@ -31,13 +31,18 @@ public abstract class AIContextProvider
public abstract ValueTask<AIContext> InvokingAsync(InvokingContext context, CancellationToken cancellationToken = default);
/// <summary>
/// Called just before the Model/Agent/etc. is invoked
/// Implementers can load any additional context required at this time,
/// and they should return any context that should be passed to the Model/Agent/etc.
/// Called just after the Model/Agent/etc. is invoked.
/// Implementers can use the request and response messages in the provided <paramref name="context"/> to update
/// any internal state or perform any necessary actions based on the outcome of the invocation.
/// E.g. extracting memories from the user messages to remember a user preference.
/// </summary>
/// <param name="context">Contains the event context.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>A task that completes when the context has been rendered and returned.</returns>
/// <remarks>
/// This method is called regardless of whether the invocation succeeded or failed.
/// To check if the invocation was successful, you can inspect the <see cref="InvokedContext.InvokeException"/> property.
/// </remarks>
public virtual ValueTask InvokedAsync(InvokedContext context, CancellationToken cancellationToken = default)
=> default;