Sends a collection of different engagement types.
{Error} When a particular engagement type is missing required fields
{TypeError} When engagements is an invalid type.
This example returns a DialogueResponse to the Andi chat window and a FieldTag to the someField property
import { EngagementPowers, DialogueResponse, FieldTag } from "@andi/powers"; import { FieldTagTypes, ISkillContext, ISkillActivity } from "andiskills"; export async function run(skillContext: ISkillContext): Promise<ISkillActivity> { const fieldTag: FieldTag = { text: "Example Field Tag", tagType: FieldTagTypes.Info, key: "uniqueTemplateKeyFieldTag", fields: ["someField"] }; const dialogueResponse: DialogueResponse = { message: "Example Dialogue Response", tags: [] } return EngagementPowers.sendEngagements([fieldTag, dialogueResponse]); }
Returns a skill activity with a dialogue response and field tag to the browser.
Generated using TypeDoc
Sends a collection of different engagement types.
{Error} When a particular engagement type is missing required fields
{TypeError} When engagements is an invalid type.
This example returns a DialogueResponse to the Andi chat window and a FieldTag to the someField property
import { EngagementPowers, DialogueResponse, FieldTag } from "@andi/powers"; import { FieldTagTypes, ISkillContext, ISkillActivity } from "andiskills"; export async function run(skillContext: ISkillContext): Promise<ISkillActivity> { const fieldTag: FieldTag = { text: "Example Field Tag", tagType: FieldTagTypes.Info, key: "uniqueTemplateKeyFieldTag", fields: ["someField"] }; const dialogueResponse: DialogueResponse = { message: "Example Dialogue Response", tags: [] } return EngagementPowers.sendEngagements([fieldTag, dialogueResponse]); }