@alicloud/dianjin20240628 1.0.1 → 1.1.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.
package/src/client.ts CHANGED
@@ -1164,6 +1164,149 @@ export class GetFilterDocumentListResponse extends $tea.Model {
1164
1164
  }
1165
1165
  }
1166
1166
 
1167
+ export class GetHistoryListByBizTypeRequest extends $tea.Model {
1168
+ /**
1169
+ * @remarks
1170
+ * This parameter is required.
1171
+ *
1172
+ * @example
1173
+ * GysYBsxx
1174
+ */
1175
+ bizId?: string;
1176
+ /**
1177
+ * @remarks
1178
+ * This parameter is required.
1179
+ *
1180
+ * @example
1181
+ * LibraryChat
1182
+ */
1183
+ bizType?: string;
1184
+ /**
1185
+ * @example
1186
+ * 1
1187
+ */
1188
+ page?: number;
1189
+ /**
1190
+ * @example
1191
+ * 10
1192
+ */
1193
+ pageSize?: number;
1194
+ static names(): { [key: string]: string } {
1195
+ return {
1196
+ bizId: 'bizId',
1197
+ bizType: 'bizType',
1198
+ page: 'page',
1199
+ pageSize: 'pageSize',
1200
+ };
1201
+ }
1202
+
1203
+ static types(): { [key: string]: any } {
1204
+ return {
1205
+ bizId: 'string',
1206
+ bizType: 'string',
1207
+ page: 'number',
1208
+ pageSize: 'number',
1209
+ };
1210
+ }
1211
+
1212
+ constructor(map?: { [key: string]: any }) {
1213
+ super(map);
1214
+ }
1215
+ }
1216
+
1217
+ export class GetHistoryListByBizTypeResponseBody extends $tea.Model {
1218
+ /**
1219
+ * @example
1220
+ * null
1221
+ */
1222
+ cost?: number;
1223
+ data?: GetHistoryListByBizTypeResponseBodyData;
1224
+ /**
1225
+ * @example
1226
+ * null
1227
+ */
1228
+ dataType?: string;
1229
+ /**
1230
+ * @example
1231
+ * 0
1232
+ */
1233
+ errCode?: string;
1234
+ /**
1235
+ * @example
1236
+ * ok
1237
+ */
1238
+ message?: string;
1239
+ /**
1240
+ * @example
1241
+ * 9DF9B3F3-9FFE-52CB-A8DC-F7BD5F842F0E
1242
+ */
1243
+ requestId?: string;
1244
+ /**
1245
+ * @example
1246
+ * true
1247
+ */
1248
+ success?: boolean;
1249
+ /**
1250
+ * @example
1251
+ * 2024-01-01 00:00:00
1252
+ */
1253
+ time?: string;
1254
+ static names(): { [key: string]: string } {
1255
+ return {
1256
+ cost: 'cost',
1257
+ data: 'data',
1258
+ dataType: 'dataType',
1259
+ errCode: 'errCode',
1260
+ message: 'message',
1261
+ requestId: 'requestId',
1262
+ success: 'success',
1263
+ time: 'time',
1264
+ };
1265
+ }
1266
+
1267
+ static types(): { [key: string]: any } {
1268
+ return {
1269
+ cost: 'number',
1270
+ data: GetHistoryListByBizTypeResponseBodyData,
1271
+ dataType: 'string',
1272
+ errCode: 'string',
1273
+ message: 'string',
1274
+ requestId: 'string',
1275
+ success: 'boolean',
1276
+ time: 'string',
1277
+ };
1278
+ }
1279
+
1280
+ constructor(map?: { [key: string]: any }) {
1281
+ super(map);
1282
+ }
1283
+ }
1284
+
1285
+ export class GetHistoryListByBizTypeResponse extends $tea.Model {
1286
+ headers?: { [key: string]: string };
1287
+ statusCode?: number;
1288
+ body?: GetHistoryListByBizTypeResponseBody;
1289
+ static names(): { [key: string]: string } {
1290
+ return {
1291
+ headers: 'headers',
1292
+ statusCode: 'statusCode',
1293
+ body: 'body',
1294
+ };
1295
+ }
1296
+
1297
+ static types(): { [key: string]: any } {
1298
+ return {
1299
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
1300
+ statusCode: 'number',
1301
+ body: GetHistoryListByBizTypeResponseBody,
1302
+ };
1303
+ }
1304
+
1305
+ constructor(map?: { [key: string]: any }) {
1306
+ super(map);
1307
+ }
1308
+ }
1309
+
1167
1310
  export class GetLibraryRequest extends $tea.Model {
1168
1311
  /**
1169
1312
  * @remarks
@@ -2182,6 +2325,230 @@ export class RunChatResultGenerationResponse extends $tea.Model {
2182
2325
  }
2183
2326
  }
2184
2327
 
2328
+ export class RunLibraryChatGenerationRequest extends $tea.Model {
2329
+ docIdList?: string[];
2330
+ /**
2331
+ * @example
2332
+ * false
2333
+ */
2334
+ enableFollowUp?: boolean;
2335
+ /**
2336
+ * @example
2337
+ * false
2338
+ */
2339
+ enableMultiQuery?: boolean;
2340
+ /**
2341
+ * @example
2342
+ * false
2343
+ */
2344
+ enableOpenQa?: boolean;
2345
+ /**
2346
+ * @example
2347
+ * qwen-max
2348
+ */
2349
+ followUpLlm?: string;
2350
+ /**
2351
+ * @remarks
2352
+ * This parameter is required.
2353
+ *
2354
+ * @example
2355
+ * 3akzl28vap
2356
+ */
2357
+ libraryId?: string;
2358
+ /**
2359
+ * @remarks
2360
+ * This parameter is required.
2361
+ *
2362
+ * @example
2363
+ * qwen-max
2364
+ */
2365
+ llmType?: string;
2366
+ /**
2367
+ * @example
2368
+ * qwen-max
2369
+ */
2370
+ multiQueryLlm?: string;
2371
+ /**
2372
+ * @remarks
2373
+ * This parameter is required.
2374
+ */
2375
+ query?: string;
2376
+ queryCriteria?: RunLibraryChatGenerationRequestQueryCriteria;
2377
+ /**
2378
+ * @example
2379
+ * linear
2380
+ */
2381
+ rerankType?: string;
2382
+ /**
2383
+ * @remarks
2384
+ * sessionId
2385
+ *
2386
+ * @example
2387
+ * null
2388
+ */
2389
+ sessionId?: string;
2390
+ /**
2391
+ * @example
2392
+ * false
2393
+ */
2394
+ stream?: boolean;
2395
+ subQueryList?: string[];
2396
+ textSearchParameter?: RunLibraryChatGenerationRequestTextSearchParameter;
2397
+ /**
2398
+ * @example
2399
+ * 1
2400
+ */
2401
+ topK?: number;
2402
+ vectorSearchParameter?: RunLibraryChatGenerationRequestVectorSearchParameter;
2403
+ /**
2404
+ * @example
2405
+ * false
2406
+ */
2407
+ withDocumentReference?: boolean;
2408
+ static names(): { [key: string]: string } {
2409
+ return {
2410
+ docIdList: 'docIdList',
2411
+ enableFollowUp: 'enableFollowUp',
2412
+ enableMultiQuery: 'enableMultiQuery',
2413
+ enableOpenQa: 'enableOpenQa',
2414
+ followUpLlm: 'followUpLlm',
2415
+ libraryId: 'libraryId',
2416
+ llmType: 'llmType',
2417
+ multiQueryLlm: 'multiQueryLlm',
2418
+ query: 'query',
2419
+ queryCriteria: 'queryCriteria',
2420
+ rerankType: 'rerankType',
2421
+ sessionId: 'sessionId',
2422
+ stream: 'stream',
2423
+ subQueryList: 'subQueryList',
2424
+ textSearchParameter: 'textSearchParameter',
2425
+ topK: 'topK',
2426
+ vectorSearchParameter: 'vectorSearchParameter',
2427
+ withDocumentReference: 'withDocumentReference',
2428
+ };
2429
+ }
2430
+
2431
+ static types(): { [key: string]: any } {
2432
+ return {
2433
+ docIdList: { 'type': 'array', 'itemType': 'string' },
2434
+ enableFollowUp: 'boolean',
2435
+ enableMultiQuery: 'boolean',
2436
+ enableOpenQa: 'boolean',
2437
+ followUpLlm: 'string',
2438
+ libraryId: 'string',
2439
+ llmType: 'string',
2440
+ multiQueryLlm: 'string',
2441
+ query: 'string',
2442
+ queryCriteria: RunLibraryChatGenerationRequestQueryCriteria,
2443
+ rerankType: 'string',
2444
+ sessionId: 'string',
2445
+ stream: 'boolean',
2446
+ subQueryList: { 'type': 'array', 'itemType': 'string' },
2447
+ textSearchParameter: RunLibraryChatGenerationRequestTextSearchParameter,
2448
+ topK: 'number',
2449
+ vectorSearchParameter: RunLibraryChatGenerationRequestVectorSearchParameter,
2450
+ withDocumentReference: 'boolean',
2451
+ };
2452
+ }
2453
+
2454
+ constructor(map?: { [key: string]: any }) {
2455
+ super(map);
2456
+ }
2457
+ }
2458
+
2459
+ export class RunLibraryChatGenerationResponseBody extends $tea.Model {
2460
+ /**
2461
+ * @example
2462
+ * null
2463
+ */
2464
+ cost?: number;
2465
+ data?: any;
2466
+ /**
2467
+ * @example
2468
+ * null
2469
+ */
2470
+ dataType?: string;
2471
+ /**
2472
+ * @example
2473
+ * 0
2474
+ */
2475
+ errCode?: string;
2476
+ /**
2477
+ * @example
2478
+ * ok
2479
+ */
2480
+ message?: string;
2481
+ /**
2482
+ * @example
2483
+ * 5E3FBAF1-17AF-53B7-AF0A-CDCEEB6DE658
2484
+ */
2485
+ requestId?: string;
2486
+ /**
2487
+ * @example
2488
+ * true
2489
+ */
2490
+ success?: boolean;
2491
+ /**
2492
+ * @example
2493
+ * 2024-04-24 11:54:34
2494
+ */
2495
+ time?: string;
2496
+ static names(): { [key: string]: string } {
2497
+ return {
2498
+ cost: 'cost',
2499
+ data: 'data',
2500
+ dataType: 'dataType',
2501
+ errCode: 'errCode',
2502
+ message: 'message',
2503
+ requestId: 'requestId',
2504
+ success: 'success',
2505
+ time: 'time',
2506
+ };
2507
+ }
2508
+
2509
+ static types(): { [key: string]: any } {
2510
+ return {
2511
+ cost: 'number',
2512
+ data: 'any',
2513
+ dataType: 'string',
2514
+ errCode: 'string',
2515
+ message: 'string',
2516
+ requestId: 'string',
2517
+ success: 'boolean',
2518
+ time: 'string',
2519
+ };
2520
+ }
2521
+
2522
+ constructor(map?: { [key: string]: any }) {
2523
+ super(map);
2524
+ }
2525
+ }
2526
+
2527
+ export class RunLibraryChatGenerationResponse extends $tea.Model {
2528
+ headers?: { [key: string]: string };
2529
+ statusCode?: number;
2530
+ body?: RunLibraryChatGenerationResponseBody;
2531
+ static names(): { [key: string]: string } {
2532
+ return {
2533
+ headers: 'headers',
2534
+ statusCode: 'statusCode',
2535
+ body: 'body',
2536
+ };
2537
+ }
2538
+
2539
+ static types(): { [key: string]: any } {
2540
+ return {
2541
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
2542
+ statusCode: 'number',
2543
+ body: RunLibraryChatGenerationResponseBody,
2544
+ };
2545
+ }
2546
+
2547
+ constructor(map?: { [key: string]: any }) {
2548
+ super(map);
2549
+ }
2550
+ }
2551
+
2185
2552
  export class UpdateDocumentRequest extends $tea.Model {
2186
2553
  /**
2187
2554
  * @remarks
@@ -3418,10 +3785,129 @@ export class GetFilterDocumentListRequestAnd extends $tea.Model {
3418
3785
 
3419
3786
  static types(): { [key: string]: any } {
3420
3787
  return {
3421
- boost: 'number',
3422
- key: 'string',
3423
- operator: 'string',
3424
- value: 'string',
3788
+ boost: 'number',
3789
+ key: 'string',
3790
+ operator: 'string',
3791
+ value: 'string',
3792
+ };
3793
+ }
3794
+
3795
+ constructor(map?: { [key: string]: any }) {
3796
+ super(map);
3797
+ }
3798
+ }
3799
+
3800
+ export class GetFilterDocumentListRequestOr extends $tea.Model {
3801
+ /**
3802
+ * @example
3803
+ * 1
3804
+ */
3805
+ boost?: number;
3806
+ /**
3807
+ * @example
3808
+ * company
3809
+ */
3810
+ key?: string;
3811
+ /**
3812
+ * @example
3813
+ * contains
3814
+ */
3815
+ operator?: string;
3816
+ /**
3817
+ * @example
3818
+ * alibaba
3819
+ */
3820
+ value?: string;
3821
+ static names(): { [key: string]: string } {
3822
+ return {
3823
+ boost: 'boost',
3824
+ key: 'key',
3825
+ operator: 'operator',
3826
+ value: 'value',
3827
+ };
3828
+ }
3829
+
3830
+ static types(): { [key: string]: any } {
3831
+ return {
3832
+ boost: 'number',
3833
+ key: 'string',
3834
+ operator: 'string',
3835
+ value: 'string',
3836
+ };
3837
+ }
3838
+
3839
+ constructor(map?: { [key: string]: any }) {
3840
+ super(map);
3841
+ }
3842
+ }
3843
+
3844
+ export class GetFilterDocumentListResponseBodyDataRecords extends $tea.Model {
3845
+ /**
3846
+ * @example
3847
+ * 29368126816
3848
+ */
3849
+ docId?: string;
3850
+ /**
3851
+ * @example
3852
+ * {"a": "1"}
3853
+ */
3854
+ documentMeta?: { [key: string]: any };
3855
+ /**
3856
+ * @example
3857
+ * pdf
3858
+ */
3859
+ fileType?: string;
3860
+ /**
3861
+ * @example
3862
+ * 2024-01-01 00:00:00
3863
+ */
3864
+ gmtCreate?: string;
3865
+ /**
3866
+ * @example
3867
+ * 2024-01-01 00:00:00
3868
+ */
3869
+ gmtModified?: string;
3870
+ /**
3871
+ * @example
3872
+ * sdfgsjdfg
3873
+ */
3874
+ libraryId?: string;
3875
+ /**
3876
+ * @example
3877
+ * WaitRefresh
3878
+ */
3879
+ statusCode?: string;
3880
+ title?: string;
3881
+ /**
3882
+ * @example
3883
+ * null
3884
+ */
3885
+ url?: string;
3886
+ static names(): { [key: string]: string } {
3887
+ return {
3888
+ docId: 'docId',
3889
+ documentMeta: 'documentMeta',
3890
+ fileType: 'fileType',
3891
+ gmtCreate: 'gmtCreate',
3892
+ gmtModified: 'gmtModified',
3893
+ libraryId: 'libraryId',
3894
+ statusCode: 'statusCode',
3895
+ title: 'title',
3896
+ url: 'url',
3897
+ };
3898
+ }
3899
+
3900
+ static types(): { [key: string]: any } {
3901
+ return {
3902
+ docId: 'string',
3903
+ documentMeta: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
3904
+ fileType: 'string',
3905
+ gmtCreate: 'string',
3906
+ gmtModified: 'string',
3907
+ libraryId: 'string',
3908
+ statusCode: 'string',
3909
+ title: 'string',
3910
+ url: 'string',
3425
3911
  };
3426
3912
  }
3427
3913
 
@@ -3430,42 +3916,45 @@ export class GetFilterDocumentListRequestAnd extends $tea.Model {
3430
3916
  }
3431
3917
  }
