digipair 0.0.1

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.
Files changed (33) hide show
  1. package/assets/default/avatar.png +0 -0
  2. package/assets/default/chat.json +18 -0
  3. package/assets/default/config.json +27 -0
  4. package/assets/default/conversation.json +26 -0
  5. package/assets/default/history.json +23 -0
  6. package/assets/digipairs/admin/avatar.png +0 -0
  7. package/assets/digipairs/admin/boost-add-reasoning.json +54 -0
  8. package/assets/digipairs/admin/boost-duplicate-reasoning.json +62 -0
  9. package/assets/digipairs/admin/boost-plan-reasoning.json +46 -0
  10. package/assets/digipairs/admin/chat.json +18 -0
  11. package/assets/digipairs/admin/config.json +34 -0
  12. package/assets/digipairs/admin/conversation.json +26 -0
  13. package/assets/digipairs/admin/digipair-list.json +465 -0
  14. package/assets/digipairs/admin/history.json +23 -0
  15. package/assets/digipairs/admin/json-editor.json +221 -0
  16. package/assets/digipairs/admin/reasoning-editor.json +225 -0
  17. package/assets/digipairs/admin/reasoning-list.json +762 -0
  18. package/assets/digipairs/common/avatar.png +0 -0
  19. package/assets/digipairs/common/boosts.json +18 -0
  20. package/assets/digipairs/common/config.json +10 -0
  21. package/assets/digipairs/common/metadata.json +18 -0
  22. package/assets/digipairs/planning.json +0 -0
  23. package/assets/domains.json +1 -0
  24. package/bin/digipair.js +3 -0
  25. package/package.json +43 -0
  26. package/src/app/app.controller.js +55 -0
  27. package/src/app/app.controller.js.map +1 -0
  28. package/src/app/app.module.js +18 -0
  29. package/src/app/app.module.js.map +1 -0
  30. package/src/app/app.service.js +63 -0
  31. package/src/app/app.service.js.map +1 -0
  32. package/src/main.js +65 -0
  33. package/src/main.js.map +1 -0
