赋予您的代理生成具有 REST 操作、身份验证和自适应卡的 TypeSpec API 插件的能力。
构建将外部 REST API 集成到 Microsoft 365 Copilot 的插件时
在 TypeSpec 中配置 OAuth2 或 API 密钥等 API 身份验证方法时
定义复杂的请求/响应模型和自适应卡可视化时
提供 API 基准 URL 和所需 CRUD 操作的列表
选择身份验证方法(无身份验证、API 密钥或 OAuth2)
定义数据模型和自适应卡响应结构
生成完整插件的 main.tsp 和 actions.tsp 文件
你
为我们的内部票务 API 构建一个插件。它使用 API 密钥,并且需要一个 'createTicket' 操作。
Agent
我将生成一个包含两个文件的 TypeSpec 插件:用于代理定义的 main.tsp 和用于 API 的 actions.tsp。我将为您的 'X-API-Key' 请求头配置 ApiKeyAuth,定义一个带有确认卡片的 'createTicket' POST 操作,并设置一个显示票务详情的响应模型。
赋予您的代理生成完整的 TypeSpec 声明式代理的能力,其中包含针对 Copilot 的指令和自定义功能。
赋予您的代理为带有自适应卡的 TypeSpec API 插件添加 GET、POST 和 DELETE 等 RESTful 操作的能力。
Gives your agent the ability to define clear, unambiguous, and AI-ready specifications for schemas, tools, architecture, and more, ensuring a machine-readable project foundation.
Gives your agent the ability to create an llms.txt file that serves as a high-level navigation guide for LLMs to understand your repository's purpose and structure.
Gives your agent the ability to act as a senior expert, creating appealing, informative, and professional README.md files that effectively showcase your project.