digipair 0.66.7 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +31 -31
- package/src/app/app.service.js +30 -106
- package/src/app/app.service.js.map +1 -1
- package/src/assets/default.json +10 -0
- package/src/assets/digipairs/admin/boost-add-digipair-api.json +1 -1
- package/src/assets/digipairs/admin/boost-add-digipair-imap-listener-oauth2.json +1 -1
- package/src/assets/digipairs/admin/boost-add-digipair-imap-listener.json +1 -1
- package/src/assets/digipairs/admin/boost-add-digipair-teams.json +1 -1
- package/src/assets/digipairs/admin/boost-add-digipair.json +1 -1
- package/src/assets/digipairs/admin/boost-add-reasoning.json +1 -1
- package/src/assets/digipairs/admin/boost-duplicate-reasoning.json +1 -1
- package/src/assets/digipairs/admin/boost-plan-reasoning.json +1 -3
- package/src/assets/digipairs/admin/conversation.json +35 -6
- package/src/assets/digipairs/common/config.json +1 -3
- package/src/assets/templates/default/conversation.json +35 -6
- package/src/assets/templates/imap-listener/conversation.json +35 -6
- package/src/assets/templates/imap-listener-oauth2/conversation.json +35 -6
- package/src/assets/templates/msteams-incoming-webhook/conversation.json +35 -6
- package/src/assets/templates/openapi-apikey/conversation.json +35 -6
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "digipair",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"digipair": "./bin/digipair.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@digipair/engine": "0.
|
|
10
|
-
"@digipair/skill-chatbot": "0.
|
|
11
|
-
"@digipair/skill-common": "0.
|
|
12
|
-
"@digipair/skill-cron": "0.
|
|
13
|
-
"@digipair/skill-basic": "0.
|
|
14
|
-
"@digipair/skill-debug": "0.
|
|
15
|
-
"@digipair/skill-dsp": "0.
|
|
16
|
-
"@digipair/skill-editor": "0.
|
|
17
|
-
"@digipair/skill-factory": "0.
|
|
18
|
-
"@digipair/skill-http": "0.
|
|
19
|
-
"@digipair/skill-llm": "0.
|
|
20
|
-
"@digipair/skill-openai": "0.
|
|
21
|
-
"@digipair/skill-service": "0.
|
|
22
|
-
"@digipair/skill-sse": "0.
|
|
23
|
-
"@digipair/skill-temporal": "0.
|
|
24
|
-
"@digipair/skill-web": "0.
|
|
25
|
-
"@digipair/skill-logger": "0.
|
|
26
|
-
"@digipair/skill-process": "0.
|
|
27
|
-
"@digipair/skill-oauth2": "0.
|
|
28
|
-
"@digipair/skill-imap": "0.
|
|
29
|
-
"@digipair/skill-sendmail": "0.
|
|
30
|
-
"@digipair/skill-web-debug": "0.
|
|
31
|
-
"@digipair/skill-web-jsoneditor": "0.
|
|
32
|
-
"@digipair/skill-web-notification": "0.
|
|
33
|
-
"@digipair/skill-web-chatbot": "0.
|
|
34
|
-
"@digipair/skill-web-editor": "0.
|
|
35
|
-
"@digipair/skill-web-inputs": "0.
|
|
36
|
-
"@digipair/skill-web-spectrum": "0.
|
|
37
|
-
"@digipair/skill-web-interact": "0.
|
|
38
|
-
"@digipair/skill-web-font-awesome": "0.
|
|
9
|
+
"@digipair/engine": "0.67.0",
|
|
10
|
+
"@digipair/skill-chatbot": "0.67.0",
|
|
11
|
+
"@digipair/skill-common": "0.67.0",
|
|
12
|
+
"@digipair/skill-cron": "0.67.0",
|
|
13
|
+
"@digipair/skill-basic": "0.67.0",
|
|
14
|
+
"@digipair/skill-debug": "0.67.0",
|
|
15
|
+
"@digipair/skill-dsp": "0.67.0",
|
|
16
|
+
"@digipair/skill-editor": "0.67.0",
|
|
17
|
+
"@digipair/skill-factory": "0.67.0",
|
|
18
|
+
"@digipair/skill-http": "0.67.0",
|
|
19
|
+
"@digipair/skill-llm": "0.67.0",
|
|
20
|
+
"@digipair/skill-openai": "0.67.0",
|
|
21
|
+
"@digipair/skill-service": "0.67.0",
|
|
22
|
+
"@digipair/skill-sse": "0.67.0",
|
|
23
|
+
"@digipair/skill-temporal": "0.67.0",
|
|
24
|
+
"@digipair/skill-web": "0.67.0",
|
|
25
|
+
"@digipair/skill-logger": "0.67.0",
|
|
26
|
+
"@digipair/skill-process": "0.67.0",
|
|
27
|
+
"@digipair/skill-oauth2": "0.67.0",
|
|
28
|
+
"@digipair/skill-imap": "0.67.0",
|
|
29
|
+
"@digipair/skill-sendmail": "0.67.0",
|
|
30
|
+
"@digipair/skill-web-debug": "0.67.0",
|
|
31
|
+
"@digipair/skill-web-jsoneditor": "0.67.0",
|
|
32
|
+
"@digipair/skill-web-notification": "0.67.0",
|
|
33
|
+
"@digipair/skill-web-chatbot": "0.67.0",
|
|
34
|
+
"@digipair/skill-web-editor": "0.67.0",
|
|
35
|
+
"@digipair/skill-web-inputs": "0.67.0",
|
|
36
|
+
"@digipair/skill-web-spectrum": "0.67.0",
|
|
37
|
+
"@digipair/skill-web-interact": "0.67.0",
|
|
38
|
+
"@digipair/skill-web-font-awesome": "0.67.0",
|
|
39
39
|
"tslib": "^2.6.3",
|
|
40
40
|
"@nestjs/common": "^10.3.9",
|
|
41
41
|
"@nestjs/core": "^10.3.9",
|
package/src/app/app.service.js
CHANGED
|
@@ -62,125 +62,49 @@ let AppService = class AppService {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
async agent(path, digipair, reasoning, body, params, query, method, headers, requester, req, res, signal) {
|
|
65
|
+
const assets = process.env.DIGIPAIR_FACTORY_PATH || './factory';
|
|
65
66
|
let context;
|
|
66
67
|
try {
|
|
67
68
|
let content;
|
|
69
|
+
content = await fs_1.promises.readFile(`${assets}/default.json`, 'utf8');
|
|
70
|
+
const defaultConfig = JSON.parse(content);
|
|
71
|
+
content = await fs_1.promises.readFile(`${path}/common/config.json`, 'utf8');
|
|
72
|
+
const commonConfig = JSON.parse(content);
|
|
73
|
+
content = await fs_1.promises.readFile(`${path}/${digipair}/config.json`, 'utf8');
|
|
74
|
+
const config = JSON.parse(content);
|
|
75
|
+
context = {
|
|
76
|
+
config: {
|
|
77
|
+
VERSIONS: { ...defaultConfig.libraries, ...commonConfig.libraries, ...config.libraries },
|
|
78
|
+
WEB_VERSIONS: { ...defaultConfig.webLibraries, ...commonConfig.webLibraries, ...config.webLibraries },
|
|
79
|
+
},
|
|
80
|
+
privates: { ...defaultConfig.privates, ...commonConfig.privates, ...config.privates },
|
|
81
|
+
variables: { ...defaultConfig.variables, ...commonConfig.variables, ...config.variables },
|
|
82
|
+
request: {
|
|
83
|
+
digipair,
|
|
84
|
+
reasoning,
|
|
85
|
+
method,
|
|
86
|
+
body,
|
|
87
|
+
params,
|
|
88
|
+
query,
|
|
89
|
+
headers,
|
|
90
|
+
},
|
|
91
|
+
protected: {
|
|
92
|
+
req,
|
|
93
|
+
res,
|
|
94
|
+
signal,
|
|
95
|
+
},
|
|
96
|
+
requester,
|
|
97
|
+
};
|
|
68
98
|
if ((0, fs_1.existsSync)(`${path}/${digipair}/${reasoning}.json`)) {
|
|
69
|
-
content = await fs_1.promises.readFile(`${path}/common/config.json`, 'utf8');
|
|
70
|
-
const commonConfig = JSON.parse(content);
|
|
71
|
-
content = await fs_1.promises.readFile(`${path}/${digipair}/config.json`, 'utf8');
|
|
72
|
-
const config = JSON.parse(content);
|
|
73
|
-
context = {
|
|
74
|
-
config: {
|
|
75
|
-
VERSIONS: { ...commonConfig.libraries, ...config.libraries },
|
|
76
|
-
WEB_VERSIONS: { ...commonConfig.webLibraries, ...config.webLibraries },
|
|
77
|
-
},
|
|
78
|
-
privates: { ...commonConfig.privates, ...config.privates },
|
|
79
|
-
variables: { ...commonConfig.variables, ...config.variables },
|
|
80
|
-
request: {
|
|
81
|
-
digipair,
|
|
82
|
-
reasoning,
|
|
83
|
-
method,
|
|
84
|
-
body,
|
|
85
|
-
params,
|
|
86
|
-
query,
|
|
87
|
-
headers,
|
|
88
|
-
},
|
|
89
|
-
protected: {
|
|
90
|
-
req,
|
|
91
|
-
res,
|
|
92
|
-
signal,
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
99
|
content = await fs_1.promises.readFile(`${path}/${digipair}/${reasoning}.json`, 'utf8');
|
|
96
100
|
}
|
|
97
101
|
else if ((0, fs_1.existsSync)(`${path}/common/${reasoning}.json`) === true) {
|
|
98
|
-
content = await fs_1.promises.readFile(`${path}/common/config.json`, 'utf8');
|
|
99
|
-
const commonConfig = JSON.parse(content);
|
|
100
|
-
content = await fs_1.promises.readFile(`${path}/${digipair}/config.json`, 'utf8');
|
|
101
|
-
const config = JSON.parse(content);
|
|
102
|
-
context = {
|
|
103
|
-
config: {
|
|
104
|
-
VERSIONS: { ...commonConfig.libraries, ...config.libraries },
|
|
105
|
-
WEB_VERSIONS: { ...commonConfig.webLibraries, ...config.webLibraries },
|
|
106
|
-
},
|
|
107
|
-
privates: { ...commonConfig.privates, ...config.privates },
|
|
108
|
-
variables: { ...commonConfig.variables, ...config.variables },
|
|
109
|
-
request: {
|
|
110
|
-
digipair,
|
|
111
|
-
reasoning,
|
|
112
|
-
method,
|
|
113
|
-
body,
|
|
114
|
-
params,
|
|
115
|
-
query,
|
|
116
|
-
headers,
|
|
117
|
-
},
|
|
118
|
-
protected: {
|
|
119
|
-
req,
|
|
120
|
-
res,
|
|
121
|
-
signal,
|
|
122
|
-
},
|
|
123
|
-
requester,
|
|
124
|
-
};
|
|
125
102
|
content = await fs_1.promises.readFile(`${path}/common/${reasoning}.json`, 'utf8');
|
|
126
103
|
}
|
|
127
104
|
else if ((0, fs_1.existsSync)(`${path}/${digipair}/fallback.json`)) {
|
|
128
|
-
content = await fs_1.promises.readFile(`${path}/common/config.json`, 'utf8');
|
|
129
|
-
const commonConfig = JSON.parse(content);
|
|
130
|
-
content = await fs_1.promises.readFile(`${path}/${digipair}/config.json`, 'utf8');
|
|
131
|
-
const config = JSON.parse(content);
|
|
132
|
-
context = {
|
|
133
|
-
config: {
|
|
134
|
-
VERSIONS: { ...commonConfig.libraries, ...config.libraries },
|
|
135
|
-
WEB_VERSIONS: { ...commonConfig.webLibraries, ...config.webLibraries },
|
|
136
|
-
},
|
|
137
|
-
privates: { ...commonConfig.privates, ...config.privates },
|
|
138
|
-
variables: { ...commonConfig.variables, ...config.variables },
|
|
139
|
-
request: {
|
|
140
|
-
digipair,
|
|
141
|
-
reasoning,
|
|
142
|
-
method,
|
|
143
|
-
body,
|
|
144
|
-
params,
|
|
145
|
-
query,
|
|
146
|
-
headers,
|
|
147
|
-
},
|
|
148
|
-
protected: {
|
|
149
|
-
req,
|
|
150
|
-
res,
|
|
151
|
-
signal,
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
105
|
content = await fs_1.promises.readFile(`${path}/${digipair}/fallback.json`, 'utf8');
|
|
155
106
|
}
|
|
156
107
|
else if ((0, fs_1.existsSync)(`${path}/common/fallback.json`) === true) {
|
|
157
|
-
content = await fs_1.promises.readFile(`${path}/common/config.json`, 'utf8');
|
|
158
|
-
const commonConfig = JSON.parse(content);
|
|
159
|
-
content = await fs_1.promises.readFile(`${path}/${digipair}/config.json`, 'utf8');
|
|
160
|
-
const config = JSON.parse(content);
|
|
161
|
-
context = {
|
|
162
|
-
config: {
|
|
163
|
-
VERSIONS: { ...commonConfig.libraries, ...config.libraries },
|
|
164
|
-
WEB_VERSIONS: { ...commonConfig.webLibraries, ...config.webLibraries },
|
|
165
|
-
},
|
|
166
|
-
privates: { ...commonConfig.privates, ...config.privates },
|
|
167
|
-
variables: { ...commonConfig.variables, ...config.variables },
|
|
168
|
-
request: {
|
|
169
|
-
digipair,
|
|
170
|
-
reasoning,
|
|
171
|
-
method,
|
|
172
|
-
body,
|
|
173
|
-
params,
|
|
174
|
-
query,
|
|
175
|
-
headers,
|
|
176
|
-
},
|
|
177
|
-
protected: {
|
|
178
|
-
req,
|
|
179
|
-
res,
|
|
180
|
-
signal,
|
|
181
|
-
},
|
|
182
|
-
requester,
|
|
183
|
-
};
|
|
184
108
|
content = await fs_1.promises.readFile(`${path}/common/fallback.json`, 'utf8');
|
|
185
109
|
}
|
|
186
110
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../../../../apps/factory/src/app/app.service.ts"],"names":[],"mappings":";;;;AAAA,6CAA2D;AAC3D,2CAA0D;AAC1D,2BAA0C;AAE1C,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE;IAClB;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,yBAAyB;QAClC,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE;YACV,QAAQ,EAAE,sBAAsB;YAChC,SAAS,EAAE,sBAAsB;YACjC,OAAO,EAAE,sBAAsB;YAC/B,IAAI,EAAE,8BAA8B;SACrC;KACF;CACF,CAAC,CAAC;AAGI,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC5C,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,YAAY;YAClD,CAAC,CAAC,qBAAqB,CAAC;QAE1B,6BAA6B;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,UAAU,EAAE,CAAC;QAE/B,2BAA2B;QAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;QACxD,YAAY,CAAC,UAAU,CAAC,CAAC,OAAY,EAAE,QAAgB,EAAE,SAAiB,EAAE,IAAS,EAAE,EAAE,CACvF,IAAI,CAAC,KAAK,CACR,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,EAAE,EACF,EAAE,EACF,IAAI,EACJ,EAAE,EACF,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,CAAC,SAAS,CAAC,MAAM,CACzB,CACF,CAAC;QAEF,qBAAqB;QACrB,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAA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IAAS,EACT,MAAgB,EAChB,KAAU,EACV,MAAc,EACd,OAAY,EACZ,SAAc,EACd,GAAQ,EACR,GAAQ,EACR,MAAmB;QAEnB,
|
|
1
|
+
{"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../../../../apps/factory/src/app/app.service.ts"],"names":[],"mappings":";;;;AAAA,6CAA2D;AAC3D,2CAA0D;AAC1D,2BAA0C;AAE1C,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE;IAClB;QACE,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,yBAAyB;QAClC,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE;YACV,QAAQ,EAAE,sBAAsB;YAChC,SAAS,EAAE,sBAAsB;YACjC,OAAO,EAAE,sBAAsB;YAC/B,IAAI,EAAE,8BAA8B;SACrC;KACF;CACF,CAAC,CAAC;AAGI,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC5C,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,YAAY;YAClD,CAAC,CAAC,qBAAqB,CAAC;QAE1B,6BAA6B;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,UAAU,EAAE,CAAC;QAE/B,2BAA2B;QAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;QACxD,YAAY,CAAC,UAAU,CAAC,CAAC,OAAY,EAAE,QAAgB,EAAE,SAAiB,EAAE,IAAS,EAAE,EAAE,CACvF,IAAI,CAAC,KAAK,CACR,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,EAAE,EACF,EAAE,EACF,IAAI,EACJ,EAAE,EACF,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,CAAC,SAAS,CAAC,MAAM,CACzB,CACF,CAAC;QAEF,qBAAqB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AAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACrC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAe,EAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;YAE1D,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,KAAK,oBAAoB,EAAE,CAAC;gBACnC,MAAM,KAAK,CAAC;YACd,CAAC;YAED,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAErB,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO;YACT,CAAC;YAED,MAAM,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;YACtD,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF,CAAA;AApJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAoJtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "default",
|
|
3
|
+
"description": "default actions.",
|
|
4
|
+
"metadata": { "avatar": "avatar.png", "color": "#3b82f6" },
|
|
5
|
+
"libraries": {},
|
|
6
|
+
"variables": {},
|
|
7
|
+
"privates": {
|
|
8
|
+
"MODEL_DSP": [{ "library": "@digipair/skill-dsp", "element": "modelOpenAI" }]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Adding a new digipair for an IMAP listener with OAuth2.",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": { "standalone": true },
|
|
6
|
+
"metadata": { "standalone": true, "selector": "any", "url": "^$" },
|
|
7
7
|
"properties": {
|
|
8
8
|
"steps": [
|
|
9
9
|
{
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Adding a new digipair for an IMAP listener.",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": { "standalone": true },
|
|
6
|
+
"metadata": { "standalone": true, "selector": "any", "url": "^$" },
|
|
7
7
|
"properties": {
|
|
8
8
|
"steps": [
|
|
9
9
|
{
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"summary": "Conversation",
|
|
3
2
|
"description": "Generating a response for the user via the chatbot.",
|
|
3
|
+
"summary": "Conversation",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": {
|
|
6
|
+
"metadata": {
|
|
7
|
+
"standalone": false,
|
|
8
|
+
"selector": "any",
|
|
9
|
+
"url": "^$"
|
|
10
|
+
},
|
|
7
11
|
"properties": {
|
|
8
12
|
"steps": [
|
|
9
13
|
{
|
|
10
14
|
"name": "Conversation",
|
|
11
15
|
"execute": [
|
|
16
|
+
{
|
|
17
|
+
"library": "@digipair/skill-basic",
|
|
18
|
+
"element": "setVariable",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": "history",
|
|
21
|
+
"value": "EVALUATE:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
12
24
|
{
|
|
13
25
|
"library": "@digipair/skill-dsp",
|
|
14
26
|
"element": "agent",
|
|
15
27
|
"properties": {
|
|
16
28
|
"name": "Assistant",
|
|
17
29
|
"description": "You are a helpful assistant, capable of explaining concepts in a simple manner. If you're unsure of an answer, you can say \"I don't know\" or \"I'm not sure.\"",
|
|
18
|
-
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\"
|
|
30
|
+
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer in french\"",
|
|
19
31
|
"input": {
|
|
20
|
-
"userQuestion": "{{request.body.prompt}}"
|
|
32
|
+
"userQuestion": "{{request.body.prompt}}",
|
|
33
|
+
"history": "EVALUATE:variables.history"
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
},
|
|
24
37
|
{
|
|
25
|
-
"library": "
|
|
38
|
+
"library": "digipair:<%= digipair %>",
|
|
26
39
|
"element": "answer",
|
|
27
40
|
"properties": {
|
|
28
|
-
"assistant": "{{previous.answer}}"
|
|
41
|
+
"assistant": "{{previous.answer}}",
|
|
42
|
+
"boost": [
|
|
43
|
+
{
|
|
44
|
+
"prompt": true,
|
|
45
|
+
"required": true,
|
|
46
|
+
"step": "Conversation",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"library": "@digipair/skill-web-inputs",
|
|
50
|
+
"element": "digipair-input-hidden",
|
|
51
|
+
"properties": {
|
|
52
|
+
"value": "EVALUATE:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
29
58
|
}
|
|
30
59
|
}
|
|
31
60
|
]
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"summary": "Conversation",
|
|
3
2
|
"description": "Generating a response for the user via the chatbot.",
|
|
3
|
+
"summary": "Conversation",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": {
|
|
6
|
+
"metadata": {
|
|
7
|
+
"standalone": false,
|
|
8
|
+
"selector": "any",
|
|
9
|
+
"url": "^$"
|
|
10
|
+
},
|
|
7
11
|
"properties": {
|
|
8
12
|
"steps": [
|
|
9
13
|
{
|
|
10
14
|
"name": "Conversation",
|
|
11
15
|
"execute": [
|
|
16
|
+
{
|
|
17
|
+
"library": "@digipair/skill-basic",
|
|
18
|
+
"element": "setVariable",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": "history",
|
|
21
|
+
"value": "EVALUATE:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
12
24
|
{
|
|
13
25
|
"library": "@digipair/skill-dsp",
|
|
14
26
|
"element": "agent",
|
|
15
27
|
"properties": {
|
|
16
28
|
"name": "Assistant",
|
|
17
29
|
"description": "You are a helpful assistant, capable of explaining concepts in a simple manner. If you're unsure of an answer, you can say \"I don't know\" or \"I'm not sure.\"",
|
|
18
|
-
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\"
|
|
30
|
+
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer in french\"",
|
|
19
31
|
"input": {
|
|
20
|
-
"userQuestion": "{{request.body.prompt}}"
|
|
32
|
+
"userQuestion": "{{request.body.prompt}}",
|
|
33
|
+
"history": "EVALUATE:variables.history"
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
},
|
|
24
37
|
{
|
|
25
|
-
"library": "
|
|
38
|
+
"library": "digipair:<%= digipair %>",
|
|
26
39
|
"element": "answer",
|
|
27
40
|
"properties": {
|
|
28
|
-
"assistant": "{{previous.answer}}"
|
|
41
|
+
"assistant": "{{previous.answer}}",
|
|
42
|
+
"boost": [
|
|
43
|
+
{
|
|
44
|
+
"prompt": true,
|
|
45
|
+
"required": true,
|
|
46
|
+
"step": "Conversation",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"library": "@digipair/skill-web-inputs",
|
|
50
|
+
"element": "digipair-input-hidden",
|
|
51
|
+
"properties": {
|
|
52
|
+
"value": "EVALUATE:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
29
58
|
}
|
|
30
59
|
}
|
|
31
60
|
]
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"summary": "Conversation",
|
|
3
2
|
"description": "Generating a response for the user via the chatbot.",
|
|
3
|
+
"summary": "Conversation",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": {
|
|
6
|
+
"metadata": {
|
|
7
|
+
"standalone": false,
|
|
8
|
+
"selector": "any",
|
|
9
|
+
"url": "^$"
|
|
10
|
+
},
|
|
7
11
|
"properties": {
|
|
8
12
|
"steps": [
|
|
9
13
|
{
|
|
10
14
|
"name": "Conversation",
|
|
11
15
|
"execute": [
|
|
16
|
+
{
|
|
17
|
+
"library": "@digipair/skill-basic",
|
|
18
|
+
"element": "setVariable",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": "history",
|
|
21
|
+
"value": "EVALUATE:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
12
24
|
{
|
|
13
25
|
"library": "@digipair/skill-dsp",
|
|
14
26
|
"element": "agent",
|
|
15
27
|
"properties": {
|
|
16
28
|
"name": "Assistant",
|
|
17
29
|
"description": "You are a helpful assistant, capable of explaining concepts in a simple manner. If you're unsure of an answer, you can say \"I don't know\" or \"I'm not sure.\"",
|
|
18
|
-
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\"
|
|
30
|
+
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer in french\"",
|
|
19
31
|
"input": {
|
|
20
|
-
"userQuestion": "{{request.body.prompt}}"
|
|
32
|
+
"userQuestion": "{{request.body.prompt}}",
|
|
33
|
+
"history": "EVALUATE:variables.history"
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
},
|
|
24
37
|
{
|
|
25
|
-
"library": "
|
|
38
|
+
"library": "digipair:<%= digipair %>",
|
|
26
39
|
"element": "answer",
|
|
27
40
|
"properties": {
|
|
28
|
-
"assistant": "{{previous.answer}}"
|
|
41
|
+
"assistant": "{{previous.answer}}",
|
|
42
|
+
"boost": [
|
|
43
|
+
{
|
|
44
|
+
"prompt": true,
|
|
45
|
+
"required": true,
|
|
46
|
+
"step": "Conversation",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"library": "@digipair/skill-web-inputs",
|
|
50
|
+
"element": "digipair-input-hidden",
|
|
51
|
+
"properties": {
|
|
52
|
+
"value": "EVALUATE:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
29
58
|
}
|
|
30
59
|
}
|
|
31
60
|
]
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"summary": "Conversation",
|
|
3
2
|
"description": "Generating a response for the user via the chatbot.",
|
|
3
|
+
"summary": "Conversation",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": {
|
|
6
|
+
"metadata": {
|
|
7
|
+
"standalone": false,
|
|
8
|
+
"selector": "any",
|
|
9
|
+
"url": "^$"
|
|
10
|
+
},
|
|
7
11
|
"properties": {
|
|
8
12
|
"steps": [
|
|
9
13
|
{
|
|
10
14
|
"name": "Conversation",
|
|
11
15
|
"execute": [
|
|
16
|
+
{
|
|
17
|
+
"library": "@digipair/skill-basic",
|
|
18
|
+
"element": "setVariable",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": "history",
|
|
21
|
+
"value": "EVALUATE:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
12
24
|
{
|
|
13
25
|
"library": "@digipair/skill-dsp",
|
|
14
26
|
"element": "agent",
|
|
15
27
|
"properties": {
|
|
16
28
|
"name": "Assistant",
|
|
17
29
|
"description": "You are a helpful assistant, capable of explaining concepts in a simple manner. If you're unsure of an answer, you can say \"I don't know\" or \"I'm not sure.\"",
|
|
18
|
-
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\"
|
|
30
|
+
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer in french\"",
|
|
19
31
|
"input": {
|
|
20
|
-
"userQuestion": "{{request.body.prompt}}"
|
|
32
|
+
"userQuestion": "{{request.body.prompt}}",
|
|
33
|
+
"history": "EVALUATE:variables.history"
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
},
|
|
24
37
|
{
|
|
25
|
-
"library": "
|
|
38
|
+
"library": "digipair:<%= digipair %>",
|
|
26
39
|
"element": "answer",
|
|
27
40
|
"properties": {
|
|
28
|
-
"assistant": "{{previous.answer}}"
|
|
41
|
+
"assistant": "{{previous.answer}}",
|
|
42
|
+
"boost": [
|
|
43
|
+
{
|
|
44
|
+
"prompt": true,
|
|
45
|
+
"required": true,
|
|
46
|
+
"step": "Conversation",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"library": "@digipair/skill-web-inputs",
|
|
50
|
+
"element": "digipair-input-hidden",
|
|
51
|
+
"properties": {
|
|
52
|
+
"value": "EVALUATE:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
29
58
|
}
|
|
30
59
|
}
|
|
31
60
|
]
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"summary": "Conversation",
|
|
3
2
|
"description": "Generating a response for the user via the chatbot.",
|
|
3
|
+
"summary": "Conversation",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": {
|
|
6
|
+
"metadata": {
|
|
7
|
+
"standalone": false,
|
|
8
|
+
"selector": "any",
|
|
9
|
+
"url": "^$"
|
|
10
|
+
},
|
|
7
11
|
"properties": {
|
|
8
12
|
"steps": [
|
|
9
13
|
{
|
|
10
14
|
"name": "Conversation",
|
|
11
15
|
"execute": [
|
|
16
|
+
{
|
|
17
|
+
"library": "@digipair/skill-basic",
|
|
18
|
+
"element": "setVariable",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": "history",
|
|
21
|
+
"value": "EVALUATE:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
12
24
|
{
|
|
13
25
|
"library": "@digipair/skill-dsp",
|
|
14
26
|
"element": "agent",
|
|
15
27
|
"properties": {
|
|
16
28
|
"name": "Assistant",
|
|
17
29
|
"description": "You are a helpful assistant, capable of explaining concepts in a simple manner. If you're unsure of an answer, you can say \"I don't know\" or \"I'm not sure.\"",
|
|
18
|
-
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\"
|
|
30
|
+
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer in french\"",
|
|
19
31
|
"input": {
|
|
20
|
-
"userQuestion": "{{request.body.prompt}}"
|
|
32
|
+
"userQuestion": "{{request.body.prompt}}",
|
|
33
|
+
"history": "EVALUATE:variables.history"
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
},
|
|
24
37
|
{
|
|
25
|
-
"library": "
|
|
38
|
+
"library": "digipair:<%= digipair %>",
|
|
26
39
|
"element": "answer",
|
|
27
40
|
"properties": {
|
|
28
|
-
"assistant": "{{previous.answer}}"
|
|
41
|
+
"assistant": "{{previous.answer}}",
|
|
42
|
+
"boost": [
|
|
43
|
+
{
|
|
44
|
+
"prompt": true,
|
|
45
|
+
"required": true,
|
|
46
|
+
"step": "Conversation",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"library": "@digipair/skill-web-inputs",
|
|
50
|
+
"element": "digipair-input-hidden",
|
|
51
|
+
"properties": {
|
|
52
|
+
"value": "EVALUATE:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
29
58
|
}
|
|
30
59
|
}
|
|
31
60
|
]
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
"summary": "Conversation",
|
|
3
2
|
"description": "Generating a response for the user via the chatbot.",
|
|
3
|
+
"summary": "Conversation",
|
|
4
4
|
"library": "@digipair/skill-chatbot",
|
|
5
5
|
"element": "boost",
|
|
6
|
-
"metadata": {
|
|
6
|
+
"metadata": {
|
|
7
|
+
"standalone": false,
|
|
8
|
+
"selector": "any",
|
|
9
|
+
"url": "^$"
|
|
10
|
+
},
|
|
7
11
|
"properties": {
|
|
8
12
|
"steps": [
|
|
9
13
|
{
|
|
10
14
|
"name": "Conversation",
|
|
11
15
|
"execute": [
|
|
16
|
+
{
|
|
17
|
+
"library": "@digipair/skill-basic",
|
|
18
|
+
"element": "setVariable",
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": "history",
|
|
21
|
+
"value": "EVALUATE:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
12
24
|
{
|
|
13
25
|
"library": "@digipair/skill-dsp",
|
|
14
26
|
"element": "agent",
|
|
15
27
|
"properties": {
|
|
16
28
|
"name": "Assistant",
|
|
17
29
|
"description": "You are a helpful assistant, capable of explaining concepts in a simple manner. If you're unsure of an answer, you can say \"I don't know\" or \"I'm not sure.\"",
|
|
18
|
-
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\"
|
|
30
|
+
"signature": "\"Provide a very short, precise, and concise answer to the user's question using only your knowledge base.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer in french\"",
|
|
19
31
|
"input": {
|
|
20
|
-
"userQuestion": "{{request.body.prompt}}"
|
|
32
|
+
"userQuestion": "{{request.body.prompt}}",
|
|
33
|
+
"history": "EVALUATE:variables.history"
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
},
|
|
24
37
|
{
|
|
25
|
-
"library": "
|
|
38
|
+
"library": "digipair:<%= digipair %>",
|
|
26
39
|
"element": "answer",
|
|
27
40
|
"properties": {
|
|
28
|
-
"assistant": "{{previous.answer}}"
|
|
41
|
+
"assistant": "{{previous.answer}}",
|
|
42
|
+
"boost": [
|
|
43
|
+
{
|
|
44
|
+
"prompt": true,
|
|
45
|
+
"required": true,
|
|
46
|
+
"step": "Conversation",
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"library": "@digipair/skill-web-inputs",
|
|
50
|
+
"element": "digipair-input-hidden",
|
|
51
|
+
"properties": {
|
|
52
|
+
"value": "EVALUATE:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
29
58
|
}
|
|
30
59
|
}
|
|
31
60
|
]
|