Binary file
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "Chatbot",
3
+ "description": "Chatbot",
4
+ "library": "@digipair/skill-web",
5
+ "element": "page",
6
+ "metadata": {},
7
+ "properties": {
8
+ "body": [
9
+ {
10
+ "library": "@digipair/skill-web-chatbot",
11
+ "element": "digipair-chatbot-full",
12
+ "properties": { "code": "admin", "apiUrl": "" }
13
+ }
14
+ ],
15
+ "styleBody": "background-color:#212E3C;"
16
+ },
17
+ "pins": []
18
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "<%= name %>",
3
+ "description": "<%= description %>",
4
+ "metadata": {
5
+ "avatar": "avatar.png",
6
+ "primary": "#51E0DC",
7
+ "textPrimary": "#242E3B",
8
+ "secondary": "#242E3B",
9
+ "textSecondary": "#FFFFFF"
10
+ },
11
+ "libraries": {
12
+ "@digipair/skill-service": "latest",
13
+ "@digipair/skill-chatbot": "latest",
14
+ "@digipair/skill-cron": "latest",
15
+ "@digipair/skill-dsp": "latest",
16
+ "@digipair/skill-web": "latest",
17
+ "@digipair/skill-data-management": "latest",
18
+ "@digipair/skill-web-chatbot": "latest",
19
+ "@digipair/skill-web-factory": "latest",
20
+ "@digipair/skill-web-inputs": "latest",
21
+ "@digipair/skill-web-interact": "latest"
22
+ },
23
+ "variables": {},
24
+ "privates": {
25
+ "MODEL_DSP": [{ "library": "@digipair/skill-dsp", "element": "modelOpenAI" }]
26
+ }
27
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "Conversation",
3
+ "description": "Generating a response for the user via the chatbot.",
4
+ "library": "@digipair/skill-chatbot",
5
+ "element": "boost",
6
+ "metadata": { "boosts": [] },
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-dsp",
11
+ "element": "agent",
12
+ "properties": {
13
+ "name": "Admin",
14
+ "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.\"",
15
+ "signature": "\"Provide a very short, precise, and concise answer in French to the user's question using only your knowledge base.\" userQuestion:string -> answer: string \"Assistant answer\""
16
+ }
17
+ },
18
+ {
19
+ "library": "@digipair/skill-chatbot",
20
+ "element": "answer",
21
+ "properties": { "assistant": "{{previous.assistant.content}}" }
22
+ }
23
+ ]
24
+ },
25
+ "pins": []
26
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "History",
3
+ "description": "Return the start conversation history.",
4
+ "metadata": {},
5
+ "library": "@digipair/skill-service",
6
+ "element": "service",
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-data-management",
11
+ "element": "transform",
12
+ "properties": {
13
+ "value": [
14
+ {
15
+ "role": "assistant",
16
+ "content": "Welcome! How may I assist you today?"
17
+ }
18
+ ]
19
+ }
20
+ }
21
+ ]
22
+ }
23
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "Adding a reasoning",
3
+ "description": "Adding a new reasoning.",
4
+ "library": "@digipair/skill-chatbot",
5
+ "element": "boost",
6
+ "metadata": { "boosts": [] },
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-data-management",
11
+ "element": "setVariable",
12
+ "properties": {
13
+ "name": "infos",
14
+ "execute": [
15
+ {
16
+ "library": "@digipair/skill-dsp",
17
+ "element": "generate",
18
+ "properties": {
19
+ "signature": "\"Extract the information for creating the reasoning from the user's comment\" comment:string \"User's comment describing the reasoning to create\" -> id:string \"reasoning identifier in kebab case\", name:string \"Very short name of the reasoning\", description:string \"Short description of the reasoning\", assistant:string \"Assistant's response in French to confirm that the reasoning has been successfully added\"",
20
+ "input": { "comment": "{{request.body.prompt}}" }
21
+ }
22
+ }
23
+ ]
24
+ }
25
+ },
26
+ {
27
+ "library": "@digipair/skill-editor",
28
+ "element": "setReasoning",
29
+ "properties": {
30
+ "digipair": "{{request.body.digipair}}",
31
+ "reasoning": "EVALUATE:\nif request.body.element = \"boost\" then \n concatenate(\"boost-\", variables.infos.id) \nelse \n variables.infos.id",
32
+ "value": {
33
+ "name": "{{variables.infos.name}}",
34
+ "description": "{{variables.infos.description}}",
35
+ "library": "{{request.body.library}}",
36
+ "element": "{{request.body.element}}",
37
+ "properties": {},
38
+ "pins": [],
39
+ "metadata": {}
40
+ }
41
+ }
42
+ },
43
+ {
44
+ "library": "@digipair/skill-chatbot",
45
+ "element": "answer",
46
+ "properties": {
47
+ "assistant": "{{variables.infos.assistant}}",
48
+ "command": [{ "library": "@digipair/skill-web-interact", "element": "reload" }]
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ "pins": []
54
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "Duplication of reasoning",
3
+ "description": "This action allows for duplicating an already existing reasoning.",
4
+ "library": "@digipair/skill-chatbot",
5
+ "element": "boost",
6
+ "metadata": { "boosts": [] },
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-data-management",
11
+ "element": "setVariable",
12
+ "properties": {
13
+ "name": "infos",
14
+ "execute": [
15
+ {
16
+ "library": "@digipair/skill-dsp",
17
+ "element": "generate",
18
+ "properties": {
19
+ "signature": "\"Extract the information from the duplicated reasoning based on the user's comment.\" comment:string \"User's comment describing the duplicated reasoning\" -> \n id:string \"reasoning identifier in kebab case\", \n name:string \"Very short name of the reasoning\", \n description:string \"Short description of the reasoning \", \n assistant:string \"Assistant's response to confirm that the reasoning has been successfully duplicated\"",
20
+ "input": { "comment": "EVALUATE:request.body.prompt" }
21
+ }
22
+ }
23
+ ]
24
+ }
25
+ },
26
+ {
27
+ "library": "@digipair/skill-editor",
28
+ "element": "reasoning",
29
+ "properties": {
30
+ "digipair": "{{request.body.digipair}}",
31
+ "reasoning": "{{request.body.reasoning}}"
32
+ }
33
+ },
34
+ {
35
+ "library": "@digipair/skill-editor",
36
+ "element": "setReasoning",
37
+ "properties": {
38
+ "digipair": "{{request.body.digipair}}",
39
+ "reasoning": "EVALUATE:if previous.element = \"boost\" then \n \"boost-\" + variables.infos.id\nelse \n variables.infos.id",
40
+ "value": {
41
+ "name": "{{variables.infos.name}}",
42
+ "description": "{{variables.infos.description}}",
43
+ "library": "{{previous.library}}",
44
+ "element": "{{previous.element}}",
45
+ "properties": "EVALUATE:previous.properties",
46
+ "pins": "EVALUATE:previous.pins",
47
+ "metadata": "EVALUATE:previous.metadata"
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "library": "@digipair/skill-chatbot",
53
+ "element": "answer",
54
+ "properties": {
55
+ "assistant": "{{variables.infos.assistant}}",
56
+ "command": [{ "library": "@digipair/skill-web-interact", "element": "reload" }]
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ "pins": []
62
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "Planning a reasonning",
3
+ "description": "Planning a reasonning",
4
+ "library": "@digipair/skill-chatbot",
5
+ "element": "boost",
6
+ "metadata": { "boosts": [] },
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-data-management",
11
+ "element": "setVariable",
12
+ "properties": {
13
+ "name": "infos",
14
+ "execute": [
15
+ {
16
+ "library": "@digipair/skill-dsp",
17
+ "element": "generate",
18
+ "properties": {
19
+ "signature": "comment:string -> cron:string \"Task scheduling based on the comment\", assistant:string \"Assistant's response to indicate that the task has been successfully scheduled\"",
20
+ "input": { "comment": "EVALUATE:request.body.prompt" }
21
+ }
22
+ }
23
+ ]
24
+ }
25
+ },
26
+ {
27
+ "library": "@digipair/skill-cron",
28
+ "element": "addCron",
29
+ "properties": {
30
+ "time": "{{previous.cron}}",
31
+ "digipair": "{{request.body.digipair}}",
32
+ "reasoning": "{{request.body.reasoning}}"
33
+ }
34
+ },
35
+ {
36
+ "library": "@digipair/skill-chatbot",
37
+ "element": "answer",
38
+ "properties": {
39
+ "assistant": "{{variables.infos.assistant}}",
40
+ "command": [{ "library": "@digipair/skill-web-interact", "element": "reload" }]
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ "pins": []
46
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "Chatbot",
3
+ "description": "Chatbot",
4
+ "library": "@digipair/skill-web",
5
+ "element": "page",
6
+ "metadata": {},
7
+ "properties": {
8
+ "body": [
9
+ {
10
+ "library": "@digipair/skill-web-chatbot",
11
+ "element": "digipair-chatbot-full",
12
+ "properties": { "code": "admin", "apiUrl": "" }
13
+ }
14
+ ],
15
+ "styleBody": "background-color:#212E3C;"
16
+ },
17
+ "pins": []
18
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "Admin",
3
+ "description": "Digipair admin.",
4
+ "metadata": {
5
+ "avatar": "avatar.png",
6
+ "primary": "#51E0DC",
7
+ "textPrimary": "#242E3B",
8
+ "secondary": "#242E3B",
9
+ "textSecondary": "#FFFFFF"
10
+ },
11
+ "libraries": {
12
+ "@digipair/skill-service": "latest",
13
+ "@digipair/skill-chatbot": "latest",
14
+ "@digipair/skill-cron": "latest",
15
+ "@digipair/skill-editor": "latest",
16
+ "@digipair/skill-common": "latest",
17
+ "@digipair/skill-dsp": "latest",
18
+ "@digipair/skill-web": "latest",
19
+ "@digipair/skill-data-management": "latest",
20
+ "@digipair/skill-web-jsoneditor": "latest",
21
+ "@digipair/skill-web-notification": "latest",
22
+ "@digipair/skill-web-chatbot": "latest",
23
+ "@digipair/skill-web-editor": "latest",
24
+ "@digipair/skill-web-factory": "latest",
25
+ "@digipair/skill-web-inputs": "latest",
26
+ "@digipair/skill-web-spectrum": "latest",
27
+ "@digipair/skill-web-interact": "latest",
28
+ "@digipair/skill-web-font-awesome": "latest"
29
+ },
30
+ "variables": {},
31
+ "privates": {
32
+ "MODEL_DSP": [{ "library": "@digipair/skill-dsp", "element": "modelOpenAI" }]
33
+ }
34
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "Conversation",
3
+ "description": "Generating a response for the user via the chatbot.",
4
+ "library": "@digipair/skill-chatbot",
5
+ "element": "boost",
6
+ "metadata": { "boosts": [] },
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-dsp",
11
+ "element": "agent",
12
+ "properties": {
13
+ "name": "Admin",
14
+ "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.\"",
15
+ "signature": "\"Provide a very short, precise, and concise answer in French to the user's question using only your knowledge base.\" userQuestion:string -> answer: string \"Assistant answer\""
16
+ }
17
+ },
18
+ {
19
+ "library": "@digipair/skill-chatbot",
20
+ "element": "answer",
21
+ "properties": { "assistant": "{{previous.assistant.content}}" }
22
+ }
23
+ ]
24
+ },
25
+ "pins": []
26
+ }