digipair 0.66.6 → 0.66.8

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 CHANGED
@@ -1,41 +1,41 @@
1
1
  {
2
2
  "name": "digipair",
3
- "version": "0.66.6",
3
+ "version": "0.66.8",
4
4
  "type": "commonjs",
5
5
  "bin": {
6
6
  "digipair": "./bin/digipair.js"
7
7
  },
8
8
  "dependencies": {
9
- "@digipair/engine": "0.66.6",
10
- "@digipair/skill-chatbot": "0.66.6",
11
- "@digipair/skill-common": "0.66.6",
12
- "@digipair/skill-cron": "0.66.6",
13
- "@digipair/skill-basic": "0.66.6",
14
- "@digipair/skill-debug": "0.66.6",
15
- "@digipair/skill-dsp": "0.66.6",
16
- "@digipair/skill-editor": "0.66.6",
17
- "@digipair/skill-factory": "0.66.6",
18
- "@digipair/skill-http": "0.66.6",
19
- "@digipair/skill-llm": "0.66.6",
20
- "@digipair/skill-openai": "0.66.6",
21
- "@digipair/skill-service": "0.66.6",
22
- "@digipair/skill-sse": "0.66.6",
23
- "@digipair/skill-temporal": "0.66.6",
24
- "@digipair/skill-web": "0.66.6",
25
- "@digipair/skill-logger": "0.66.6",
26
- "@digipair/skill-process": "0.66.6",
27
- "@digipair/skill-oauth2": "0.66.6",
28
- "@digipair/skill-imap": "0.66.6",
29
- "@digipair/skill-sendmail": "0.66.6",
30
- "@digipair/skill-web-debug": "0.66.6",
31
- "@digipair/skill-web-jsoneditor": "0.66.6",
32
- "@digipair/skill-web-notification": "0.66.6",
33
- "@digipair/skill-web-chatbot": "0.66.6",
34
- "@digipair/skill-web-editor": "0.66.6",
35
- "@digipair/skill-web-inputs": "0.66.6",
36
- "@digipair/skill-web-spectrum": "0.66.6",
37
- "@digipair/skill-web-interact": "0.66.6",
38
- "@digipair/skill-web-font-awesome": "0.66.6",
9
+ "@digipair/engine": "0.66.8",
10
+ "@digipair/skill-chatbot": "0.66.8",
11
+ "@digipair/skill-common": "0.66.8",
12
+ "@digipair/skill-cron": "0.66.8",
13
+ "@digipair/skill-basic": "0.66.8",
14
+ "@digipair/skill-debug": "0.66.8",
15
+ "@digipair/skill-dsp": "0.66.8",
16
+ "@digipair/skill-editor": "0.66.8",
17
+ "@digipair/skill-factory": "0.66.8",
18
+ "@digipair/skill-http": "0.66.8",
19
+ "@digipair/skill-llm": "0.66.8",
20
+ "@digipair/skill-openai": "0.66.8",
21
+ "@digipair/skill-service": "0.66.8",
22
+ "@digipair/skill-sse": "0.66.8",
23
+ "@digipair/skill-temporal": "0.66.8",
24
+ "@digipair/skill-web": "0.66.8",
25
+ "@digipair/skill-logger": "0.66.8",
26
+ "@digipair/skill-process": "0.66.8",
27
+ "@digipair/skill-oauth2": "0.66.8",
28
+ "@digipair/skill-imap": "0.66.8",
29
+ "@digipair/skill-sendmail": "0.66.8",
30
+ "@digipair/skill-web-debug": "0.66.8",
31
+ "@digipair/skill-web-jsoneditor": "0.66.8",
32
+ "@digipair/skill-web-notification": "0.66.8",
33
+ "@digipair/skill-web-chatbot": "0.66.8",
34
+ "@digipair/skill-web-editor": "0.66.8",
35
+ "@digipair/skill-web-inputs": "0.66.8",
36
+ "@digipair/skill-web-spectrum": "0.66.8",
37
+ "@digipair/skill-web-interact": "0.66.8",
38
+ "@digipair/skill-web-font-awesome": "0.66.8",
39
39
  "tslib": "^2.6.3",
40
40
  "@nestjs/common": "^10.3.9",
41
41
  "@nestjs/core": "^10.3.9",
@@ -65,122 +65,45 @@ let AppService = class AppService {
65
65
  let context;
66
66
  try {
67
67
  let content;
68
+ content = await fs_1.promises.readFile(`${path}/default.json`, 'utf8');
69
+ const defaultConfig = JSON.parse(content);
70
+ content = await fs_1.promises.readFile(`${path}/common/config.json`, 'utf8');
71
+ const commonConfig = JSON.parse(content);
72
+ content = await fs_1.promises.readFile(`${path}/${digipair}/config.json`, 'utf8');
73
+ const config = JSON.parse(content);
74
+ context = {
75
+ config: {
76
+ VERSIONS: { ...defaultConfig.libraries, ...commonConfig.libraries, ...config.libraries },
77
+ WEB_VERSIONS: { ...defaultConfig.webLibraries, ...commonConfig.webLibraries, ...config.webLibraries },
78
+ },
79
+ privates: { ...defaultConfig.privates, ...commonConfig.privates, ...config.privates },
80
+ variables: { ...defaultConfig.variables, ...commonConfig.variables, ...config.variables },
81
+ request: {
82
+ digipair,
83
+ reasoning,
84
+ method,
85
+ body,
86
+ params,
87
+ query,
88
+ headers,
89
+ },
90
+ protected: {
91
+ req,
92
+ res,
93
+ signal,
94
+ },
95
+ requester,
96
+ };
68
97
  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
98
  content = await fs_1.promises.readFile(`${path}/${digipair}/${reasoning}.json`, 'utf8');
96
99
  }
97
100
  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
101
  content = await fs_1.promises.readFile(`${path}/common/${reasoning}.json`, 'utf8');
126
102
  }
127
103
  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
104
  content = await fs_1.promises.readFile(`${path}/${digipair}/fallback.json`, 'utf8');
155
105
  }
156
106
  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
107
  content = await fs_1.promises.readFile(`${path}/common/fallback.json`, 'utf8');
185
108
  }
