mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* Update AgentFeatureCollections with feedback * Address feedback. * Fix issue with sample. * Change generic type restriction to notnull * Remove revision * Update dotnet/src/Microsoft.Agents.AI.Abstractions/Features/AgentFeatureCollectionExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add revision back again and improve some formatting. * Remove virtual from revision. * Add overloads taking type as param and add unit tests. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
30 lines
1019 B
C#
30 lines
1019 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using Microsoft.Shared.Diagnostics;
|
|
|
|
namespace Microsoft.Agents.AI;
|
|
|
|
/// <summary>
|
|
/// An agent feature that allows providing a conversation identifier.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This feature allows a user to provide a specific identifier for chat history when stored in the underlying AI service.
|
|
/// </remarks>
|
|
public class ConversationIdAgentFeature
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ConversationIdAgentFeature"/> class with the specified thread
|
|
/// identifier.
|
|
/// </summary>
|
|
/// <param name="conversationId">The unique identifier of the thread required by the underlying AI service. Cannot be <see langword="null"/> or empty.</param>
|
|
public ConversationIdAgentFeature(string conversationId)
|
|
{
|
|
this.ConversationId = Throw.IfNullOrWhitespace(conversationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the conversation identifier.
|
|
/// </summary>
|
|
public string ConversationId { get; }
|
|
}
|