Skip to content

[AI] Middleware for reducing chat history #6647

@jeffhandley

Description

@jeffhandley

The AI Chat Web template demonstrates a common scenario where a long-running chat can lead to the scenario of needing to reduce the chat history for continued exchanges with the model.

To address this common pitfall, we can implement a piece of middleware in Microsoft.Extensions.AI for reducing the chat history that is exchanged. We need to design the API for this middleware to allow for configuration of how the history is reduced.

The outcome of this issue should be:

  1. A productized API for the middleware, included in Microsoft.Extensions.AI
  2. Documentation capturing how to add this middleware into an existing application created with the AI Chat Web template
  3. Discussion with the team to determine whether we want to integrate the middleware into the AI Chat Web template directly or leave it only documented

Metadata

Metadata

Assignees

Labels

area-aiMicrosoft.Extensions.AI libraries

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions