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

lakshmi 751 Reputation points
2024-07-18T18:16:00.3566667+00:00

Hi Team,

We have referred the MS document for adding AI label in turn context activity, 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);

We were able to get the AI label in the bot as below

User's image

Is it possible to customize the message 'AI-generated content may be incorrect'. We wanted to make the message to be configurable so that we can change if its needed.

We tried to add the below property in the entity to just check whether it will update the ai label message but it didnt worked,

"customGeneratedBy", "This answer is generated by AI" }

Is that possible using ai label entity feature

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
845 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,346 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prasad-MSFT 6,886 Reputation points Microsoft Vendor
    2024-07-30T10:30:06.82+00:00

    Currently it is not possible to customize the AI label added to your bot message which specifies that the message is generated by AI.

    To achieve your requirements, we recommend you give your feedback in Teams Feedback Portal.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.