microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.45k forks source link

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

Open Aiswarya1794 opened 2 months ago

Aiswarya1794 commented 2 months ago

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 commented 1 month ago

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