Repository navigation
Closed
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codeagentsenhancementexperimentalAssociated with an experimental featureAssociated with an experimental featurepythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kernelsk team issueA tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Description
Replicate reducer feature implemented for .NET here: #7570
public interface IChatHistoryReducer
{
/// <summary>
/// Each reducer shall override equality evaluation so that different reducers
/// of the same configuration can be evaluated for equivalency.
/// </summary>
bool Equals(object? obj);
/// <summary>
/// Each reducer shall implement custom hash-code generation so that different reducers
/// of the same configuration can be evaluated for equivalency.
/// </summary>
int GetHashCode();
/// <summary>
/// Optionally reduces the chat history.
/// </summary>
/// <param name="history">The source history (which may have been previously reduced)</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
/// <returns>The reduced history, or 'null' if no reduction has occurred</returns>
Task<IEnumerable<ChatMessageContent>?> ReduceAsync(IReadOnlyList<ChatMessageContent> history, CancellationToken cancellationToken = default);
}With implementations:
ChatHistoryTruncationReducerChatHistorySummarizationReducer
Utilize within ChatHistoryChannel with utility extension for "no-chat" case
Note: May want to give the .NET feature a couple weeks bake time (for customer feedback)
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codeagentsenhancementexperimentalAssociated with an experimental featureAssociated with an experimental featurepythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kernelsk team issueA tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Type
Projects
- StatusShow more project fieldsBacklog: Planned
Activity
[-]Python Agents: ChatHistoryReducer[/-][+].Net: Python Agents: ChatHistoryReducer[/+][-].Net: Python Agents: ChatHistoryReducer[/-][+]Python Agents: ChatHistoryReducer[/+]github-actions commentedon Nov 21, 2024
This issue is stale because it has been open for 90 days with no activity.
github-actions commentedon Dec 14, 2024
This issue was closed because it has been inactive for 14 days since being marked as stale.
moonbox3 commentedon Dec 14, 2024
Not complete yet. Re-opening.
[-]Python Agents: ChatHistoryReducer[/-][+].Net: Python Agents: ChatHistoryReducer[/+][-].Net: Python Agents: ChatHistoryReducer[/-][+]Python Agents: ChatHistoryReducer[/+]Python: Introduce the chat history reducer (#10190)
Python: Introduce the chat history reducer (microsoft#10190)