@hddjs/hdd-cloud-types 1.0.14-SNAPSHOT.1 → 1.0.15-SNAPSHOT.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/hdd-ai-cloud/common/IGetRecommendSchool.d.ts +1 -1
- package/hdd-ai-cloud/common/IInquirySession.d.ts +9 -1
- package/hdd-ai-cloud/common/ISessionContent.d.ts +519 -9
- package/hdd-ai-cloud/common/ISseData.d.ts +16 -158
- package/hdd-ai-cloud/controller/getRankInfo.d.ts +51 -0
- package/hdd-ai-cloud/controller/index.d.ts +6 -1
- package/package.json +1 -1
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* 问询会话
|
|
3
3
|
*/
|
|
4
4
|
export interface IInquirySession {
|
|
5
|
+
/**
|
|
6
|
+
* 会话id/主键id
|
|
7
|
+
*/
|
|
8
|
+
sessionId?: string;
|
|
5
9
|
/**
|
|
6
10
|
* 用户id
|
|
7
11
|
*/
|
|
@@ -15,11 +19,15 @@ export interface IInquirySession {
|
|
|
15
19
|
*/
|
|
16
20
|
counselorName?: string;
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* 会话标题
|
|
19
23
|
*/
|
|
20
24
|
sessionTitle?: string;
|
|
21
25
|
/**
|
|
22
26
|
* 当前步骤
|
|
23
27
|
*/
|
|
24
28
|
currentStepId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 创建时间
|
|
31
|
+
*/
|
|
32
|
+
create_time?: number;
|
|
25
33
|
}
|
|
@@ -4,28 +4,538 @@ import { type SessionRoleEnum } from './ISessionRole';
|
|
|
4
4
|
* 会话内容
|
|
5
5
|
*/
|
|
6
6
|
export interface ISessionContent {
|
|
7
|
-
/**
|
|
8
|
-
* sessionId
|
|
9
|
-
*/
|
|
10
|
-
sessionId?: string;
|
|
11
7
|
/**
|
|
12
8
|
* 步骤id
|
|
13
9
|
*/
|
|
14
10
|
stepId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 角色
|
|
13
|
+
*/
|
|
14
|
+
role?: SessionRoleEnum;
|
|
15
|
+
/**
|
|
16
|
+
* ai返回的对话内容
|
|
17
|
+
*/
|
|
18
|
+
assistantMessage?: IAssistantMessage;
|
|
19
|
+
/**
|
|
20
|
+
* 用户内容
|
|
21
|
+
*/
|
|
22
|
+
userMessage?: IUserMessage;
|
|
23
|
+
/**
|
|
24
|
+
* system
|
|
25
|
+
*/
|
|
26
|
+
systemMessage?: ISystemMessage;
|
|
27
|
+
/**
|
|
28
|
+
* 工具信息
|
|
29
|
+
*/
|
|
30
|
+
toolMessage?: IToolMessage;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 系统消息
|
|
35
|
+
*/
|
|
36
|
+
export interface ISystemMessage {
|
|
15
37
|
/**
|
|
16
38
|
* 内容
|
|
17
39
|
*/
|
|
18
40
|
content?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 工具消息类型
|
|
45
|
+
*/
|
|
46
|
+
export const enum IToolTypeEnum {
|
|
19
47
|
/**
|
|
20
|
-
*
|
|
48
|
+
* 文本消息
|
|
21
49
|
*/
|
|
22
|
-
|
|
50
|
+
TextMessage = 'textMessage',
|
|
23
51
|
/**
|
|
24
|
-
*
|
|
52
|
+
* 可视化图表消息
|
|
25
53
|
*/
|
|
26
|
-
|
|
54
|
+
VisualChart = 'visualChart',
|
|
55
|
+
/**
|
|
56
|
+
* 行为动作消息 如结束对话、展示按钮等行为
|
|
57
|
+
*/
|
|
58
|
+
BehaviorAction = 'behaviorAction',
|
|
59
|
+
/**
|
|
60
|
+
* 收集结构化信息
|
|
61
|
+
*/
|
|
62
|
+
CollectStructured = 'collectStructured'
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* ai消息
|
|
67
|
+
*/
|
|
68
|
+
export interface IAssistantMessage {
|
|
69
|
+
/**
|
|
70
|
+
* content:正文, reason:思考
|
|
71
|
+
*/
|
|
72
|
+
type?: 'content' | 'reason';
|
|
73
|
+
/**
|
|
74
|
+
* 内容
|
|
75
|
+
*/
|
|
76
|
+
content?: string;
|
|
77
|
+
/**
|
|
78
|
+
* 思考内容
|
|
79
|
+
*/
|
|
80
|
+
reason?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 用户消息
|
|
85
|
+
*/
|
|
86
|
+
export interface IUserMessage {
|
|
87
|
+
/**
|
|
88
|
+
* 内容
|
|
89
|
+
*/
|
|
90
|
+
content?: string;
|
|
27
91
|
/**
|
|
28
|
-
*
|
|
92
|
+
* 格式化信息,json字符串,前端要json parse一下
|
|
29
93
|
*/
|
|
30
94
|
formatInfo?: string;
|
|
95
|
+
/**
|
|
96
|
+
* 原内容类型,语音、文字、图片
|
|
97
|
+
*/
|
|
98
|
+
oriContentType?: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface IToolMessage {
|
|
102
|
+
/**
|
|
103
|
+
* 工具消息类型
|
|
104
|
+
*/
|
|
105
|
+
type?: IToolTypeEnum;
|
|
106
|
+
/**
|
|
107
|
+
* 工具消息内容
|
|
108
|
+
*/
|
|
109
|
+
content?: string;
|
|
110
|
+
/**
|
|
111
|
+
* 可视化图表数据
|
|
112
|
+
*/
|
|
113
|
+
visualChartData?: IVisualChartData;
|
|
114
|
+
/**
|
|
115
|
+
* 行为动作
|
|
116
|
+
*/
|
|
117
|
+
behaviorAction?: {
|
|
118
|
+
/**
|
|
119
|
+
* 行为动作
|
|
120
|
+
*/
|
|
121
|
+
action?: IBehaviorAction;
|
|
122
|
+
/**
|
|
123
|
+
* 行为动作描述
|
|
124
|
+
*/
|
|
125
|
+
actionDescription?: string;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* 需要收集结构化信息
|
|
129
|
+
*/
|
|
130
|
+
needCollectStructuredInfo?: INeedCollectStructuredInfo;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 系统消息
|
|
135
|
+
*/
|
|
136
|
+
export interface ISystemMessage {}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* uCharts 图表类型
|
|
140
|
+
*/
|
|
141
|
+
export type UChartsType =
|
|
142
|
+
| 'line' // 折线图
|
|
143
|
+
| 'column' // 柱状图
|
|
144
|
+
| 'bar' // 条形图
|
|
145
|
+
| 'area' // 区域图
|
|
146
|
+
| 'pie' // 饼图
|
|
147
|
+
| 'ring' // 环形图
|
|
148
|
+
| 'rose' // 玫瑰图
|
|
149
|
+
| 'radar' // 雷达图
|
|
150
|
+
| 'arcbar' // 圆弧进度条
|
|
151
|
+
| 'gauge' // 仪表盘
|
|
152
|
+
| 'candle' // K线图
|
|
153
|
+
| 'mix' // 混合图
|
|
154
|
+
| 'funnel' // 漏斗图
|
|
155
|
+
| 'map' // 地图
|
|
156
|
+
| 'word' // 词云图
|
|
157
|
+
| 'scatter' // 散点图
|
|
158
|
+
| 'bubble'; // 气泡图
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* uCharts 图表数据 series 项
|
|
162
|
+
*/
|
|
163
|
+
export interface IUChartsSeries {
|
|
164
|
+
/**
|
|
165
|
+
* 系列名称
|
|
166
|
+
*/
|
|
167
|
+
name?: string;
|
|
168
|
+
/**
|
|
169
|
+
* 数据值数组
|
|
170
|
+
*/
|
|
171
|
+
data?: number[] | number;
|
|
172
|
+
/**
|
|
173
|
+
* 系列颜色
|
|
174
|
+
*/
|
|
175
|
+
color?: string;
|
|
176
|
+
/**
|
|
177
|
+
* 图表类型(用于混合图)
|
|
178
|
+
*/
|
|
179
|
+
type?: UChartsType;
|
|
180
|
+
/**
|
|
181
|
+
* 是否在右侧Y轴显示
|
|
182
|
+
*/
|
|
183
|
+
index?: number;
|
|
184
|
+
/**
|
|
185
|
+
* 是否显示数据标签
|
|
186
|
+
*/
|
|
187
|
+
textShow?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* 数据标签字体大小
|
|
190
|
+
*/
|
|
191
|
+
textSize?: number;
|
|
192
|
+
/**
|
|
193
|
+
* 数据标签颜色
|
|
194
|
+
*/
|
|
195
|
+
textColor?: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* uCharts 图表数据
|
|
200
|
+
*/
|
|
201
|
+
export interface IUChartsData {
|
|
202
|
+
/**
|
|
203
|
+
* X轴分类标签
|
|
204
|
+
*/
|
|
205
|
+
categories?: string[];
|
|
206
|
+
/**
|
|
207
|
+
* 数据系列
|
|
208
|
+
*/
|
|
209
|
+
series?: IUChartsSeries[];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* uCharts 配置项
|
|
214
|
+
*/
|
|
215
|
+
export interface IUChartsOpts {
|
|
216
|
+
/**
|
|
217
|
+
* 画布宽度
|
|
218
|
+
*/
|
|
219
|
+
width?: number;
|
|
220
|
+
/**
|
|
221
|
+
* 画布高度
|
|
222
|
+
*/
|
|
223
|
+
height?: number;
|
|
224
|
+
/**
|
|
225
|
+
* 图表标题
|
|
226
|
+
*/
|
|
227
|
+
title?: {
|
|
228
|
+
name?: string;
|
|
229
|
+
fontSize?: number;
|
|
230
|
+
color?: string;
|
|
231
|
+
offsetX?: number;
|
|
232
|
+
offsetY?: number;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* 图表副标题
|
|
236
|
+
*/
|
|
237
|
+
subtitle?: {
|
|
238
|
+
name?: string;
|
|
239
|
+
fontSize?: number;
|
|
240
|
+
color?: string;
|
|
241
|
+
offsetX?: number;
|
|
242
|
+
offsetY?: number;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* 颜色数组
|
|
246
|
+
*/
|
|
247
|
+
color?: string[];
|
|
248
|
+
/**
|
|
249
|
+
* 内边距
|
|
250
|
+
*/
|
|
251
|
+
padding?: [number, number, number, number];
|
|
252
|
+
/**
|
|
253
|
+
* 是否开启动画
|
|
254
|
+
*/
|
|
255
|
+
animation?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* 动画时长(ms)
|
|
258
|
+
*/
|
|
259
|
+
duration?: number;
|
|
260
|
+
/**
|
|
261
|
+
* 是否显示图例
|
|
262
|
+
*/
|
|
263
|
+
legend?: {
|
|
264
|
+
show?: boolean;
|
|
265
|
+
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
266
|
+
float?: 'left' | 'center' | 'right';
|
|
267
|
+
fontSize?: number;
|
|
268
|
+
lineHeight?: number;
|
|
269
|
+
fontColor?: string;
|
|
270
|
+
margin?: number;
|
|
271
|
+
padding?: number;
|
|
272
|
+
itemGap?: number;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* X轴配置
|
|
276
|
+
*/
|
|
277
|
+
xAxis?: {
|
|
278
|
+
disabled?: boolean;
|
|
279
|
+
axisLine?: boolean;
|
|
280
|
+
axisLineColor?: string;
|
|
281
|
+
calibration?: boolean;
|
|
282
|
+
fontColor?: string;
|
|
283
|
+
fontSize?: number;
|
|
284
|
+
rotateLabel?: boolean;
|
|
285
|
+
rotateAngle?: number;
|
|
286
|
+
labelCount?: number;
|
|
287
|
+
itemCount?: number;
|
|
288
|
+
boundaryGap?: 'center' | 'justify';
|
|
289
|
+
disableGrid?: boolean;
|
|
290
|
+
gridColor?: string;
|
|
291
|
+
gridType?: 'solid' | 'dash';
|
|
292
|
+
dashLength?: number;
|
|
293
|
+
gridEval?: number;
|
|
294
|
+
scrollShow?: boolean;
|
|
295
|
+
scrollAlign?: 'left' | 'right';
|
|
296
|
+
scrollColor?: string;
|
|
297
|
+
scrollBackgroundColor?: string;
|
|
298
|
+
format?: string;
|
|
299
|
+
min?: number;
|
|
300
|
+
max?: number;
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Y轴配置
|
|
304
|
+
*/
|
|
305
|
+
yAxis?: {
|
|
306
|
+
disabled?: boolean;
|
|
307
|
+
disableGrid?: boolean;
|
|
308
|
+
splitNumber?: number;
|
|
309
|
+
gridType?: 'solid' | 'dash';
|
|
310
|
+
dashLength?: number;
|
|
311
|
+
gridColor?: string;
|
|
312
|
+
padding?: number;
|
|
313
|
+
showTitle?: boolean;
|
|
314
|
+
data?: {
|
|
315
|
+
min?: number;
|
|
316
|
+
max?: number;
|
|
317
|
+
unit?: string;
|
|
318
|
+
type?: 'value' | 'category';
|
|
319
|
+
disabled?: boolean;
|
|
320
|
+
axisLine?: boolean;
|
|
321
|
+
axisLineColor?: string;
|
|
322
|
+
calibration?: boolean;
|
|
323
|
+
fontColor?: string;
|
|
324
|
+
fontSize?: number;
|
|
325
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
326
|
+
title?: string;
|
|
327
|
+
titleFontSize?: number;
|
|
328
|
+
titleOffsetY?: number;
|
|
329
|
+
titleOffsetX?: number;
|
|
330
|
+
titleFontColor?: string;
|
|
331
|
+
format?: (val: number) => string;
|
|
332
|
+
}[];
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* 额外配置
|
|
336
|
+
*/
|
|
337
|
+
extra?: {
|
|
338
|
+
[key: string]: any;
|
|
339
|
+
line?: {
|
|
340
|
+
type?: 'straight' | 'curve' | 'step';
|
|
341
|
+
width?: number;
|
|
342
|
+
activeType?: 'hollow' | 'solid';
|
|
343
|
+
linearType?: 'none' | 'custom';
|
|
344
|
+
onShadow?: boolean;
|
|
345
|
+
animation?: 'vertical' | 'horizontal';
|
|
346
|
+
};
|
|
347
|
+
column?: {
|
|
348
|
+
type?: 'group' | 'stack';
|
|
349
|
+
width?: number;
|
|
350
|
+
seriesGap?: number;
|
|
351
|
+
categoryGap?: number;
|
|
352
|
+
barBorderCircle?: boolean;
|
|
353
|
+
barBorderRadius?: number[];
|
|
354
|
+
linearType?: 'none' | 'custom';
|
|
355
|
+
linearOpacity?: number;
|
|
356
|
+
customColor?: string[];
|
|
357
|
+
colorStop?: number;
|
|
358
|
+
meterBorder?: number;
|
|
359
|
+
meterFillColor?: string;
|
|
360
|
+
activeBgColor?: string;
|
|
361
|
+
activeBgOpacity?: number;
|
|
362
|
+
meterGap?: number;
|
|
363
|
+
};
|
|
364
|
+
pie?: {
|
|
365
|
+
activeOpacity?: number;
|
|
366
|
+
activeRadius?: number;
|
|
367
|
+
offsetAngle?: number;
|
|
368
|
+
labelWidth?: number;
|
|
369
|
+
ringWidth?: number;
|
|
370
|
+
customRadius?: number;
|
|
371
|
+
border?: boolean;
|
|
372
|
+
borderWidth?: number;
|
|
373
|
+
borderColor?: string;
|
|
374
|
+
linearType?: 'none' | 'custom';
|
|
375
|
+
};
|
|
376
|
+
radar?: {
|
|
377
|
+
gridType?: 'radar' | 'circle';
|
|
378
|
+
gridColor?: string;
|
|
379
|
+
gridCount?: number;
|
|
380
|
+
opacity?: number;
|
|
381
|
+
max?: number;
|
|
382
|
+
labelShow?: boolean;
|
|
383
|
+
border?: boolean;
|
|
384
|
+
labelColor?: string;
|
|
385
|
+
labelPointShow?: boolean;
|
|
386
|
+
labelPointColor?: string;
|
|
387
|
+
};
|
|
388
|
+
gauge?: {
|
|
389
|
+
type?: 'default' | 'progress';
|
|
390
|
+
width?: number;
|
|
391
|
+
splitLine?: {
|
|
392
|
+
fixRadius?: number;
|
|
393
|
+
splitNumber?: number;
|
|
394
|
+
width?: number;
|
|
395
|
+
color?: string;
|
|
396
|
+
childNumber?: number;
|
|
397
|
+
childWidth?: number;
|
|
398
|
+
};
|
|
399
|
+
pointer?: {
|
|
400
|
+
width?: number;
|
|
401
|
+
color?: string;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* 数据标签配置
|
|
407
|
+
*/
|
|
408
|
+
dataLabel?: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* 数据点标记配置
|
|
411
|
+
*/
|
|
412
|
+
dataPointShape?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* 数据点标记大小
|
|
415
|
+
*/
|
|
416
|
+
dataPointShapeType?: 'solid' | 'hollow';
|
|
417
|
+
/**
|
|
418
|
+
* 触摸提示配置
|
|
419
|
+
*/
|
|
420
|
+
enableScroll?: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* 触摸提示配置
|
|
423
|
+
*/
|
|
424
|
+
touchMoveLimit?: number;
|
|
425
|
+
/**
|
|
426
|
+
* 提示框配置
|
|
427
|
+
*/
|
|
428
|
+
tooltip?: {
|
|
429
|
+
show?: boolean;
|
|
430
|
+
showBox?: boolean;
|
|
431
|
+
showArrow?: boolean;
|
|
432
|
+
showCategory?: boolean;
|
|
433
|
+
borderWidth?: number;
|
|
434
|
+
borderColor?: string;
|
|
435
|
+
borderRadius?: number;
|
|
436
|
+
boxPadding?: number;
|
|
437
|
+
bgColor?: string;
|
|
438
|
+
bgOpacity?: number;
|
|
439
|
+
fontColor?: string;
|
|
440
|
+
fontSize?: number;
|
|
441
|
+
lineHeight?: number;
|
|
442
|
+
legendShow?: boolean;
|
|
443
|
+
legendShape?: 'auto' | 'circle' | 'line' | 'rect';
|
|
444
|
+
splitLine?: boolean;
|
|
445
|
+
horizen498tal?: boolean;
|
|
446
|
+
xAxisLabel?: boolean;
|
|
447
|
+
yAxisLabel?: boolean;
|
|
448
|
+
labelBgColor?: string;
|
|
449
|
+
labelBgOpacity?: number;
|
|
450
|
+
labelFontColor?: string;
|
|
451
|
+
format?: (item: any, category: string, index: number, opts: IUChartsOpts) => string;
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* 可视化图表返回数据
|
|
457
|
+
*/
|
|
458
|
+
export interface IVisualChartData {
|
|
459
|
+
/**
|
|
460
|
+
* 图表类型
|
|
461
|
+
*/
|
|
462
|
+
type?: UChartsType;
|
|
463
|
+
/**
|
|
464
|
+
* uCharts 配置项
|
|
465
|
+
*/
|
|
466
|
+
opts?: IUChartsOpts;
|
|
467
|
+
/**
|
|
468
|
+
* uCharts 图表数据
|
|
469
|
+
*/
|
|
470
|
+
chartData?: IUChartsData;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* 行为动作
|
|
475
|
+
*/
|
|
476
|
+
export const enum IBehaviorAction {
|
|
477
|
+
/**
|
|
478
|
+
* 结束当前咨询流程,开始生成报告
|
|
479
|
+
*/
|
|
480
|
+
EndInquiryToGenerateReport = 'endInquiryToGenerateReport'
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* 需要收集结构化信息
|
|
485
|
+
*/
|
|
486
|
+
export interface INeedCollectStructuredInfo {
|
|
487
|
+
/**
|
|
488
|
+
* 表单类型
|
|
489
|
+
*/
|
|
490
|
+
type?: string;
|
|
491
|
+
/**
|
|
492
|
+
* 对用户的语言提示
|
|
493
|
+
*/
|
|
494
|
+
voiceTip?: string;
|
|
495
|
+
/**
|
|
496
|
+
* 表单标题
|
|
497
|
+
*/
|
|
498
|
+
title?: string;
|
|
499
|
+
/**
|
|
500
|
+
* 表单描述
|
|
501
|
+
*/
|
|
502
|
+
description?: string;
|
|
503
|
+
/**
|
|
504
|
+
* 等效的AI内容(当不使用结构化展示时候可以使用等效的AI内容展示给用户 或 用于上下文)
|
|
505
|
+
*/
|
|
506
|
+
equalAiContent?: string;
|
|
507
|
+
/**
|
|
508
|
+
* 需要收集的字段列表
|
|
509
|
+
*/
|
|
510
|
+
fields: ICollectStructuredInfoField[];
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* 需要收集的字段列表
|
|
515
|
+
*/
|
|
516
|
+
export interface ICollectStructuredInfoField {
|
|
517
|
+
/**
|
|
518
|
+
* 字段名称
|
|
519
|
+
*/
|
|
520
|
+
name?: string;
|
|
521
|
+
/**
|
|
522
|
+
* 字段标签
|
|
523
|
+
*/
|
|
524
|
+
label?: string;
|
|
525
|
+
/**
|
|
526
|
+
* 字段描述
|
|
527
|
+
*/
|
|
528
|
+
description?: string;
|
|
529
|
+
/**
|
|
530
|
+
* 是否必填
|
|
531
|
+
*/
|
|
532
|
+
required?: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* 选项
|
|
535
|
+
*/
|
|
536
|
+
options?: string[];
|
|
537
|
+
/**
|
|
538
|
+
* 占位符
|
|
539
|
+
*/
|
|
540
|
+
placeholder?: string;
|
|
31
541
|
}
|
|
@@ -1,175 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
export const enum IToolTypeEnum {
|
|
5
|
-
/**
|
|
6
|
-
* 文本消息
|
|
7
|
-
*/
|
|
8
|
-
TextMessage = 'textMessage',
|
|
9
|
-
/**
|
|
10
|
-
* 可视化图表消息
|
|
11
|
-
*/
|
|
12
|
-
VisualChart = 'visualChart',
|
|
13
|
-
/**
|
|
14
|
-
* 行为动作消息 如结束对话、展示按钮等行为
|
|
15
|
-
*/
|
|
16
|
-
BehaviorAction = 'behaviorAction'
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
import { type ISessionContent } from './ISessionContent';
|
|
2
|
+
import { type ICommonError } from './ICommonError';
|
|
19
3
|
/**
|
|
20
4
|
* sse流式返回片段
|
|
21
5
|
*/
|
|
22
|
-
export interface ISseData {
|
|
6
|
+
export interface ISseData extends ISessionContent {
|
|
23
7
|
/**
|
|
24
|
-
*
|
|
8
|
+
* sse类型 默认为messageItem
|
|
9
|
+
* messageItem: 消息项
|
|
10
|
+
* errorInfo: 错误信息
|
|
25
11
|
*/
|
|
26
|
-
|
|
12
|
+
sseType?: SseTypeEnum;
|
|
27
13
|
/**
|
|
28
|
-
*
|
|
14
|
+
* sse返回的错误信息
|
|
29
15
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* ai返回的对话内容
|
|
33
|
-
*/
|
|
34
|
-
aiMessage?: {
|
|
35
|
-
content?: string;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* ai思考的内容
|
|
39
|
-
*/
|
|
40
|
-
aiThinking?: {
|
|
41
|
-
reason?: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* 需要收集非结构化信息
|
|
45
|
-
*/
|
|
46
|
-
needCollectstructuredInfo?: INeedCollectStructuredInfo;
|
|
47
|
-
/**
|
|
48
|
-
* 错误信息
|
|
49
|
-
*/
|
|
50
|
-
errorInfo?: {
|
|
51
|
-
errCode?: string;
|
|
52
|
-
errMsg?: string;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* 工具消息
|
|
56
|
-
*/
|
|
57
|
-
toolMessage?: {
|
|
58
|
-
/**
|
|
59
|
-
* 工具消息类型
|
|
60
|
-
*/
|
|
61
|
-
toolType?: IToolTypeEnum;
|
|
62
|
-
/**
|
|
63
|
-
* 工具消息内容
|
|
64
|
-
*/
|
|
65
|
-
toolContent?: string;
|
|
66
|
-
/**
|
|
67
|
-
* 可视化图表数据
|
|
68
|
-
*/
|
|
69
|
-
visualChartData?: Record<string, any>;
|
|
70
|
-
/**
|
|
71
|
-
* 行为动作
|
|
72
|
-
*/
|
|
73
|
-
behaviorAction?: {
|
|
74
|
-
/**
|
|
75
|
-
* 行为动作
|
|
76
|
-
*/
|
|
77
|
-
action?: IBehaviorAction;
|
|
78
|
-
/**
|
|
79
|
-
* 行为动作描述
|
|
80
|
-
*/
|
|
81
|
-
actionDescription?: string;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
16
|
+
sseErrorInfo?: ICommonError;
|
|
84
17
|
}
|
|
85
18
|
|
|
86
19
|
/**
|
|
87
|
-
*
|
|
20
|
+
* sse类型 默认为messageItem
|
|
21
|
+
* messageItem: 消息项
|
|
22
|
+
* errorInfo: 错误信息
|
|
88
23
|
*/
|
|
89
|
-
export const enum
|
|
24
|
+
export const enum SseTypeEnum {
|
|
90
25
|
/**
|
|
91
|
-
*
|
|
26
|
+
* 消息项
|
|
92
27
|
*/
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* sse流式返回片段的类型
|
|
98
|
-
*/
|
|
99
|
-
export const enum SseDataTypeEnum {
|
|
100
|
-
/**
|
|
101
|
-
* ai返回的对话内容
|
|
102
|
-
*/
|
|
103
|
-
AIMessage = 'aiMessage',
|
|
104
|
-
/**
|
|
105
|
-
* ai思考的内容
|
|
106
|
-
*/
|
|
107
|
-
AiThinking = 'aiThinking',
|
|
108
|
-
/**
|
|
109
|
-
* 需要收集结构化信息
|
|
110
|
-
*/
|
|
111
|
-
NeedCollectStructuredInfo = 'needCollectStructuredInfo',
|
|
28
|
+
MessageItem = 'messageItem',
|
|
112
29
|
/**
|
|
113
30
|
* 错误信息
|
|
114
31
|
*/
|
|
115
|
-
ErrorInfo = 'errorInfo'
|
|
116
|
-
/**
|
|
117
|
-
* 工具消息
|
|
118
|
-
*/
|
|
119
|
-
ToolMessage = 'toolMessage'
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* 需要收集结构化信息
|
|
124
|
-
*/
|
|
125
|
-
export interface INeedCollectStructuredInfo {
|
|
126
|
-
/**
|
|
127
|
-
* 表单类型
|
|
128
|
-
*/
|
|
129
|
-
type?: string;
|
|
130
|
-
/**
|
|
131
|
-
* 对用户的语言提示
|
|
132
|
-
*/
|
|
133
|
-
voiceTip?: string;
|
|
134
|
-
/**
|
|
135
|
-
* 表单标题
|
|
136
|
-
*/
|
|
137
|
-
title?: string;
|
|
138
|
-
/**
|
|
139
|
-
* 表单描述
|
|
140
|
-
*/
|
|
141
|
-
description?: string;
|
|
142
|
-
/**
|
|
143
|
-
* 等效的AI内容(当不使用结构化展示时候可以使用等效的AI内容展示给用户 或 用于上下文)
|
|
144
|
-
*/
|
|
145
|
-
equalAiContent?: string;
|
|
146
|
-
/**
|
|
147
|
-
* 需要收集的字段列表
|
|
148
|
-
*/
|
|
149
|
-
fields: {
|
|
150
|
-
/**
|
|
151
|
-
* 字段名称
|
|
152
|
-
*/
|
|
153
|
-
name?: string;
|
|
154
|
-
/**
|
|
155
|
-
* 字段标签
|
|
156
|
-
*/
|
|
157
|
-
label?: string;
|
|
158
|
-
/**
|
|
159
|
-
* 字段描述
|
|
160
|
-
*/
|
|
161
|
-
description?: string;
|
|
162
|
-
/**
|
|
163
|
-
* 是否必填
|
|
164
|
-
*/
|
|
165
|
-
required?: boolean;
|
|
166
|
-
/**
|
|
167
|
-
* 选项
|
|
168
|
-
*/
|
|
169
|
-
options?: string[];
|
|
170
|
-
/**
|
|
171
|
-
* 占位符
|
|
172
|
-
*/
|
|
173
|
-
placeholder?: string;
|
|
174
|
-
}[];
|
|
32
|
+
ErrorInfo = 'errorInfo'
|
|
175
33
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ICommonReq, type ICommonRes } from '../common';
|
|
2
|
+
|
|
3
|
+
export interface IGetRankInfoReq extends ICommonReq {
|
|
4
|
+
/**
|
|
5
|
+
* 成绩信息
|
|
6
|
+
*/
|
|
7
|
+
scoreInfo: IScoreInfoItem[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IScoreInfoItem {
|
|
11
|
+
/**
|
|
12
|
+
* 年份
|
|
13
|
+
*/
|
|
14
|
+
year?: number;
|
|
15
|
+
/**
|
|
16
|
+
* 省份id
|
|
17
|
+
*/
|
|
18
|
+
provinceId: string;
|
|
19
|
+
/**
|
|
20
|
+
* 分数
|
|
21
|
+
*/
|
|
22
|
+
grade: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IGetRankInfoRes extends ICommonRes {
|
|
26
|
+
data?: {
|
|
27
|
+
/**
|
|
28
|
+
* 排名信息
|
|
29
|
+
*/
|
|
30
|
+
rankInfo?: Array<IRankInfoItem | null>;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IRankInfoItem {
|
|
35
|
+
/**
|
|
36
|
+
* 年份
|
|
37
|
+
*/
|
|
38
|
+
year: number;
|
|
39
|
+
/**
|
|
40
|
+
* 省份id
|
|
41
|
+
*/
|
|
42
|
+
provinceId: string;
|
|
43
|
+
/**
|
|
44
|
+
* 分数
|
|
45
|
+
*/
|
|
46
|
+
grade: number;
|
|
47
|
+
/**
|
|
48
|
+
* 排名
|
|
49
|
+
*/
|
|
50
|
+
rank: number;
|
|
51
|
+
}
|
|
@@ -387,7 +387,12 @@ export interface IGetInquirySessionListRes extends ICommonRes {
|
|
|
387
387
|
/**
|
|
388
388
|
* 添加会话内容req
|
|
389
389
|
*/
|
|
390
|
-
export interface IAddSessionContentReq extends ICommonReq, ISessionContent {
|
|
390
|
+
export interface IAddSessionContentReq extends ICommonReq, ISessionContent {
|
|
391
|
+
/**
|
|
392
|
+
* 会话id
|
|
393
|
+
*/
|
|
394
|
+
sessionId?: string;
|
|
395
|
+
}
|
|
391
396
|
|
|
392
397
|
/**
|
|
393
398
|
* 添加会话内容res
|