microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
358 stars 146 forks source link

[Feature Request]: clear the conversation history #752

Closed chagong closed 8 months ago

chagong commented 8 months ago

When using teams-ai to build an AI chatbot, instead of append conversation history into openai request, people may want some control on it, like clear the chat history so that openai want process the previous history. Can teams-ai provide an interface to handle it easily?

imadilkhalil commented 8 months ago

Depends on how you want to achieve it. e.g. you can have

app.message('/forget', async (context: TurnContext, state: ApplicationTurnState) => {
    ConversationHistory.clear(state);
    await context.sendActivity(`forgot all conversation history.`);
});

When a user sends /forget, all conversation history will be erased.

corinagum commented 8 months ago

clear history is a feature that has been added and will be released for GA :)

codedingt commented 5 months ago

Hi, @corinagum, could you please confirm if this is available on GA 1.1.0?

Thanks!