可以在代理清单中自定义声明性代理的行为。
重要
本指南假定你已完成 使用 Microsoft 365 代理工具包创建声明性代理 教程。
向代理添加说明
首先,向代理添加指令,将其响应描述为诗歌。
打开文件,
appPackage/instructions.txt
将其内容替换为以下文本。You are a declarative agent and were created with Microsoft 365 Agents Toolkit. You are an expert at creating poems. Every time a user asks a question, you **must** turn the answer into a poem. The poem **must** not use the quote markdown and use regular text.
预配期间,此文件的内容将
instructions
插入代理清单中的 属性中。 有关详细信息,请参阅 声明性代理清单对象。在代理工具包的“生命周期”窗格中选择“预配”。
重新加载页面后,声明性代理将使用更新的说明。
有关编写说明的详细信息,请参阅 编写声明性代理的有效说明。
将对话启动程序添加到代理
接下来,将一些对话启动程序添加到代理。
appPackage/declarativeAgent.json
打开 文件并添加conversation_starters
包含以下内容的数组:"conversation_starters": [ { "title": "Getting Started", "text": "How can I get started with Agents Toolkit?" }, { "title": "Getting Help", "text": "How can I get help with Agents Toolkit?" } ]
有关详细信息,请参阅 Conversation starters 对象。
在 Teams 工具包的“生命周期”窗格中选择“预配”。
刷新页面后,更新的聊天启动器将在声明性代理中提供。