186
109
  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,s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M,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;AAxOY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAwOtB"}
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,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,IAAI,IAAI,QAAQ,gBAAgB,EAAE,MAAM,CAAC,CAAC;YACjF,CAAC;iBAAM,IAAI,IAAA,eAAU,EAAC,GAAG,IAAI,uBAAuB,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC/D,OAAO,GAAG,MAAM,aAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,uBAAuB,EAAE,MAAM,CAAC,CAAC;YAC5E,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAChB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;YACjC,CAAC;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;AAnJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAmJtB"}
@@ -3,7 +3,7 @@
3
3
  "description": "Adding a new digipair from OpenAPI v3.",
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
  {
@@ -32,7 +32,7 @@
32
32
  "library": "@digipair/skill-dsp",
33
33
  "element": "generate",
34
34
  "properties": {
35
- "signature": "\"Extract the information for creating the digipair from the user's comment\"\ncomment:string \"User's comment describing the digipair to create\" -> \n name:string \"Very short name of the agent from the comment in french\", \n description:string \"Short description of the agent from the comment\", \n assistant:string \"Assistant's response to confirm that the digipair has been successfully added and recall to the user to update his API key from the agent configuration\"",
35
+ "signature": "\"Extract the information for creating the digipair from the user's comment\"\ncomment:string \"User's comment describing the digipair to create\" -> \n name:string \"Very short name of the agent from the comment in english\", \n description:string \"Short description of the agent from the comment\", \n assistant:string \"Assistant's response to confirm that the digipair has been successfully added and recall to the user to update his API key from the agent configuration\"",
36
36
  "input": { "comment": "{{request.body.prompt}}" }
37
37
  }
38
38
  }
@@ -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
  {
@@ -32,7 +32,7 @@
32
32
  "library": "@digipair/skill-dsp",
33
33
  "element": "generate",
34
34
  "properties": {
35
- "signature": "\"Extract the information for creating the digipair from the user's comment\"\ncomment:string \"User's comment describing the digipair to create\" -> \n name:string \"Very short name of the agent from the comment\", \n description:string \"Short description of the agent from the comment in french\", \n assistant:string \"Assistant's response to confirm that the digipair has been successfully added and recall to the user to update his IMPA and SMTP settings from the agent configuration\"",
35
+ "signature": "\"Extract the information for creating the digipair from the user's comment\"\ncomment:string \"User's comment describing the digipair to create\" -> \n name:string \"Very short name of the agent from the comment\", \n description:string \"Short description of the agent from the comment in english\", \n assistant:string \"Assistant's response to confirm that the digipair has been successfully added and recall to the user to update his IMPA and SMTP settings from the agent configuration\"",
36
36
  "input": { "comment": "{{request.body.prompt}}" }
37
37
  }
38
38
  }
