botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

How to configure custom AI labels in bot turn context activity entity

Open Aiswarya1794 opened this issue 1 year ago • 1 comments

Hi Team,

We have referred the MS document for adding AI label in turn context activity, and it worked when we give AIGeneratedContent in the additional type.

https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-messages-ai-generated-content?tabs=before%2Cbotmessage

`var aiGeneratedContent = new JObject { { "type", "https://schema.org/Message" }, { "@type", "Message" }, { "@context", "https://schema.org" }, { "additionalType", new JArray("AIGeneratedContent") }, };

var entity = new Entity { Properties = aiGeneratedContent }; var messageActivity = MessageFactory.Text(openAiResponse); messageActivity.Entities.Add(entity); await stepContext.Context.SendActivityAsync(messageActivity, cancellationToken);`

In document its mentioned that 'Enables the AI label in the bot message. The only allowed value is AIGeneratedContent.'

So is it possible to customize this message so that we can provide a different message for indicating that its an AI generated answer.

Aiswarya1794 avatar Sep 21 '24 05:09 Aiswarya1794

Could anyone help on this. Can we make that AI generated value to be configurable

Aiswarya1794 avatar Oct 02 '24 09:10 Aiswarya1794