File size: 2,583 Bytes
3d3d712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "http://aka.ms/taskweaver.plugin-v1.schema",
  "title": "Task Weaver Plugin Specification",
  "$defs": {
    "fieldType": {
      "title": "Field data type",
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the parameter",
          "type": "string",
          "minLength": 1
        },
        "description": {
          "description": "The description of the parameter. It will be used in prompt to instruct the model on how to use the parameter",
          "type": "string",
          "minLength": 10
        },
        "required": {
          "description": "Whether the parameter is required or not",
          "type": "boolean"
        },
        "default": {
          "description": "The default value of the parameter",
          "type": "string"
        },
        "type": {
          "description": "The type of the parameter",
          "type": "string"
        }
      },
      "required": ["name", "description", "type"]
    }
  },
  "properties": {
    "name": {
      "title": "Plugin name",
      "description": "The name of the plugin",
      "type": "string",
      "pattern": "^[a-zA-Z0-9_]+$",
      "minLength": 1
    },
    "code": {
      "title": "Plugin implementation",
      "description": "The Python implementation of the plugin",
      "type": "string",
      "minLength": 1
    },
    "enabled": {
      "description": "whether the plugin is enabled",
      "type": "boolean",
      "default": true
    },
    "required": {
      "description": "whether the plugin is the must-have one in auto selection mode",
      "type": "boolean",
      "default": false
    },
    "description": {
      "description": "The description of the plugin. It will be used in prompt to instruct the model on how to use the plugin",
      "type": "string",
      "minLength": 10
    },
    "parameters": {
      "description": "The parameters of the plugin",
      "type": "array",
      "items": {
        "$ref": "#/$defs/fieldType"
      }
    },
    "returns": {
      "title": "Plugin return values",
      "description": "The parameters of the plugin",
      "type": "array",
      "items": {
        "$ref": "#/$defs/fieldType"
      }
    },
    "configurations": {
      "title": "Plugin configurations",
      "description": "The parameters of the plugin",
      "type": "object"
    }
  },
  "type": "object",
  "required": ["name", "description", "parameters", "returns", "enabled"],
  "description": "Task Weaver Plugin Specification"
}