3432
3918
 
3433
- export class GetFilterDocumentListRequestOr extends $tea.Model {
3919
+ export class GetFilterDocumentListResponseBodyData extends $tea.Model {
3434
3920
  /**
3435
3921
  * @example
3436
3922
  * 1
3437
3923
  */
3438
- boost?: number;
3924
+ currentPage?: number;
3439
3925
  /**
3440
3926
  * @example
3441
- * company
3927
+ * 10
3442
3928
  */
3443
- key?: string;
3929
+ pageSize?: number;
3930
+ records?: GetFilterDocumentListResponseBodyDataRecords[];
3444
3931
  /**
3445
3932
  * @example
3446
- * contains
3933
+ * 10
3447
3934
  */
3448
- operator?: string;
3935
+ totalPages?: number;
3449
3936
  /**
3450
3937
  * @example
3451
- * alibaba
3938
+ * 100
3452
3939
  */
3453
- value?: string;
3940
+ totalRecords?: number;
3454
3941
  static names(): { [key: string]: string } {
3455
3942
  return {
3456
- boost: 'boost',
3457
- key: 'key',
3458
- operator: 'operator',
3459
- value: 'value',
3943
+ currentPage: 'currentPage',
3944
+ pageSize: 'pageSize',
3945
+ records: 'records',
3946
+ totalPages: 'totalPages',
3947
+ totalRecords: 'totalRecords',
3460
3948
  };
3461
3949
  }
3462
3950
 
3463
3951
  static types(): { [key: string]: any } {
3464
3952
  return {
3465
- boost: 'number',
3466
- key: 'string',
3467
- operator: 'string',
3468
- value: 'string',
3953
+ currentPage: 'number',
3954
+ pageSize: 'number',
3955
+ records: { 'type': 'array', 'itemType': GetFilterDocumentListResponseBodyDataRecords },
3956
+ totalPages: 'number',
3957
+ totalRecords: 'number',
3469
3958
  };
3470
3959
  }
3471
3960
 
@@ -3474,22 +3963,22 @@ export class GetFilterDocumentListRequestOr extends $tea.Model {
3474
3963
  }
3475
3964
  }
3476
3965
 
3477
- export class GetFilterDocumentListResponseBodyDataRecords extends $tea.Model {
3966
+ export class GetHistoryListByBizTypeResponseBodyDataRecords extends $tea.Model {
3478
3967
  /**
3479
3968
  * @example
3480
- * 29368126816
3969
+ * GysYBsxx
3481
3970
  */
3482
- docId?: string;
3971
+ bizId?: string;
3483
3972
  /**
3484
3973
  * @example
3485
- * {"a": "1"}
3974
+ * LibraryChat
3486
3975
  */
3487
- documentMeta?: { [key: string]: any };
3976
+ bizType?: string;
3488
3977
  /**
3489
3978
  * @example
3490
- * pdf
3979
+ * null
3491
3980
  */
3492
- fileType?: string;
3981
+ extraMessage?: any;
3493
3982
  /**
3494
3983
  * @example
3495
3984
  * 2024-01-01 00:00:00
@@ -3502,45 +3991,51 @@ export class GetFilterDocumentListResponseBodyDataRecords extends $tea.Model {
3502
3991
  gmtModified?: string;
3503
3992
  /**
3504
3993
  * @example
3505
- * sdfgsjdfg
3994
+ * 210
3506
3995
  */
3507
- libraryId?: string;
3996
+ id?: number;
3997
+ llmAnswer?: string;
3998
+ llmPrompt?: string;
3508
3999
  /**
3509
4000
  * @example
3510
- * WaitRefresh
4001
+ * qwen-max
3511
4002
  */
3512
- statusCode?: string;
3513
- title?: string;
4003
+ llmType?: string;
3514
4004
  /**
3515
4005
  * @example
3516
4006
  * null
3517
4007
  */
3518
- url?: string;
4008
+ sessionId?: string;
4009
+ userQuery?: string;
3519
4010
  static names(): { [key: string]: string } {
3520
4011
  return {
3521
- docId: 'docId',
3522
- documentMeta: 'documentMeta',
3523
- fileType: 'fileType',
4012
+ bizId: 'bizId',
4013
+ bizType: 'bizType',
4014
+ extraMessage: 'extraMessage',
3524
4015
  gmtCreate: 'gmtCreate',
3525
4016
  gmtModified: 'gmtModified',
3526
- libraryId: 'libraryId',
3527
- statusCode: 'statusCode',
3528
- title: 'title',
3529
- url: 'url',
4017
+ id: 'id',
4018
+ llmAnswer: 'llmAnswer',
4019
+ llmPrompt: 'llmPrompt',
4020
+ llmType: 'llmType',
4021
+ sessionId: 'sessionId',
4022
+ userQuery: 'userQuery',
3530
4023
  };
3531
4024
  }
3532
4025
 
3533
4026
  static types(): { [key: string]: any } {
3534
4027
  return {
3535
- docId: 'string',
3536
- documentMeta: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
3537
- fileType: 'string',
4028
+ bizId: 'string',
4029
+ bizType: 'string',
4030
+ extraMessage: 'any',
3538
4031
  gmtCreate: 'string',
3539
4032
  gmtModified: 'string',
3540
- libraryId: 'string',
3541
- statusCode: 'string',
3542
- title: 'string',
3543
- url: 'string',
4033
+ id: 'number',
4034
+ llmAnswer: 'string',
4035
+ llmPrompt: 'string',
4036
+ llmType: 'string',
4037
+ sessionId: 'string',
4038
+ userQuery: 'string',
3544
4039
  };
3545
4040
  }
3546
4041
 
@@ -3549,7 +4044,7 @@ export class GetFilterDocumentListResponseBodyDataRecords extends $tea.Model {
3549
4044
  }
3550
4045
  }
3551
4046
 
3552
- export class GetFilterDocumentListResponseBodyData extends $tea.Model {
4047
+ export class GetHistoryListByBizTypeResponseBodyData extends $tea.Model {
3553
4048
  /**
3554
4049
  * @example
3555
4050
  * 1
@@ -3560,7 +4055,7 @@ export class GetFilterDocumentListResponseBodyData extends $tea.Model {
3560
4055
  * 10
3561
4056
  */
3562
4057
  pageSize?: number;
3563
- records?: GetFilterDocumentListResponseBodyDataRecords[];
4058
+ records?: GetHistoryListByBizTypeResponseBodyDataRecords[];
3564
4059
  /**
3565
4060
  * @example
3566
4061
  * 10
@@ -3585,7 +4080,7 @@ export class GetFilterDocumentListResponseBodyData extends $tea.Model {
3585
4080
  return {
3586
4081
  currentPage: 'number',
3587
4082
  pageSize: 'number',
3588
- records: { 'type': 'array', 'itemType': GetFilterDocumentListResponseBodyDataRecords },
4083
+ records: { 'type': 'array', 'itemType': GetHistoryListByBizTypeResponseBodyDataRecords },
3589
4084
  totalPages: 'number',
3590
4085
  totalRecords: 'number',
3591
4086
  };
@@ -5395,30 +5890,209 @@ export class RunChatResultGenerationRequestToolsFunctionParameters extends $tea.
5395
5890
  }
5396
5891
  }
5397
5892
 
5398
- export class RunChatResultGenerationRequestToolsFunction extends $tea.Model {
5399
- description?: string;
5893
+ export class RunChatResultGenerationRequestToolsFunction extends $tea.Model {
5894
+ description?: string;
5895
+ /**
5896
+ * @example
5897
+ * get_time
5898
+ */
5899
+ name?: string;
5900
+ parameters?: RunChatResultGenerationRequestToolsFunctionParameters;
5901
+ required?: string[];
5902
+ static names(): { [key: string]: string } {
5903
+ return {
5904
+ description: 'description',
5905
+ name: 'name',
5906
+ parameters: 'parameters',
5907
+ required: 'required',
5908
+ };
5909
+ }
5910
+
5911
+ static types(): { [key: string]: any } {
5912
+ return {
5913
+ description: 'string',
5914
+ name: 'string',
5915
+ parameters: RunChatResultGenerationRequestToolsFunctionParameters,
5916
+ required: { 'type': 'array', 'itemType': 'string' },
5917
+ };
5918
+ }
5919
+
5920
+ constructor(map?: { [key: string]: any }) {
5921
+ super(map);
5922
+ }
5923
+ }
5924
+
5925
+ export class RunChatResultGenerationRequestTools extends $tea.Model {
5926
+ function?: RunChatResultGenerationRequestToolsFunction;
5927
+ /**
5928
+ * @example
5929
+ * function
5930
+ */
5931
+ type?: string;
5932
+ static names(): { [key: string]: string } {
5933
+ return {
5934
+ function: 'function',
5935
+ type: 'type',
5936
+ };
5937
+ }
5938
+
5939
+ static types(): { [key: string]: any } {
5940
+ return {
5941
+ function: RunChatResultGenerationRequestToolsFunction,
5942
+ type: 'string',
5943
+ };
5944
+ }
5945
+
5946
+ constructor(map?: { [key: string]: any }) {
5947
+ super(map);
5948
+ }
5949
+ }
5950
+
5951
+ export class RunChatResultGenerationResponseBodyChoicesMessage extends $tea.Model {
5952
+ content?: string;
5953
+ /**
5954
+ * @example
5955
+ * user
5956
+ */
5957
+ role?: string;
5958
+ toolCalls?: { [key: string]: any }[];
5959
+ static names(): { [key: string]: string } {
5960
+ return {
5961
+ content: 'content',
5962
+ role: 'role',
5963
+ toolCalls: 'toolCalls',
5964
+ };
5965
+ }
5966
+
5967
+ static types(): { [key: string]: any } {
5968
+ return {
5969
+ content: 'string',
5970
+ role: 'string',
5971
+ toolCalls: { 'type': 'array', 'itemType': { 'type': 'map', 'keyType': 'string', 'valueType': 'any' } },
5972
+ };
5973
+ }
5974
+
5975
+ constructor(map?: { [key: string]: any }) {
5976
+ super(map);
5977
+ }
5978
+ }
5979
+
5980
+ export class RunChatResultGenerationResponseBodyChoices extends $tea.Model {
5981
+ /**
5982
+ * @example
5983
+ * null
5984
+ */
5985
+ finishReason?: string;
5986
+ /**
5987
+ * @example
5988
+ * 0
5989
+ */
5990
+ index?: number;
5991
+ message?: RunChatResultGenerationResponseBodyChoicesMessage;
5992
+ static names(): { [key: string]: string } {
5993
+ return {
5994
+ finishReason: 'finishReason',
5995
+ index: 'index',
5996
+ message: 'message',
5997
+ };
5998
+ }
5999
+
6000
+ static types(): { [key: string]: any } {
6001
+ return {
6002
+ finishReason: 'string',
6003
+ index: 'number',
6004
+ message: RunChatResultGenerationResponseBodyChoicesMessage,
6005
+ };
6006
+ }
6007
+
6008
+ constructor(map?: { [key: string]: any }) {
6009
+ super(map);
6010
+ }
6011
+ }
6012
+
6013
+ export class RunChatResultGenerationResponseBodyUsage extends $tea.Model {
6014
+ /**
6015
+ * @example
6016
+ * 0
6017
+ */
6018
+ imageCount?: number;
6019
+ /**
6020
+ * @example
6021
+ * 0
6022
+ */
6023
+ imageTokens?: number;
6024
+ /**
6025
+ * @example
6026
+ * 200
6027
+ */
6028
+ inputTokens?: number;
6029
+ /**
6030
+ * @example
6031
+ * 300
6032
+ */
6033
+ outputTokens?: number;
6034
+ /**
6035
+ * @example
6036
+ * 500
6037
+ */
6038
+ totalTokens?: number;
6039
+ static names(): { [key: string]: string } {
6040
+ return {
6041
+ imageCount: 'imageCount',
6042
+ imageTokens: 'imageTokens',
6043
+ inputTokens: 'inputTokens',
6044
+ outputTokens: 'outputTokens',
6045
+ totalTokens: 'totalTokens',
6046
+ };
6047
+ }
6048
+
6049
+ static types(): { [key: string]: any } {
6050
+ return {
6051
+ imageCount: 'number',
6052
+ imageTokens: 'number',
6053
+ inputTokens: 'number',
6054
+ outputTokens: 'number',
6055
+ totalTokens: 'number',
6056
+ };
6057
+ }
6058
+
6059
+ constructor(map?: { [key: string]: any }) {
6060
+ super(map);
6061
+ }
6062
+ }
6063
+
6064
+ export class RunLibraryChatGenerationRequestQueryCriteriaAnd extends $tea.Model {
5400
6065
  /**
5401
6066
  * @example
5402
- * get_time
6067
+ * 0.5
5403
6068
  */
5404
- name?: string;
5405
- parameters?: RunChatResultGenerationRequestToolsFunctionParameters;
5406
- required?: string[];
6069
+ boost?: number;
6070
+ /**
6071
+ * @example
6072
+ * city
6073
+ */
6074
+ key?: string;
6075
+ /**
6076
+ * @example
6077
+ * eq
6078
+ */
6079
+ operator?: string;
6080
+ value?: string;
5407
6081
  static names(): { [key: string]: string } {
5408
6082
  return {
5409
- description: 'description',
5410
- name: 'name',
5411
- parameters: 'parameters',
5412
- required: 'required',
6083
+ boost: 'boost',
6084
+ key: 'key',
6085
+ operator: 'operator',
6086
+ value: 'value',
5413
6087
  };
5414
6088
  }
5415
6089
 
5416
6090
  static types(): { [key: string]: any } {
5417
6091
  return {
5418
- description: 'string',
5419
- name: 'string',
5420
- parameters: RunChatResultGenerationRequestToolsFunctionParameters,
5421
- required: { 'type': 'array', 'itemType': 'string' },
6092
+ boost: 'number',
6093
+ key: 'string',
6094
+ operator: 'string',
6095
+ value: 'string',
5422
6096
  };
5423
6097
  }
5424
6098
 
@@ -5427,24 +6101,38 @@ export class RunChatResultGenerationRequestToolsFunction extends $tea.Model {
5427
6101
  }
5428
6102
  }
5429
6103
 
5430
- export class RunChatResultGenerationRequestTools extends $tea.Model {
5431
- function?: RunChatResultGenerationRequestToolsFunction;
6104
+ export class RunLibraryChatGenerationRequestQueryCriteriaOr extends $tea.Model {
5432
6105
  /**
5433
6106
  * @example
5434
- * function
6107
+ * 0.5
5435
6108
  */
5436
- type?: string;
6109
+ boost?: number;
6110
+ /**
6111
+ * @example
6112
+ * city
6113
+ */
6114
+ key?: string;
6115
+ /**
6116
+ * @example
6117
+ * eq
6118
+ */
6119
+ operator?: string;
6120
+ value?: string;
5437
6121
  static names(): { [key: string]: string } {
5438
6122
  return {
5439
- function: 'function',
5440
- type: 'type',
6123
+ boost: 'boost',
6124
+ key: 'key',
6125
+ operator: 'operator',
6126
+ value: 'value',
5441
6127
  };
5442
6128
  }
5443
6129
 
5444
6130
  static types(): { [key: string]: any } {
5445
6131
  return {
5446
- function: RunChatResultGenerationRequestToolsFunction,
5447
- type: 'string',
6132
+ boost: 'number',
6133
+ key: 'string',
6134
+ operator: 'string',
6135
+ value: 'string',
5448
6136
  };
5449
6137
  }
5450
6138
 
@@ -5453,27 +6141,20 @@ export class RunChatResultGenerationRequestTools extends $tea.Model {
5453
6141
  }
5454
6142
  }
5455
6143
 
5456
- export class RunChatResultGenerationResponseBodyChoicesMessage extends $tea.Model {
5457
- content?: string;
5458
- /**
5459
- * @example
5460
- * user
5461
- */
5462
- role?: string;
5463
- toolCalls?: { [key: string]: any }[];
6144
+ export class RunLibraryChatGenerationRequestQueryCriteria extends $tea.Model {
6145
+ and?: RunLibraryChatGenerationRequestQueryCriteriaAnd[];
6146
+ or?: RunLibraryChatGenerationRequestQueryCriteriaOr[];
5464
6147
  static names(): { [key: string]: string } {
5465
6148
  return {
5466
- content: 'content',
5467
- role: 'role',
5468
- toolCalls: 'toolCalls',
6149
+ and: 'and',
6150
+ or: 'or',
5469
6151
  };
5470
6152
  }
5471
6153
 
5472
6154
  static types(): { [key: string]: any } {
5473
6155
  return {
5474
- content: 'string',
5475
- role: 'string',
5476
- toolCalls: { 'type': 'array', 'itemType': { 'type': 'map', 'keyType': 'string', 'valueType': 'any' } },
6156
+ and: { 'type': 'array', 'itemType': RunLibraryChatGenerationRequestQueryCriteriaAnd },
6157
+ or: { 'type': 'array', 'itemType': RunLibraryChatGenerationRequestQueryCriteriaOr },
5477
6158
  };
5478
6159
  }
5479
6160
 
@@ -5482,31 +6163,28 @@ export class RunChatResultGenerationResponseBodyChoicesMessage extends $tea.Mode
5482
6163
  }
5483
6164
  }
5484
6165
 
5485
- export class RunChatResultGenerationResponseBodyChoices extends $tea.Model {
6166
+ export class RunLibraryChatGenerationRequestTextSearchParameter extends $tea.Model {
5486
6167
  /**
5487
6168
  * @example
5488
- * null
6169
+ * 10
5489
6170
  */
5490
- finishReason?: string;
6171
+ limit?: number;
5491
6172
  /**
5492
6173
  * @example
5493
- * 0
6174
+ * IkMaxWord
5494
6175
  */
5495
- index?: number;
5496
- message?: RunChatResultGenerationResponseBodyChoicesMessage;
6176
+ searchAnalyzerType?: string;
5497
6177
  static names(): { [key: string]: string } {
5498
6178
  return {
5499
- finishReason: 'finishReason',
5500
- index: 'index',
5501
- message: 'message',
6179
+ limit: 'limit',
6180
+ searchAnalyzerType: 'searchAnalyzerType',
5502
6181
  };
5503
6182
  }
5504
6183
 
5505
6184
  static types(): { [key: string]: any } {
5506
6185
  return {
5507
- finishReason: 'string',
5508
- index: 'number',
5509
- message: RunChatResultGenerationResponseBodyChoicesMessage,
6186
+ limit: 'number',
6187
+ searchAnalyzerType: 'string',
5510
6188
  };
5511
6189
  }
5512
6190
 
@@ -5515,49 +6193,21 @@ export class RunChatResultGenerationResponseBodyChoices extends $tea.Model {
5515
6193
  }
5516
6194
  }
5517
6195
 
5518
- export class RunChatResultGenerationResponseBodyUsage extends $tea.Model {
5519
- /**
5520
- * @example
5521
- * 0
5522
- */
5523
- imageCount?: number;
5524
- /**
5525
- * @example
5526
- * 0
5527
- */
5528
- imageTokens?: number;
5529
- /**
5530
- * @example
5531
- * 200
5532
- */
5533
- inputTokens?: number;
5534
- /**
5535
- * @example
5536
- * 300
5537
- */
5538
- outputTokens?: number;
6196
+ export class RunLibraryChatGenerationRequestVectorSearchParameter extends $tea.Model {
5539
6197
  /**
5540
6198
  * @example
5541
- * 500
6199
+ * 10
5542
6200
  */
5543
- totalTokens?: number;
6201
+ limit?: number;
5544
6202
  static names(): { [key: string]: string } {
5545
6203
  return {
5546
- imageCount: 'imageCount',
5547
- imageTokens: 'imageTokens',
5548
- inputTokens: 'inputTokens',
5549
- outputTokens: 'outputTokens',
5550
- totalTokens: 'totalTokens',
6204
+ limit: 'limit',
5551
6205
  };
5552
6206
  }
5553
6207
 
5554
6208
  static types(): { [key: string]: any } {
5555
6209
  return {
5556
- imageCount: 'number',
5557
- imageTokens: 'number',
5558
- inputTokens: 'number',
5559
- outputTokens: 'number',
5560
- totalTokens: 'number',
6210
+ limit: 'number',
5561
6211
  };
5562
6212
  }
5563
6213
 
@@ -6425,6 +7075,63 @@ export default class Client extends OpenApi {
6425
7075
  return await this.getFilterDocumentListWithOptions(workspaceId, request, headers, runtime);
6426
7076
  }
6427
7077
 
7078
+ /**
7079
+ * 分页查询文档库列表
7080
+ *
7081
+ * @param request - GetHistoryListByBizTypeRequest
7082
+ * @param headers - map
7083
+ * @param runtime - runtime options for this request RuntimeOptions
7084
+ * @returns GetHistoryListByBizTypeResponse
7085
+ */
7086
+ async getHistoryListByBizTypeWithOptions(workspaceId: string, request: GetHistoryListByBizTypeRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<GetHistoryListByBizTypeResponse> {
7087
+ Util.validateModel(request);
7088
+ let query : {[key: string ]: any} = { };
7089
+ if (!Util.isUnset(request.bizId)) {
7090
+ query["bizId"] = request.bizId;
7091
+ }
7092
+
7093
+ if (!Util.isUnset(request.bizType)) {
7094
+ query["bizType"] = request.bizType;
7095
+ }
7096
+
7097
+ if (!Util.isUnset(request.page)) {
7098
+ query["page"] = request.page;
7099
+ }
7100
+
7101
+ if (!Util.isUnset(request.pageSize)) {
7102
+ query["pageSize"] = request.pageSize;
7103
+ }
7104
+
7105
+ let req = new $OpenApi.OpenApiRequest({
7106
+ headers: headers,
7107
+ query: OpenApiUtil.query(query),
7108
+ });
7109
+ let params = new $OpenApi.Params({
7110
+ action: "GetHistoryListByBizType",
7111
+ version: "2024-06-28",
7112
+ protocol: "HTTPS",
7113
+ pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/history/list`,
7114
+ method: "GET",
7115
+ authType: "AK",
7116
+ style: "ROA",
7117
+ reqBodyType: "json",
7118
+ bodyType: "json",
7119
+ });
7120
+ return $tea.cast<GetHistoryListByBizTypeResponse>(await this.callApi(params, req, runtime), new GetHistoryListByBizTypeResponse({}));
7121
+ }
7122
+
7123
+ /**
7124
+ * 分页查询文档库列表
7125
+ *
7126
+ * @param request - GetHistoryListByBizTypeRequest
7127
+ * @returns GetHistoryListByBizTypeResponse
7128
+ */
7129
+ async getHistoryListByBizType(workspaceId: string, request: GetHistoryListByBizTypeRequest): Promise<GetHistoryListByBizTypeResponse> {
7130
+ let runtime = new $Util.RuntimeOptions({ });
7131
+ let headers : {[key: string ]: string} = { };
7132
+ return await this.getHistoryListByBizTypeWithOptions(workspaceId, request, headers, runtime);
7133
+ }
7134
+
6428
7135
  /**
6429
7136
  * 获取文档库配置详情
6430
7137
  *
@@ -6833,6 +7540,119 @@ export default class Client extends OpenApi {
6833
7540
  return await this.runChatResultGenerationWithOptions(workspaceId, request, headers, runtime);
6834
7541
  }
6835
7542
 
7543
+ /**
7544
+ * 获取生成式对话结果
7545
+ *
7546
+ * @param request - RunLibraryChatGenerationRequest
7547
+ * @param headers - map
7548
+ * @param runtime - runtime options for this request RuntimeOptions
7549
+ * @returns RunLibraryChatGenerationResponse
7550
+ */
7551
+ async runLibraryChatGenerationWithOptions(workspaceId: string, request: RunLibraryChatGenerationRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<RunLibraryChatGenerationResponse> {
7552
+ Util.validateModel(request);
7553
+ let body : {[key: string ]: any} = { };
7554
+ if (!Util.isUnset(request.docIdList)) {
7555
+ body["docIdList"] = request.docIdList;
7556
+ }
7557
+
7558
+ if (!Util.isUnset(request.enableFollowUp)) {
7559
+ body["enableFollowUp"] = request.enableFollowUp;
7560
+ }
7561
+
7562
+ if (!Util.isUnset(request.enableMultiQuery)) {
7563
+ body["enableMultiQuery"] = request.enableMultiQuery;
7564
+ }
7565
+
7566
+ if (!Util.isUnset(request.enableOpenQa)) {
7567
+ body["enableOpenQa"] = request.enableOpenQa;
7568
+ }
7569
+
7570
+ if (!Util.isUnset(request.followUpLlm)) {
7571
+ body["followUpLlm"] = request.followUpLlm;
7572
+ }
7573
+
7574
+ if (!Util.isUnset(request.libraryId)) {
7575
+ body["libraryId"] = request.libraryId;
7576
+ }
7577
+
7578
+ if (!Util.isUnset(request.llmType)) {
7579
+ body["llmType"] = request.llmType;
7580
+ }
7581
+
7582
+ if (!Util.isUnset(request.multiQueryLlm)) {
7583
+ body["multiQueryLlm"] = request.multiQueryLlm;
7584
+ }
7585
+
7586
+ if (!Util.isUnset(request.query)) {
7587
+ body["query"] = request.query;
7588
+ }
7589
+
7590
+ if (!Util.isUnset(request.queryCriteria)) {
7591
+ body["queryCriteria"] = request.queryCriteria;
7592
+ }
7593
+
7594
+ if (!Util.isUnset(request.rerankType)) {
7595
+ body["rerankType"] = request.rerankType;
7596
+ }
7597
+
7598
+ if (!Util.isUnset(request.sessionId)) {
7599
+ body["sessionId"] = request.sessionId;
7600
+ }
7601
+
7602
+ if (!Util.isUnset(request.stream)) {
7603
+ body["stream"] = request.stream;
7604
+ }
7605
+
7606
+ if (!Util.isUnset(request.subQueryList)) {
7607
+ body["subQueryList"] = request.subQueryList;
7608
+ }
7609
+
7610
+ if (!Util.isUnset(request.textSearchParameter)) {
7611
+ body["textSearchParameter"] = request.textSearchParameter;
7612
+ }
7613
+
7614
+ if (!Util.isUnset(request.topK)) {
7615
+ body["topK"] = request.topK;
7616
+ }
7617
+
7618
+ if (!Util.isUnset(request.vectorSearchParameter)) {
7619
+ body["vectorSearchParameter"] = request.vectorSearchParameter;
7620
+ }
7621
+
7622
+ if (!Util.isUnset(request.withDocumentReference)) {
7623
+ body["withDocumentReference"] = request.withDocumentReference;
7624
+ }
7625
+
7626
+ let req = new $OpenApi.OpenApiRequest({
7627
+ headers: headers,
7628
+ body: OpenApiUtil.parseToMap(body),
7629
+ });
7630
+ let params = new $OpenApi.Params({
7631
+ action: "RunLibraryChatGeneration",
7632
+ version: "2024-06-28",
7633
+ protocol: "HTTPS",
7634
+ pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/run/library/chat/generation`,
7635
+ method: "POST",
7636
+ authType: "AK",
7637
+ style: "ROA",
7638
+ reqBodyType: "json",
7639
+ bodyType: "json",
7640
+ });
7641
+ return $tea.cast<RunLibraryChatGenerationResponse>(await this.callApi(params, req, runtime), new RunLibraryChatGenerationResponse({}));
7642
+ }
7643
+
7644
+ /**
7645
+ * 获取生成式对话结果
7646
+ *
7647
+ * @param request - RunLibraryChatGenerationRequest
7648
+ * @returns RunLibraryChatGenerationResponse
7649
+ */
7650
+ async runLibraryChatGeneration(workspaceId: string, request: RunLibraryChatGenerationRequest): Promise<RunLibraryChatGenerationResponse> {
7651
+ let runtime = new $Util.RuntimeOptions({ });
7652
+ let headers : {[key: string ]: string} = { };
7653
+ return await this.runLibraryChatGenerationWithOptions(workspaceId, request, headers, runtime);
7654
+ }
7655
+
6836
7656
  /**
6837
7657
  * 更新文档
6838
7658
  *