@digipair/skill-chatbot 0.133.1 → 0.134.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/dist/index.cjs.js CHANGED
@@ -4,7 +4,7 @@ var engine = require('@digipair/engine');
4
4
 
5
5
  let ChatbotService = class ChatbotService {
6
6
  async answer(params, _pinsSettingsList, context) {
7
- const { command = [], boosts = [], sources = [], agent_history = [], files = [], assistant, logs, boost, parent_conversation, parent_history, session, uuid } = params;
7
+ const { command = [], boosts = [], sources = [], agent_history = [], files = [], assistant, logs, boost, parent_history, session, uuid } = params;
8
8
  return {
9
9
  assistant,
10
10
  command: await Promise.all(command.map((settings)=>engine.preparePinsSettings(settings, context))),
@@ -17,7 +17,6 @@ let ChatbotService = class ChatbotService {
17
17
  ...boost,
18
18
  inputs: await Promise.all((boost.inputs || []).map((settings)=>engine.preparePinsSettings(settings, context)))
19
19
  } : boost,
20
- parent_conversation,
21
20
  parent_history,
22
21
  session,
23
22
  uuid
package/dist/index.esm.js CHANGED
@@ -2,7 +2,7 @@ import { preparePinsSettings, executePinsList } from '@digipair/engine';
2
2
 
3
3
  let ChatbotService = class ChatbotService {
4
4
  async answer(params, _pinsSettingsList, context) {
5
- const { command = [], boosts = [], sources = [], agent_history = [], files = [], assistant, logs, boost, parent_conversation, parent_history, session, uuid } = params;
5
+ const { command = [], boosts = [], sources = [], agent_history = [], files = [], assistant, logs, boost, parent_history, session, uuid } = params;
6
6
  return {
7
7
  assistant,
8
8
  command: await Promise.all(command.map((settings)=>preparePinsSettings(settings, context))),
@@ -15,7 +15,6 @@ let ChatbotService = class ChatbotService {
15
15
  ...boost,
16
16
  inputs: await Promise.all((boost.inputs || []).map((settings)=>preparePinsSettings(settings, context)))
17
17
  } : boost,
18
- parent_conversation,
19
18
  parent_history,
20
19
  session,
21
20
  uuid
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/answer": {
12
12
  "post": {
13
- "tags": [
14
- "boost"
15
- ],
13
+ "tags": ["boost"],
16
14
  "summary": "Réponse du chatbot",
17
15
  "parameters": [
18
16
  {
@@ -90,15 +88,6 @@
90
88
  "type": "object"
91
89
  }
92
90
  },
93
- {
94
- "name": "parent_conversation",
95
- "summary": "Conversation parent",
96
- "required": false,
97
- "description": "Conversation parent",
98
- "schema": {
99
- "type": "string"
100
- }
101
- },
102
91
  {
103
92
  "name": "parent_history",
104
93
  "summary": "Message parent",
@@ -170,10 +159,6 @@
170
159
  "nullable": true,
171
160
  "description": "Configuration du boost"
172
161
  },
173
- "parent_conversation": {
174
- "type": "string",
175
- "description": "ID de la conversation parente"
176
- },
177
162
  "parent_history": {
178
163
  "type": "string",
179
164
  "description": "ID du message parent"
@@ -196,9 +181,7 @@
196
181
  },
197
182
  "/execute": {
198
183
  "post": {
199
- "tags": [
200
- "boost"
201
- ],
184
+ "tags": ["boost"],
202
185
  "summary": "Execute une étape",
203
186
  "description": "Execute une étape d'un boost",
204
187
  "parameters": [
@@ -227,15 +210,34 @@
227
210
  }
228
211
  }
229
212
  }
213
+ },
214
+ "/boost": {
215
+ "post": {
216
+ "summary": "Boost",
217
+ "description": "Boost proposé par le Digipair",
218
+ "tags": ["boost", "service"],
219
+ "parameters": [
220
+ {
221
+ "name": "steps",
222
+ "summary": "Exécute les étapes suivantes",
223
+ "required": true,
224
+ "description": "Exécute les étapes définies",
225
+ "schema": {
226
+ "type": "array",
227
+ "items": {
228
+ "$ref": "#/components/schemas/Step"
229
+ }
230
+ }
231
+ }
232
+ ]
233
+ }
230
234
  }
231
235
  },
232
236
  "components": {
233
237
  "schemas": {
234
238
  "Step": {
235
239
  "type": "object",
236
- "tags": [
237
- "boost"
238
- ],
240
+ "tags": ["boost"],
239
241
  "summary": "Etape",
240
242
  "properties": {
241
243
  "name": {
@@ -250,16 +252,11 @@
250
252
  }
251
253
  }
252
254
  },
253
- "required": [
254
- "name",
255
- "execute"
256
- ]
255
+ "required": ["name", "execute"]
257
256
  },
258
257
  "Boost": {
259
258
  "type": "object",
260
- "tags": [
261
- "boost"
262
- ],
259
+ "tags": ["boost"],
263
260
  "summary": "Boost",
264
261
  "properties": {
265
262
  "prompt": {
@@ -288,9 +285,7 @@
288
285
  },
289
286
  "ContextParameter": {
290
287
  "type": "object",
291
- "tags": [
292
- "service"
293
- ],
288
+ "tags": ["service"],
294
289
  "summary": "Parametre de contexte",
295
290
  "properties": {
296
291
  "name": {
@@ -314,12 +309,7 @@
314
309
  "type": "string"
315
310
  }
316
311
  },
317
- "required": [
318
- "name",
319
- "summary",
320
- "required",
321
- "schema"
322
- ]
312
+ "required": ["name", "summary", "required", "schema"]
323
313
  }
324
314
  }
325
315
  },
@@ -327,10 +317,7 @@
327
317
  "/boost": {
328
318
  "summary": "Boost",
329
319
  "description": "Boost proposé par le Digipair",
330
- "tags": [
331
- "boost",
332
- "service"
333
- ],
320
+ "tags": ["boost", "service"],
334
321
  "metadata": [
335
322
  {
336
323
  "name": "standalone",
@@ -388,4 +375,4 @@
388
375
  ]
389
376
  }
390
377
  }
391
- }
378
+ }
package/dist/schema.json CHANGED
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/answer": {
12
12
  "post": {
13
- "tags": [
14
- "boost"
15
- ],
13
+ "tags": ["boost"],
16
14
  "summary": "Chatbot response",
17
15
  "parameters": [
18
16
  {
@@ -90,15 +88,6 @@
90
88
  "type": "object"
91
89
  }
92
90
  },
93
- {
94
- "name": "parent_conversation",
95
- "summary": "Parent conversation",
96
- "required": false,
97
- "description": "Parent conversation",
98
- "schema": {
99
- "type": "string"
100
- }
101
- },
102
91
  {
103
92
  "name": "parent_history",
104
93
  "summary": "Parent message",
@@ -170,10 +159,6 @@
170
159
  "nullable": true,
171
160
  "description": "Boost configuration"
172
161
  },
173
- "parent_conversation": {
174
- "type": "string",
175
- "description": "Parent conversation ID"
176
- },
177
162
  "parent_history": {
178
163
  "type": "string",
179
164
  "description": "Parent message ID"
@@ -196,9 +181,7 @@
196
181
  },
197
182
  "/execute": {
198
183
  "post": {
199
- "tags": [
200
- "boost"
201
- ],
184
+ "tags": ["boost"],
202
185
  "summary": "Execute a step",
203
186
  "description": "Execute a step of a boost",
204
187
  "parameters": [
@@ -227,15 +210,34 @@
227
210
  }
228
211
  }
229
212
  }
213
+ },
214
+ "/boost": {
215
+ "post": {
216
+ "summary": "Boost",
217
+ "description": "Boost proposed by Digipair",
218
+ "tags": ["boost", "service"],
219
+ "parameters": [
220
+ {
221
+ "name": "steps",
222
+ "summary": "Execute the following steps",
223
+ "required": true,
224
+ "description": "Execute the defined steps",
225
+ "schema": {
226
+ "type": "array",
227
+ "items": {
228
+ "$ref": "#/components/schemas/Step"
229
+ }
230
+ }
231
+ }
232
+ ]
233
+ }
230
234
  }
231
235
  },
232
236
  "components": {
233
237
  "schemas": {
234
238
  "Step": {
235
239
  "type": "object",
236
- "tags": [
237
- "boost"
238
- ],
240
+ "tags": ["boost"],
239
241
  "summary": "Step",
240
242
  "properties": {
241
243
  "name": {
@@ -250,16 +252,11 @@
250
252
  }
251
253
  }
252
254
  },
253
- "required": [
254
- "name",
255
- "execute"
256
- ]
255
+ "required": ["name", "execute"]
257
256
  },
258
257
  "Boost": {
259
258
  "type": "object",
260
- "tags": [
261
- "boost"
262
- ],
259
+ "tags": ["boost"],
263
260
  "summary": "Boost",
264
261
  "properties": {
265
262
  "prompt": {
@@ -288,9 +285,7 @@
288
285
  },
289
286
  "ContextParameter": {
290
287
  "type": "object",
291
- "tags": [
292
- "service"
293
- ],
288
+ "tags": ["service"],
294
289
  "summary": "Context Parameter",
295
290
  "properties": {
296
291
  "name": {
@@ -314,12 +309,7 @@
314
309
  "type": "string"
315
310
  }
316
311
  },
317
- "required": [
318
- "name",
319
- "summary",
320
- "required",
321
- "schema"
322
- ]
312
+ "required": ["name", "summary", "required", "schema"]
323
313
  }
324
314
  }
325
315
  },
@@ -327,10 +317,7 @@
327
317
  "/boost": {
328
318
  "summary": "Boost",
329
319
  "description": "Boost proposed by Digipair",
330
- "tags": [
331
- "boost",
332
- "service"
333
- ],
320
+ "tags": ["boost", "service"],
334
321
  "metadata": [
335
322
  {
336
323
  "name": "standalone",
@@ -388,4 +375,4 @@
388
375
  ]
389
376
  }
390
377
  }
391
- }
378
+ }
@@ -8,7 +8,6 @@ export declare const answer: (params: any, pinsSettingsList: PinsSettings[], con
8
8
  files: any;
9
9
  logs: any;
10
10
  boost: any;
11
- parent_conversation: any;
12
11
  parent_history: any;
13
12
  session: any;
14
13
  uuid: any;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-chatbot.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-chatbot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAwC,MAAM,kBAAkB,CAAC;AA6EtF,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG;;;;;;;;;;;;;EAClB,CAAC;AAEjE,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBAClB,CAAC;AAIlE,eAAO,MAAM,KAAK,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBAClB,CAAC"}
1
+ {"version":3,"file":"skill-chatbot.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-chatbot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAwC,MAAM,kBAAkB,CAAC;AA2EtF,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG;;;;;;;;;;;;EAClB,CAAC;AAEjE,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBAClB,CAAC;AAIlE,eAAO,MAAM,KAAK,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-chatbot",
3
- "version": "0.133.1",
3
+ "version": "0.134.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",