@@ -3,7 +3,7 @@
3
3
  "description": "Add a new notification agent in ms teams.",
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
  {
@@ -32,7 +32,7 @@
32
32
  "library": "@digipair/skill-dsp",
33
33
  "element": "generate",
34
34
  "properties": {
35
- "signature": "\"Extract the information for creating the digipair from the user's comment\"\ncomment:string \"User's comment describing the digipair to create\" -> \n name:string \"Very short name of the agent from the comment\", \n description:string \"Short description of the agent from the comment in french\", \n assistant:string \"Assistant's response to confirm that the digipair has been successfully added and recall to the user to update his API key from the agent configuration\"",
35
+ "signature": "\"Extract the information for creating the digipair from the user's comment\"\ncomment:string \"User's comment describing the digipair to create\" -> \n name:string \"Very short name of the agent from the comment\", \n description:string \"Short description of the agent from the comment in english\", \n assistant:string \"Assistant's response to confirm that the digipair has been successfully added and recall to the user to update his API key from the agent configuration\"",
36
36
  "input": { "comment": "{{request.body.prompt}}" }
37
37
  }
38
38
  }
@@ -3,7 +3,7 @@
3
3
  "description": "Adding a new digipair.",
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
  "summary": "Adding a reasoning",
4
4
  "library": "@digipair/skill-chatbot",
5
5
  "element": "boost",
6
- "metadata": { "standalone": false },
6
+ "metadata": { "standalone": false, "selector": "any", "url": "^$" },
7
7
  "properties": {
8
8
  "steps": [
9
9
  {
@@ -3,7 +3,7 @@
3
3
  "summary": "Duplication the reasoning",
4
4
  "library": "@digipair/skill-chatbot",
5
5
  "element": "boost",
6
- "metadata": { "standalone": false },
6
+ "metadata": { "standalone": false, "selector": "any", "url": "^$" },
7
7
  "properties": {
8
8
  "steps": [
9
9
  {
@@ -3,9 +3,7 @@
3
3
  "description": "Planning a reasonning",
4
4
  "library": "@digipair/skill-chatbot",
5
5
  "element": "boost",
6
- "metadata": {
7
- "standalone": false
8
- },
6
+ "metadata": { "standalone": false, "selector": "any", "url": "^$" },
9
7
  "properties": {
10
8
  "steps": [
11
9
  {
@@ -39,3 +39,4 @@
39
39
  "variables": {},
40
40
  "privates": {}
41
41
  }
42
+ π
@@ -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.\" userQuestion:string -> answer: string \"Assistant answer\"",
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": "@digipair/skill-chatbot",
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
  ]
@@ -5,6 +5,7 @@
5
5
  "element": "page",
6
6
  "metadata": {},
7
7
  "properties": {
8
+ "confirmBeforeUnload": "true",
8
9
  "body": [
9
10
  {
10
11
  "library": "@digipair/skill-web-spectrum",
@@ -5,6 +5,7 @@
5
5
  "element": "page",
6
6
  "metadata": {},
7
7
  "properties": {
8
+ "confirmBeforeUnload": "true",
8
9
  "body": [
9
10
  {
10
11
  "library": "@digipair/skill-web-spectrum",
@@ -11,7 +11,5 @@
11
11
  "@digipair/skill-debug": "latest"
12
12
  },
13
13
  "variables": {},
14
- "privates": {
15
- "MODEL_DSP": [{ "library": "@digipair/skill-dsp", "element": "modelOpenAI" }]
16
- }
14
+ "privates": {}
17
15
  }
@@ -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
+ }
@@ -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.\" userQuestion:string -> answer: string \"Assistant answer\"",
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": "@digipair/skill-chatbot",
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.\" userQuestion:string -> answer: string \"Assistant answer\"",
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": "@digipair/skill-chatbot",
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.\" userQuestion:string -> answer: string \"Assistant answer\"",
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": "@digipair/skill-chatbot",
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.\" userQuestion:string -> answer: string \"Assistant answer\"",
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": "@digipair/skill-chatbot",
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.\" userQuestion:string -> answer: string \"Assistant answer\"",
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": "@digipair/skill-chatbot",
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
  ]