Microsoft 安全 Copilot 中的 GPT 插件

GPT 技能设置

设置名称 类型 说明 必需
ModelName string 选择要使用的 GPT 模型。 必须是可用模型名称之一。 是
Template string GPT 提示模板。 最多支持 80,000 个字符。 如果未指定 TemplateUrl,则为是。
TemplateUrl string 用于从中下载 GPT 提示模板(最多 80,000 个字符)的公共 URL。 是。 指定 TemplateUrl 或 Template,但不能同时指定两者。
PackageUrl string 包含 GPT 提示模板的 zip 文件的公共 URL。 注意:这是在 SkillGroup 级别示例中指定的。 是,如果未指定 Template 或 TemplateUrl。
TemplateFile string PackageUrl zip 文件中 GPT 提示模板(最多 80,000 个字符)的相对路径。 是,如果指定了 PackageUrl。

可用模型名称

模型名称 模型系列 最大令牌数
gpt-4o GPT 4o 128k

GPT 插件清单

Descriptor:
  Name: SampleGPT
  DisplayName: My Sample GPT Skillset
  Description: Skills for defanging URLs

SkillGroups:
  - Format: GPT
    Skills:
      - Name: DefangUrls
        DisplayName: Defang URLs
        Description: Defangs URLs in the given text
        Inputs:
          - Name: text
            Description: The text containing URLs to be defanged
        Settings:
          ModelName: gpt-4o
          Template: |-
            To 'defang' a URL means to change the scheme to either hxxp or hxxps and replace '.' with '[.]' in the domain so that the URL is still easily readable by a human but doesn't automatically render as a hyperlink if rendered in a rich client such as Outlook. This is often done when sharing potentially malicious links to prevent the reader accidentally clicking on them and visiting a malicious website.

            Some examples of defanging URLs:
            1. https://example.com --> hxxps://example[.]com
            2. http://subdomain.example.com/path.with.dots/ --> hxxp://subdomain[.]example[.]com/path.with.dots/

            Defang any URLs in the following text and return the new text:
            {{text}}

提示

对于生产插件,首选实现是将 GPT 模板放在单独的文件中,并使用 TemplateUrl 或 PackageUrl 设置指向它。

TemplateURL

Descriptor:
  Name: SampleGPTTemplate
  DisplayName: My Sample GPT Skillset With Template
  Description: Skills for defanging URLs

SkillGroups:
  - Format: GPT
    Skills:
      - Name: DefangUrls
        DisplayName: Defang URLs
        Description: Defangs URLs in the given text
        Inputs:
          - Name: text
            Description: The text containing URLs to be defanged
        Settings:
          ModelName: gpt-4o
          TemplateUrl: https://[domain]/template.txt

PackageUrl

Descriptor:
  Name: SampleGPTTemplateWithPackageUrl
  DisplayName: My Sample GPT Skillset With PackageUrl
  Description: Skills for defanging URLs

SkillGroups:
  - Format: GPT
    Settings:
        PackageUrl: https://[domain]/GPTTemplates.zip
    Skills:
      - Name: DefangUrls
        DisplayName: Defang URLs
        Description: Defangs URLs in the given text
        Inputs:
          - Name: text
            Description: The text containing URLs to be defanged
        Settings:
          ModelName: gpt-4o
          TemplateFile: GPTTemplates/SampleGPTTemplate.txt