@shun-js/aibaiban-server 1.0.3 → 1.0.4
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 +2 -2
- package/server/util/prompt-agent.js +5 -16
- package/views/index.html +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shun-js/aibaiban-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "aibaiban.com server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai aibaiban"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public",
|
|
45
45
|
"registry": "https://registry.npmjs.org/"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9e55cb650198206e7f85818beb61fe686d93dc2c"
|
|
48
48
|
}
|
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
/**
|
|
8
8
|
* 意图分类 - 判断是否与白板相关
|
|
9
9
|
*/
|
|
10
|
-
ROUTER_PROMPT: `你是一个意图分类器。判断用户输入是否与"
|
|
10
|
+
ROUTER_PROMPT: `你是一个意图分类器。判断用户输入是否与"画图/白板/图表/流程图/时序图/类图/ER图"相关。
|
|
11
11
|
|
|
12
12
|
用户输入: {input}
|
|
13
13
|
|
|
@@ -19,16 +19,12 @@ module.exports = {
|
|
|
19
19
|
CLASSIFY_PROMPT: `你是一个图表类型分析专家。根据用户需求,判断最适合的图表类型。
|
|
20
20
|
|
|
21
21
|
可选类型:
|
|
22
|
-
- flowchart:
|
|
22
|
+
- flowchart: 流程图、步骤图、决策流程、思维导图、甘特图等通用图表
|
|
23
23
|
- sequence: 时序图、交互流程、调用链
|
|
24
24
|
- classDiagram: 类图、对象关系、继承结构
|
|
25
|
-
- stateDiagram: 状态图、状态机、状态流转
|
|
26
25
|
- erDiagram: ER图、实体关系图、数据库设计
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- gitGraph: Git分支图、版本管理流程
|
|
30
|
-
- journey: 用户旅程图、体验地图
|
|
31
|
-
- mindmap: 思维导图、知识结构
|
|
26
|
+
|
|
27
|
+
注意: 只能从以上4种类型中选择。如果用户需求不完全匹配,选择最接近的类型(如思维导图用flowchart,状态图用flowchart)。
|
|
32
28
|
|
|
33
29
|
用户输入: {input}
|
|
34
30
|
|
|
@@ -47,13 +43,7 @@ module.exports = {
|
|
|
47
43
|
- flowchart: {"nodes": [...], "edges": [...]}
|
|
48
44
|
- sequence: {"participants": [...], "messages": [...]}
|
|
49
45
|
- classDiagram: {"classes": [{"name": "", "attributes": [...], "methods": [...]}], "relations": [...]}
|
|
50
|
-
- stateDiagram: {"states": [...], "transitions": [...]}
|
|
51
46
|
- erDiagram: {"entities": [{"name": "", "attributes": [...]}], "relations": [...]}
|
|
52
|
-
- gantt: {"tasks": [{"name": "", "start": "", "duration": ""}]}
|
|
53
|
-
- pie: {"title": "", "slices": [{"label": "", "value": 0}]}
|
|
54
|
-
- gitGraph: {"branches": [...], "commits": [...], "merges": [...]}
|
|
55
|
-
- journey: {"title": "", "sections": [{"name": "", "tasks": [{"name": "", "score": 0}]}]}
|
|
56
|
-
- mindmap: {"root": "", "children": [...]}
|
|
57
47
|
|
|
58
48
|
只回复 JSON。`,
|
|
59
49
|
|
|
@@ -101,6 +91,5 @@ module.exports = {
|
|
|
101
91
|
/**
|
|
102
92
|
* 非白板请求的固定回复
|
|
103
93
|
*/
|
|
104
|
-
FIXED_REPLY:
|
|
105
|
-
'我是一个白板助手,专门帮你生成各种图表。支持:流程图、时序图、类图、状态图、ER图、甘特图、饼图、Git分支图、用户旅程图、思维导图。请告诉我你想画什么图吧!',
|
|
94
|
+
FIXED_REPLY: '我是一个白板助手,专门帮你生成各种图表。支持:流程图、时序图、类图、ER图。请告诉我你想画什么图吧!',
|
|
106
95
|
};
|
package/views/index.html
CHANGED
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<script
|
|
110
110
|
type="module"
|
|
111
111
|
crossorigin
|
|
112
|
-
src="https://static-small.vincentqiao.com/aibaiban/static/index-
|
|
112
|
+
src="https://static-small.vincentqiao.com/aibaiban/static/index-Nr2tpEOY.js"
|
|
113
113
|
></script>
|
|
114
114
|
<link
|
|
115
115
|
rel="modulepreload"
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
<link
|
|
135
135
|
rel="modulepreload"
|
|
136
136
|
crossorigin
|
|
137
|
-
href="https://static-small.vincentqiao.com/aibaiban/static/chunks/excalidraw-
|
|
137
|
+
href="https://static-small.vincentqiao.com/aibaiban/static/chunks/excalidraw-BE0oQTrv.js"
|
|
138
138
|
/>
|
|
139
139
|
<link
|
|
140
140
|
rel="stylesheet"
|