Rather than plain text responses from Gen AI, I'd like it to be more well-formatted and hierarchal.
With a little prompt engineering, I can have OpenAI respond with a RichTextBlock formatted response (something like below).
Detail what's involved in a Microsoft Partnership. Provide the well-formatted response as code for inclusion within a Microsoft AdaptiveCard RichTextBlock. The json schema will be
[{ "type": "TextRun",
"text": "Microsoft Partnership Overview\n",
"weight": "Bolder", // lighter, default
"size": "Large", // small, default, medium, extraLarge,
"italic": true // optional
}, {}..]
I can parse the result into a table variable that works when copied and pasted into AdaptiveCardDesigner (with a 1.5 schema).
My question is; for CopilotStudio, how do I bind the table so that can populate the adaptive card correctly?
Below is the Adaptive Card portion of the Topic:
- kind: SendActivity
id: sendActivity_IGejwb
activity:
attachments:
- kind: AdaptiveCardTemplate
cardContent: |-
={
type: "AdaptiveCard",
'$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
version: "1.6",
body: [
{
type: "RichTextBlock",
inlines:
ForAll(Topic.VarTable,
{
type: "TextRun",
text: text,
weight: weight,
size: size,
italic: italic,
wrap: true
}
)
}
]
}
Unfortunately, it simply displays an empty message.
Earlier messages confirm the table var is correctly populated.
Romain The Low-Code...
74
Pablo Roldan
61
stampcoin
10