-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
3569 lines (3569 loc) · 153 KB
/
openapi.json
File metadata and controls
3569 lines (3569 loc) · 153 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.1",
"info": {
"title": "Team Open API Version 2 中文版本",
"description": "",
"version": "1.0.0"
},
"tags": [
{
"name": "Session"
},
{
"name": "Dataset"
},
{
"name": "Data source"
},
{
"name": "File"
},
{
"name": "Job"
}
],
"paths": {
"/v2/team/sessions": {
"post": {
"summary": "Create session",
"deprecated": false,
"description": "创建会话。\n会话即用户与 Relyt AI 在单次对话中的持续交互过程。每个用户至多可以同时保留 150 个会话。达到此上限后,如需创建新会话,可以删除不再使用的会话后,再进行创建。",
"tags": [
"Session"
],
"parameters": [
{
"name": "x-pd-external-trace-id",
"in": "header",
"description": "您本地系统中设置的 Trace ID,至多支持 128 个字符。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"required": false,
"example": "",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "会话名称,至多可支持 128 个字符。如超过此限制,名称将被截断展示。"
},
"output_language": {
"type": "string",
"enum": [
"AUTO",
"EN",
"ES",
"AR",
"PT",
"ID",
"JA",
"RU",
"HI",
"FR",
"DE",
"VI",
"TR",
"PL",
"IT",
"KO",
"ZH-CN",
"ZH-TW"
],
"default": "AUTO",
"description": "Relyt AI 的回复语言。例如,当设置为 `EN` 时,则 Relyt AI 使用英语进行回复。如不指定,将使用默认值 `AUTO`,即 Relyt AI 会根据提示词自动选择合适的回复语言。可选值包括:\n\n- `AUTO`:根据提示词自动识别\n- `EN`:英语\n- `ES`:西班牙语\n- `AR`:阿拉伯语\n- `PT`:葡萄牙语\n- `ID`:印尼语\n- `JA`:日语\n- `RU`:俄语\n- `HI`:印地语\n- `FR`:法语\n- `DE`:德语\n- `VI`:越南语\n- `TR`:土耳其语\n- `PL`:波兰语\n- `IT`:意大利语\n- `KO`:韩语\n- `ZH-CN`:简体中文\n- `ZH-TW`:繁体中文"
},
"job_mode": {
"type": "string",
"description": "任务类型。可选值包括:\n\n- `AUTO`:Relyt AI 根据你的提问进行意图判断,决定该任务为数据分析任务或信息检索任务。\n- `DATA_ANALYTICS`:Relyt AI 会根据你的输入进行数据分析。\n\n如不指定,则采用默认值 `AUTO`。如果您明确地想要进行数据分析,我们建议您将值设置为 **DATA_ANALYTICS**,从而 Relyt AI 可以跳过意图识别步骤,加快问题处理速度。",
"enum": [
"AUTO",
"DATA_ANALYTICS"
],
"default": "DATA_ANALYTICS"
},
"max_contextual_job_history": {
"type": "integer",
"description": "作为下一个任务上下文的历史任务数,取值范围为 `0` 到 `10`,默认值为 `10`。如设置为 `0`,则当前任务将不使用任何历史任务作为上下文信息。"
},
"agent_id": {
"type": "string",
"enum": [
"DATA_ANALYSIS_AGENT"
],
"default": "DATA_ANALYSIS_AGENT",
"description": "AI 智能体的 ID。该参数为保留参数,无需制定或设置为 **DATA_ANALYSIS_AGENT**。"
},
"user_id": {
"type": "string",
"description": "用户 ID,即您在组织中的唯一身份标识。"
}
},
"required": [
"name",
"user_id"
]
},
"examples": {
"1": {
"value": {
"name": "My session",
"output_language": "FR",
"job_mode": "AUTO",
"max_contextual_job_history": 10,
"agent_id": "DATA_ANALYSIS_AGENT",
"user_id": "tmm-dafasdfasdfasdf"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查,请参阅 [错误码](/introduction/error-codes)。"
},
"data": {
"description": "返回的数据对象。",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会话 ID。\n\n如后续要使用该会话来 [执行任务](/api-reference/create-job),请保存该 ID。"
}
},
"required": [
"id"
]
}
},
"required": [
"data",
"code"
]
},
"examples": {
"1": {
"summary": "成功示例",
"value": {
"code": 0,
"data": {
"id": "session-dasfasdgasdgfasdgasdg"
}
}
}
}
}
},
"headers": {
"x-pd-trace-id": {
"example": "",
"required": true,
"description": "Relyt AI 返回的 Trace ID。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"apikey-header-x-pd-api-key": []
}
]
},
"get": {
"summary": "List sessions",
"deprecated": false,
"description": "返回您创建的会话列表。\n",
"tags": [
"Session"
],
"parameters": [
{
"name": "page_number",
"in": "query",
"description": "分页返回的起始页码。如不指定,则使用默认值 `1`。",
"required": false,
"schema": {
"type": "integer",
"default": 1
}
},
{
"name": "page_size",
"in": "query",
"description": "每页返回的记录数量。如不指定,则使用默认值 `10`。",
"required": false,
"schema": {
"type": "integer",
"default": 10
}
},
{
"name": "search",
"in": "query",
"description": "搜索关键词,最多支持 128 个字符。所有名称中包含该关键词的会话将被返回。\n\n如果省略此项,将列出所有会话。",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "user_id",
"in": "query",
"description": "用户 ID,即您在组织中的唯一身份标识。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "x-pd-external-trace-id",
"in": "header",
"description": "您本地系统中设置的 Trace ID,至多支持 128 个字符。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"required": false,
"example": "",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查,请参阅 [错误码](/introduction/error-codes)。"
},
"data": {
"type": "object",
"properties": {
"total_items": {
"type": "integer",
"description": "返回的会话总数量。"
},
"page_number": {
"type": "integer",
"description": "当前页面的页码。"
},
"page_size": {
"type": "integer",
"description": "每页返回的会话数量。"
},
"records": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会话 ID,会话在当前项目中的唯一标识。"
},
"name": {
"type": "string",
"description": "会话名称。如名称长度超过 128 个字符,将仅返回前 128 个字符。"
},
"output_language": {
"type": "string",
"enum": [
"AUTO",
"EN",
"ES",
"AR",
"PT",
"ID",
"JA",
"RU",
"HI",
"FR",
"DE",
"VI",
"TR",
"PL",
"IT",
"KO",
"ZH-CN",
"ZH-TW"
],
"default": "AUTO",
"description": "Relyt AI 的返回语言。可能值包括:\n\n- `AUTO`:根据提示词自动识别\n- `EN`:英语\n- `ES`:西班牙语\n- `AR`:阿拉伯语\n- `PT`:葡萄牙语\n- `ID`:印尼语\n- `JA`:日语\n- `RU`:俄语\n- `HI`:印地语\n- `FR`:法语\n- `DE`:德语\n- `VI`:越南语\n- `TR`:土耳其语\n- `PL`:波兰语\n- `IT`:意大利语\n- `KO`:韩语\n- `ZH-CN`:简体中文\n- `ZH-TW`:繁体中文"
},
"job_mode": {
"type": "string",
"description": "任务类型。可能值包括:\n\n- `AUTO`:Relyt AI 根据您的提问进行意图判断,决定任务是数据分析任务还是信息检索任务。\n- `DATA_ANALYTICS`:Relyt AI 根据您的输入进行数据分析。",
"enum": [
"AUTO",
"DATA_ANALYTICS"
],
"default": "DATA_ANALYTICS"
},
"max_contextual_job_history": {
"type": "integer",
"description": "在会话中保留作为下一个任务上下文的任务数量,取值范围为 `0` 到 `10`,默认值为 `10`。值为 `0` 时表示会话中的任务在执行时不会使用历史任务执行结果作为上下文信息。"
},
"agent_id": {
"type": "string",
"enum": [
"DATA_ANALYSIS_AGENT"
],
"default": "DATA_ANALYSIS_AGENT",
"description": "AI 智能体的 ID。该参数为保留参数,无实际意义,请忽略。"
}
},
"description": "会话对象。",
"required": [
"id",
"name"
]
},
"description": "当前页面返回的会话列表。"
}
},
"required": [
"total_items",
"page_number",
"page_size",
"records"
],
"description": "会话的分页列表。"
}
},
"required": [
"data",
"code"
]
},
"examples": {
"1": {
"summary": "成功示例",
"value": {
"code": 0,
"data": {
"total_items": 8,
"page_size": 10,
"page_number": 1,
"records": [
{
"id": "04b69928-532d-408a-8716-8f5e70fcacc6",
"name": "Finding Your Inner Spark",
"output_language": "AUTO",
"job_mode": "AUTO",
"max_contextual_job_history": 10,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "7e9941af-ad1b-4834-a421-4b37b54aae19",
"name": "session_trade_analyze_001",
"output_language": "EN",
"job_mode": "AUTO",
"max_contextual_job_history": 1,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "a137ecc8-9554-42c3-b042-2458dd2aeb36",
"name": "My first session",
"output_language": "AUTO",
"job_mode": "AUTO",
"max_contextual_job_history": 10,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "4440ab38-3df0-465b-a66c-bf6acb0f1bc2",
"name": "New name",
"output_language": "EN",
"job_mode": "AUTO",
"max_contextual_job_history": 10,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "3eb5e294-11eb-4bf0-8854-7177c415d15c",
"name": "trade_analyze_001",
"output_language": "ZH-CN",
"job_mode": "AUTO",
"max_contextual_job_history": 10,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "ccca6d34-894f-4f6f-a8b5-c9df93126309",
"name": "lhtest-old",
"output_language": "ZH-CN",
"job_mode": "AUTO",
"max_contextual_job_history": 5,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "c28a1f47-da68-4456-bb0b-e85bf5a0e98e",
"name": "lhtest-newest",
"output_language": "ZH-TW",
"job_mode": "AUTO",
"max_contextual_job_history": 6,
"agent_id": "DATA_ANALYSIS_AGENT"
},
{
"id": "fbde9b45-69cd-408e-97d1-f874236aadac",
"name": "General-session",
"output_language": "ZH-CN",
"job_mode": "AUTO",
"max_contextual_job_history": 10,
"agent_id": "DATA_ANALYSIS_AGENT"
}
]
}
}
}
}
}
},
"headers": {
"x-pd-trace-id": {
"example": "",
"required": true,
"description": "Relyt AI 返回的 Trace ID。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"apikey-header-x-pd-api-key": []
}
]
}
},
"/v2/team/sessions/{id}": {
"post": {
"summary": "Modify session",
"deprecated": false,
"description": "修改会话配置。",
"tags": [
"Session"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "要修改的会话 ID。\n\n如需查看项目中存在的会话,请调用 [GET /v2/team/sessions](/api-reference/list-sessions) 接口。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "x-pd-external-trace-id",
"in": "header",
"description": "您本地系统中设置的 Trace ID,至多支持 128 个字符。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"required": false,
"example": "",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "会话名称,至多可支持 128 个字符。如超过此限制,名称将被截断展示。"
},
"output_language": {
"type": "string",
"enum": [
"AUTO",
"EN",
"ES",
"AR",
"PT",
"ID",
"JA",
"RU",
"HI",
"FR",
"DE",
"VI",
"TR",
"PL",
"IT",
"KO",
"ZH-CN",
"ZH-TW"
],
"default": "AUTO",
"description": "Relyt AI 的回复语言。例如,当设置为 `EN` 时,则 Relyt AI 使用英语进行回复。如不指定,将使用默认值 `AUTO`,即 Relyt AI 会根据提示词自动选择合适的回复语言。可选值包括:\n\n- `AUTO`:根据提示词自动识别\n- `EN`:英语\n- `ES`:西班牙语\n- `AR`:阿拉伯语\n- `PT`:葡萄牙语\n- `ID`:印尼语\n- `JA`:日语\n- `RU`:俄语\n- `HI`:印地语\n- `FR`:法语\n- `DE`:德语\n- `VI`:越南语\n- `TR`:土耳其语\n- `PL`:波兰语\n- `IT`:意大利语\n- `KO`:韩语\n- `ZH-CN`:简体中文\n- `ZH-TW`:繁体中文"
},
"job_mode": {
"type": "string",
"description": "任务类型。可选值包括:\n\n- `AUTO`:Relyt AI 根据你的提问进行意图判断,决定该任务为数据分析任务或信息检索任务。\n- `DATA_ANALYTICS`:Relyt AI 会根据你的输入进行数据分析。\n\n如不指定,则采用默认值 `AUTO`。如果您明确地想要进行数据分析,我们建议您将值设置为 **DATA_ANALYTICS**,从而 Relyt AI 可以跳过意图识别步骤,加快问题处理速度。",
"enum": [
"AUTO",
"DATA_ANALYTICS"
],
"default": "DATA_ANALYTICS"
},
"max_contextual_job_history": {
"type": "integer",
"description": "作为下一个任务上下文的历史任务数,取值范围为 `0` 到 `10`,默认值为 `10`。如设置为 `0`,则当前任务将不使用任何历史任务作为上下文信息。"
},
"user_id": {
"type": "string",
"description": "用户 ID,即您在组织中的唯一身份标识。"
}
},
"required": [
"name",
"user_id"
]
},
"examples": {
"1": {
"value": {
"name": "hello",
"output_language": "EN",
"job_mode": "DATA_ANALYSIS",
"max_contextual_job_history": 3,
"user_id": "tmm-ddsdfsfgs"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查,请参阅 [错误码](/introduction/error-codes)。"
},
"data": {
"type": "object",
"properties": {},
"description": "操作成功则返回 null。"
}
},
"required": [
"data",
"code"
]
}
}
},
"headers": {
"x-pd-trace-id": {
"example": "",
"required": true,
"description": "Relyt AI 返回的 Trace ID。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"apikey-header-x-pd-api-key": []
}
]
},
"delete": {
"summary": "Delete session",
"deprecated": false,
"description": "删除会话。一旦删除,该会话及其任务历史记录将被永久删除,且无法恢复。",
"tags": [
"Session"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "要删除的会话 ID。\n\n如需查看项目中存在的会话,请调用 [GET /v2/team/sessions](/api-reference/list-sessions) 接口。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "x-pd-external-trace-id",
"in": "header",
"description": "您本地系统中设置的 Trace ID,至多支持 128 个字符。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"required": false,
"example": "",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"description": "用户 ID,即您在组织中的唯一身份标识。"
}
},
"required": [
"user_id"
]
},
"examples": {
"1": {
"value": {
"user_id": "tmm-dafasdfasdfasdf"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查,请参阅 [错误码](/introduction/error-codes)。"
},
"data": {
"type": "object",
"properties": {},
"description": "操作成功则返回 null。"
}
},
"required": [
"code"
]
}
}
},
"headers": {
"x-pd-trace-id": {
"example": "",
"required": true,
"description": "Relyt AI 返回的 Trace ID。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"apikey-header-x-pd-api-key": []
}
]
},
"get": {
"summary": "Get session",
"deprecated": false,
"description": "获取指定会话的配置信息。",
"tags": [
"Session"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "目标会话的 ID。\n\n如需查看项目中存在的会话,请调用 [GET /v2/team/sessions](/api-reference/list-sessions) 接口。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "user_id",
"in": "query",
"description": "用户 ID,即您在组织中的唯一身份标识。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "x-pd-external-trace-id",
"in": "header",
"description": "您本地系统中设置的 Trace ID,至多支持 128 个字符。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"required": false,
"example": "",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查,请参阅 [错误码](/introduction/error-codes)。"
},
"data": {
"description": "会话对象。",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "会话 ID,会话在当前项目中的唯一标识。"
},
"name": {
"type": "string",
"description": "会话名称。如名称长度超过 128 个字符,将仅返回前 128 个字符。"
},
"output_language": {
"type": "string",
"enum": [
"AUTO",
"EN",
"ES",
"AR",
"PT",
"ID",
"JA",
"RU",
"HI",
"FR",
"DE",
"VI",
"TR",
"PL",
"IT",
"KO",
"ZH-CN",
"ZH-TW"
],
"default": "AUTO",
"description": "Relyt AI 的返回语言。可能值包括:\n\n- `AUTO`:根据提示词自动识别\n- `EN`:英语\n- `ES`:西班牙语\n- `AR`:阿拉伯语\n- `PT`:葡萄牙语\n- `ID`:印尼语\n- `JA`:日语\n- `RU`:俄语\n- `HI`:印地语\n- `FR`:法语\n- `DE`:德语\n- `VI`:越南语\n- `TR`:土耳其语\n- `PL`:波兰语\n- `IT`:意大利语\n- `KO`:韩语\n- `ZH-CN`:简体中文\n- `ZH-TW`:繁体中文"
},
"job_mode": {
"type": "string",
"description": "任务类型。可能值包括:\n\n- `AUTO`:Relyt AI 根据您的提问进行意图判断,决定任务是数据分析任务还是信息检索任务。\n- `DATA_ANALYTICS`:Relyt AI 根据您的输入进行数据分析。",
"enum": [
"AUTO",
"DATA_ANALYTICS"
],
"default": "DATA_ANALYTICS"
},
"max_contextual_job_history": {
"type": "integer",
"description": "在会话中保留作为下一个任务上下文的任务数量,取值范围为 `0` 到 `10`,默认值为 `10`。值为 `0` 时表示会话中的任务在执行时不会使用历史任务执行结果作为上下文信息。"
},
"agent_id": {
"type": "string",
"enum": [
"DATA_ANALYSIS_AGENT"
],
"default": "DATA_ANALYSIS_AGENT",
"description": "AI 智能体的 ID。该参数为保留参数,无实际意义,请忽略。"
}
},
"required": [
"id",
"name"
]
}
},
"required": [
"data",
"code"
]
},
"examples": {
"1": {
"summary": "成功示例",
"value": {
"code": 0,
"data": {
"id": "cckrXXg68P8lmb59dg4yO",
"name": "Analyze performance",
"output_language": "HI",
"job_mode": "AUTO",
"max_contextual_job_history": 76,
"agent_id": "DATA_ANALYSIS_AGENT"
}
}
}
}
}
},
"headers": {
"x-pd-trace-id": {
"example": "",
"required": true,
"description": "Relyt AI 返回的 Trace ID。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"schema": {
"type": "string"
}
}
}
}
},
"security": [
{
"apikey-header-x-pd-api-key": []
}
]
}
},
"/v2/team/sessions/{id}/history": {
"get": {
"summary": "Get job history in session",
"deprecated": false,
"description": "获取指定会话中的任务记录。",
"tags": [
"Session"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "目标会话的 ID。\n\n如需查看项目中存在的会话,请调用 [GET /v2/team/sessions](/api-reference/list-sessions) 接口。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "page_number",
"in": "query",
"description": "分页返回的起始页码。如不指定,则使用默认值 `1`。",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "page_size",
"in": "query",
"description": "每页返回的记录数量。如不指定,则使用默认值 `10`。",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "user_id",
"in": "query",
"description": "用户 ID,即您在组织中的唯一身份标识。",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "x-pd-external-trace-id",
"in": "header",
"description": "您本地系统中设置的 Trace ID,至多支持 128 个字符。当请求发生错误时,可以将此 ID 提供给 Relyt AI 团队,协助进行故障排查。",
"required": false,
"example": "",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "状态码。**0** 表示操作成功。其它值则表示操作失败。如需进行错误排查,请参阅 [错误码](/introduction/error-codes)。"
},
"data": {
"type": "object",
"properties": {
"total_items": {
"type": "integer",
"description": "返回的任务记录总数量。"
},
"page_number": {
"type": "integer",
"description": "当前页面的页码。"
},
"page_size": {
"type": "integer",
"description": "每页返回的记录数量。"
},
"records": {
"type": "array",
"items": {
"description": "任务对象。",
"type": "object",
"properties": {
"question": {
"description": "您的提问(即提示词)。",
"type": "object",
"properties": {
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The content type of the question block. Possible values are:\n- `MESSAGE`: The content is a piece of text.\n- `CODE`: The content a code snippet in Markdown format.",
"enum": [
"MESSAGE",
"CODE"
]
},
"content": {
"type": "string",
"description": "The block content. It is a piece of text when the `type` is `MESSAGE`, and a code snippet when the `type` is `CODE`."
}
},
"description": "每个问题块的内容。",
"required": [
"type",
"content"
]
},
"description": "构成整个问题的内容块列表。"
}
},
"required": [
"blocks"
]
},
"answer": {
"description": "Relyt AI 的回答。",
"type": "object",
"properties": {
"blocks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BlockDTO",
"description": "构成整个答案的内容块列表。"
},
"description": "Relyt AI 的答案。"
}
},
"required": [
"blocks"
]
},
"job_id": {
"type": "string",
"description": "任务 ID,即任务在当前会话中的唯一标识。"
}
},
"required": [
"question",
"answer",
"job_id"