@digipair/skill-chatbot 0.33.0 → 0.33.2
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/index.cjs.js +6 -2
- package/index.esm.js +6 -2
- package/libs/skill-chatbot/src/lib/skill-chatbot.d.ts +4 -0
- package/package.json +1 -1
- package/schema.fr.json +66 -25
- package/schema.json +66 -25
package/index.cjs.js
CHANGED
@@ -17,13 +17,17 @@ function _extends() {
|
|
17
17
|
|
18
18
|
let ChatbotService = class ChatbotService {
|
19
19
|
async answer(params, _pinsSettingsList, context) {
|
20
|
-
const { command = [], boosts = [],
|
20
|
+
const { command = [], boosts = [], sources = [], assistant, logs, boost, parent_conversation, parent_history, uuid } = params;
|
21
21
|
return {
|
22
22
|
assistant,
|
23
23
|
command: await Promise.all(command.map((settings)=>engine.preparePinsSettings(settings, context))),
|
24
24
|
boosts,
|
25
25
|
sources,
|
26
|
-
logs
|
26
|
+
logs,
|
27
|
+
boost,
|
28
|
+
parent_conversation,
|
29
|
+
parent_history,
|
30
|
+
uuid
|
27
31
|
};
|
28
32
|
}
|
29
33
|
async execute(params, _pinsSettingsList, context) {
|
package/index.esm.js
CHANGED
@@ -13,13 +13,17 @@ function _extends() {
|
|
13
13
|
|
14
14
|
let ChatbotService = class ChatbotService {
|
15
15
|
async answer(params, _pinsSettingsList, context) {
|
16
|
-
const { command = [], boosts = [],
|
16
|
+
const { command = [], boosts = [], sources = [], assistant, logs, boost, parent_conversation, parent_history, uuid } = params;
|
17
17
|
return {
|
18
18
|
assistant,
|
19
19
|
command: await Promise.all(command.map((settings)=>preparePinsSettings(settings, context))),
|
20
20
|
boosts,
|
21
21
|
sources,
|
22
|
-
logs
|
22
|
+
logs,
|
23
|
+
boost,
|
24
|
+
parent_conversation,
|
25
|
+
parent_history,
|
26
|
+
uuid
|
23
27
|
};
|
24
28
|
}
|
25
29
|
async execute(params, _pinsSettingsList, context) {
|
@@ -5,6 +5,10 @@ export declare const answer: (params: any, pinsSettingsList: PinsSettings[], con
|
|
5
5
|
boosts: any;
|
6
6
|
sources: any;
|
7
7
|
logs: any;
|
8
|
+
boost: any;
|
9
|
+
parent_conversation: any;
|
10
|
+
parent_history: any;
|
11
|
+
uuid: any;
|
8
12
|
}>;
|
9
13
|
export declare const execute: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
10
14
|
export declare const boost: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
"parameters": [
|
16
16
|
{
|
17
17
|
"name": "assistant",
|
18
|
+
"summary": "Réponse",
|
18
19
|
"required": true,
|
19
20
|
"description": "Reponse de l'assistant",
|
20
21
|
"schema": {
|
@@ -23,6 +24,7 @@
|
|
23
24
|
},
|
24
25
|
{
|
25
26
|
"name": "command",
|
27
|
+
"summary": "Commandes",
|
26
28
|
"required": false,
|
27
29
|
"description": "Commandes exécutées sur le chatbot",
|
28
30
|
"schema": {
|
@@ -34,6 +36,7 @@
|
|
34
36
|
},
|
35
37
|
{
|
36
38
|
"name": "boosts",
|
39
|
+
"summary": "Proposition de boosts",
|
37
40
|
"required": false,
|
38
41
|
"description": "Liste des boosts proposés",
|
39
42
|
"schema": {
|
@@ -42,22 +45,60 @@
|
|
42
45
|
},
|
43
46
|
{
|
44
47
|
"name": "sources",
|
48
|
+
"summary": "Liste des sources",
|
45
49
|
"required": false,
|
46
50
|
"description": "Liste des sources utilisées pour répondre a l'utilisateur",
|
47
51
|
"schema": {
|
48
|
-
"type": "
|
49
|
-
"items": {
|
50
|
-
"type": "object"
|
51
|
-
}
|
52
|
+
"type": "object"
|
52
53
|
}
|
53
54
|
},
|
54
55
|
{
|
55
56
|
"name": "logs",
|
57
|
+
"summary": "Logs",
|
56
58
|
"required": false,
|
57
59
|
"description": "Informations utiles pour débogguer le raisonnement",
|
58
60
|
"schema": {
|
59
61
|
"type": "object"
|
60
62
|
}
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "boost",
|
66
|
+
"summary": "Boost",
|
67
|
+
"required": false,
|
68
|
+
"description": "Boost à executer en réponse à ce message",
|
69
|
+
"schema": {
|
70
|
+
"type": "array",
|
71
|
+
"items": {
|
72
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"name": "parent_conversation",
|
78
|
+
"summary": "Conversation parent",
|
79
|
+
"required": false,
|
80
|
+
"description": "Conversation parent",
|
81
|
+
"schema": {
|
82
|
+
"type": "string"
|
83
|
+
}
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"name": "parent_history",
|
87
|
+
"summary": "Message parent",
|
88
|
+
"required": false,
|
89
|
+
"description": "Conversation parent",
|
90
|
+
"schema": {
|
91
|
+
"type": "string"
|
92
|
+
}
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"name": "uuid",
|
96
|
+
"summary": "Identifiant",
|
97
|
+
"required": false,
|
98
|
+
"description": "Identifiant du message",
|
99
|
+
"schema": {
|
100
|
+
"type": "string"
|
101
|
+
}
|
61
102
|
}
|
62
103
|
],
|
63
104
|
"x-events": []
|
@@ -85,10 +126,29 @@
|
|
85
126
|
},
|
86
127
|
"components": {
|
87
128
|
"schemas": {
|
88
|
-
"
|
129
|
+
"Step": {
|
89
130
|
"type": "object",
|
90
131
|
"tags": ["boost"],
|
91
|
-
"summary": "
|
132
|
+
"summary": "Etape",
|
133
|
+
"properties": {
|
134
|
+
"name": {
|
135
|
+
"summary": "Nom de l'étape",
|
136
|
+
"type": "string"
|
137
|
+
},
|
138
|
+
"execute": {
|
139
|
+
"summary": "Actions à exécuter",
|
140
|
+
"type": "array",
|
141
|
+
"items": {
|
142
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
143
|
+
}
|
144
|
+
}
|
145
|
+
},
|
146
|
+
"required": ["name", "execute"]
|
147
|
+
},
|
148
|
+
"Boost": {
|
149
|
+
"type": "object",
|
150
|
+
"tags": ["boost"],
|
151
|
+
"summary": "Boost",
|
92
152
|
"properties": {
|
93
153
|
"prompt": {
|
94
154
|
"type": "boolean"
|
@@ -113,25 +173,6 @@
|
|
113
173
|
}
|
114
174
|
},
|
115
175
|
"required": []
|
116
|
-
},
|
117
|
-
"Step": {
|
118
|
-
"type": "object",
|
119
|
-
"tags": ["boost"],
|
120
|
-
"summary": "Etape",
|
121
|
-
"properties": {
|
122
|
-
"name": {
|
123
|
-
"summary": "Nom de l'étape",
|
124
|
-
"type": "string"
|
125
|
-
},
|
126
|
-
"execute": {
|
127
|
-
"summary": "Actions à exécuter",
|
128
|
-
"type": "array",
|
129
|
-
"items": {
|
130
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
131
|
-
}
|
132
|
-
}
|
133
|
-
},
|
134
|
-
"required": ["name", "execute"]
|
135
176
|
}
|
136
177
|
}
|
137
178
|
},
|
package/schema.json
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
"parameters": [
|
16
16
|
{
|
17
17
|
"name": "assistant",
|
18
|
+
"summary": "Response",
|
18
19
|
"required": true,
|
19
20
|
"description": "Assistant's response",
|
20
21
|
"schema": {
|
@@ -23,6 +24,7 @@
|
|
23
24
|
},
|
24
25
|
{
|
25
26
|
"name": "command",
|
27
|
+
"summary": "Commands",
|
26
28
|
"required": false,
|
27
29
|
"description": "Commands executed on the chatbot",
|
28
30
|
"schema": {
|
@@ -34,6 +36,7 @@
|
|
34
36
|
},
|
35
37
|
{
|
36
38
|
"name": "boosts",
|
39
|
+
"summary": "Proposed boosts",
|
37
40
|
"required": false,
|
38
41
|
"description": "List of proposed boosts",
|
39
42
|
"schema": {
|
@@ -42,22 +45,60 @@
|
|
42
45
|
},
|
43
46
|
{
|
44
47
|
"name": "sources",
|
48
|
+
"summary": "List of sources",
|
45
49
|
"required": false,
|
46
50
|
"description": "List of sources used to respond to the user",
|
47
51
|
"schema": {
|
48
|
-
"type": "
|
49
|
-
"items": {
|
50
|
-
"type": "object"
|
51
|
-
}
|
52
|
+
"type": "object"
|
52
53
|
}
|
53
54
|
},
|
54
55
|
{
|
55
56
|
"name": "logs",
|
57
|
+
"summary": "Logs",
|
56
58
|
"required": false,
|
57
59
|
"description": "Useful information for debugging reasoning",
|
58
60
|
"schema": {
|
59
61
|
"type": "object"
|
60
62
|
}
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "boost",
|
66
|
+
"summary": "Boost",
|
67
|
+
"required": false,
|
68
|
+
"description": "Boost to execute in response to this message",
|
69
|
+
"schema": {
|
70
|
+
"type": "array",
|
71
|
+
"items": {
|
72
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"name": "parent_conversation",
|
78
|
+
"summary": "Parent conversation",
|
79
|
+
"required": false,
|
80
|
+
"description": "Parent conversation",
|
81
|
+
"schema": {
|
82
|
+
"type": "string"
|
83
|
+
}
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"name": "parent_history",
|
87
|
+
"summary": "Parent message",
|
88
|
+
"required": false,
|
89
|
+
"description": "Parent conversation",
|
90
|
+
"schema": {
|
91
|
+
"type": "string"
|
92
|
+
}
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"name": "uuid",
|
96
|
+
"summary": "Identifier",
|
97
|
+
"required": false,
|
98
|
+
"description": "Message identifier",
|
99
|
+
"schema": {
|
100
|
+
"type": "string"
|
101
|
+
}
|
61
102
|
}
|
62
103
|
],
|
63
104
|
"x-events": []
|
@@ -85,10 +126,29 @@
|
|
85
126
|
},
|
86
127
|
"components": {
|
87
128
|
"schemas": {
|
88
|
-
"
|
129
|
+
"Step": {
|
89
130
|
"type": "object",
|
90
131
|
"tags": ["boost"],
|
91
|
-
"summary": "
|
132
|
+
"summary": "Step",
|
133
|
+
"properties": {
|
134
|
+
"name": {
|
135
|
+
"summary": "Step name",
|
136
|
+
"type": "string"
|
137
|
+
},
|
138
|
+
"execute": {
|
139
|
+
"summary": "Actions to execute",
|
140
|
+
"type": "array",
|
141
|
+
"items": {
|
142
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
143
|
+
}
|
144
|
+
}
|
145
|
+
},
|
146
|
+
"required": ["name", "execute"]
|
147
|
+
},
|
148
|
+
"Boost": {
|
149
|
+
"type": "object",
|
150
|
+
"tags": ["boost"],
|
151
|
+
"summary": "Boost",
|
92
152
|
"properties": {
|
93
153
|
"prompt": {
|
94
154
|
"type": "boolean"
|
@@ -113,25 +173,6 @@
|
|
113
173
|
}
|
114
174
|
},
|
115
175
|
"required": []
|
116
|
-
},
|
117
|
-
"Step": {
|
118
|
-
"type": "object",
|
119
|
-
"tags": ["boost"],
|
120
|
-
"summary": "Step",
|
121
|
-
"properties": {
|
122
|
-
"name": {
|
123
|
-
"summary": "Step name",
|
124
|
-
"type": "string"
|
125
|
-
},
|
126
|
-
"execute": {
|
127
|
-
"summary": "Actions to execute",
|
128
|
-
"type": "array",
|
129
|
-
"items": {
|
130
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
131
|
-
}
|
132
|
-
}
|
133
|
-
},
|
134
|
-
"required": ["name", "execute"]
|
135
176
|
}
|
136
177
|
}
|
137
178
|
},
|