@petercatai/whisker-client 5.0.0 → 6.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.
- package/dist/api.d.ts +651 -204
- package/dist/api.js +100 -34
- package/package.json +4 -4
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** WohuSpaceRole */
|
|
2
|
+
export declare enum IWohuSpaceRole {
|
|
3
|
+
SPACE_MASTER = "SPACE_MASTER",
|
|
4
|
+
SPACE_MEMBER = "SPACE_MEMBER",
|
|
5
|
+
SPACE_GUEST = "SPACE_GUEST"
|
|
6
|
+
}
|
|
1
7
|
/**
|
|
2
8
|
* WebhookSubscriptionStatus
|
|
3
9
|
* Webhook订阅状态
|
|
@@ -27,6 +33,7 @@ export declare enum IWebhookEventType {
|
|
|
27
33
|
KnowledgeCreated = "knowledge.created",
|
|
28
34
|
KnowledgeUpdated = "knowledge.updated",
|
|
29
35
|
KnowledgeDeleted = "knowledge.deleted",
|
|
36
|
+
TaskCompleted = "task.completed",
|
|
30
37
|
TaskHituPackageCompleted = "task.hitu_package.completed",
|
|
31
38
|
TaskHituPackageAnalyseCompleted = "task.hitu_package_analyse.completed",
|
|
32
39
|
TaskComponentRepoAnalyseCompleted = "task.component_repo_analyse.completed",
|
|
@@ -92,7 +99,8 @@ export declare enum ISchedulerRunResult {
|
|
|
92
99
|
* Supported scheduler job types.
|
|
93
100
|
*/
|
|
94
101
|
export declare enum ISchedulerJobType {
|
|
95
|
-
KnowledgeRefresh = "knowledge_refresh"
|
|
102
|
+
KnowledgeRefresh = "knowledge_refresh",
|
|
103
|
+
MemoryConsolidation = "memory_consolidation"
|
|
96
104
|
}
|
|
97
105
|
/**
|
|
98
106
|
* SchedulerJobStatus
|
|
@@ -157,12 +165,11 @@ export declare enum IOperator {
|
|
|
157
165
|
}
|
|
158
166
|
/**
|
|
159
167
|
* MemoryTypeEnum
|
|
160
|
-
* Memory type
|
|
168
|
+
* Memory lifecycle type
|
|
161
169
|
*/
|
|
162
170
|
export declare enum IMemoryTypeEnum {
|
|
163
171
|
MemoryWorking = "memory_working",
|
|
164
|
-
MemoryLongTerm = "memory_long_term"
|
|
165
|
-
MemoryUser = "memory_user"
|
|
172
|
+
MemoryLongTerm = "memory_long_term"
|
|
166
173
|
}
|
|
167
174
|
/**
|
|
168
175
|
* MemoryStatusEnum
|
|
@@ -172,6 +179,26 @@ export declare enum IMemoryStatusEnum {
|
|
|
172
179
|
Activated = "activated",
|
|
173
180
|
Archived = "archived"
|
|
174
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* MemoryInputTypeEnum
|
|
184
|
+
* Memory input type
|
|
185
|
+
*/
|
|
186
|
+
export declare enum IMemoryInputTypeEnum {
|
|
187
|
+
Direct = "direct",
|
|
188
|
+
Conversation = "conversation",
|
|
189
|
+
Consolidation = "consolidation"
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* MemoryCortexEnum
|
|
193
|
+
* Brain cortex region enum - maps to space_id
|
|
194
|
+
*/
|
|
195
|
+
export declare enum IMemoryCortexEnum {
|
|
196
|
+
MemHippocampus = "mem_hippocampus",
|
|
197
|
+
MemSemantic = "mem_semantic",
|
|
198
|
+
MemEpisodic = "mem_episodic",
|
|
199
|
+
MemPreference = "mem_preference",
|
|
200
|
+
MemProcedural = "mem_procedural"
|
|
201
|
+
}
|
|
175
202
|
/**
|
|
176
203
|
* Language
|
|
177
204
|
* Enum of the programming languages.
|
|
@@ -186,6 +213,7 @@ export declare enum ILanguage {
|
|
|
186
213
|
Php = "php",
|
|
187
214
|
Proto = "proto",
|
|
188
215
|
Python = "python",
|
|
216
|
+
R = "r",
|
|
189
217
|
Rst = "rst",
|
|
190
218
|
Ruby = "ruby",
|
|
191
219
|
Rust = "rust",
|
|
@@ -256,8 +284,7 @@ export declare enum IKnowledgeTypeEnum {
|
|
|
256
284
|
NodePackage = "node_package",
|
|
257
285
|
NodePackageElement = "node_package_element",
|
|
258
286
|
MemoryWorking = "memory_working",
|
|
259
|
-
MemoryLongTerm = "memory_long_term"
|
|
260
|
-
MemoryUser = "memory_user"
|
|
287
|
+
MemoryLongTerm = "memory_long_term"
|
|
261
288
|
}
|
|
262
289
|
/**
|
|
263
290
|
* KnowledgeSourceEnum
|
|
@@ -412,6 +439,148 @@ export interface IActiveStatusUpdate {
|
|
|
412
439
|
/** Status */
|
|
413
440
|
status: boolean;
|
|
414
441
|
}
|
|
442
|
+
/** AdminBackfillAntCodeBranchDetail */
|
|
443
|
+
export interface IAdminBackfillAntCodeBranchDetail {
|
|
444
|
+
/** Knowledge Id */
|
|
445
|
+
knowledge_id: string;
|
|
446
|
+
/** Space Id */
|
|
447
|
+
space_id: string;
|
|
448
|
+
/** Knowledge Name */
|
|
449
|
+
knowledge_name: string;
|
|
450
|
+
/** Repo Name */
|
|
451
|
+
repo_name?: string | null;
|
|
452
|
+
/** Url */
|
|
453
|
+
url?: string | null;
|
|
454
|
+
/** Resolved Branch */
|
|
455
|
+
resolved_branch?: string | null;
|
|
456
|
+
/** Status */
|
|
457
|
+
status: string;
|
|
458
|
+
/** Reason */
|
|
459
|
+
reason?: string | null;
|
|
460
|
+
}
|
|
461
|
+
/** AdminBackfillAntCodeBranchRequest */
|
|
462
|
+
export interface IAdminBackfillAntCodeBranchRequest {
|
|
463
|
+
/**
|
|
464
|
+
* Tenant Id
|
|
465
|
+
* 租户ID(必填)
|
|
466
|
+
*/
|
|
467
|
+
tenant_id: string;
|
|
468
|
+
/**
|
|
469
|
+
* Space Id
|
|
470
|
+
* 空间ID(可选)
|
|
471
|
+
*/
|
|
472
|
+
space_id?: string | null;
|
|
473
|
+
/**
|
|
474
|
+
* Dry Run
|
|
475
|
+
* 仅预览,不实际写库
|
|
476
|
+
* @default false
|
|
477
|
+
*/
|
|
478
|
+
dry_run?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Limit
|
|
481
|
+
* 最大处理数量保护
|
|
482
|
+
* @min 1
|
|
483
|
+
* @max 20000
|
|
484
|
+
* @default 5000
|
|
485
|
+
*/
|
|
486
|
+
limit?: number;
|
|
487
|
+
/**
|
|
488
|
+
* Max Concurrency
|
|
489
|
+
* 并发度
|
|
490
|
+
* @min 1
|
|
491
|
+
* @max 50
|
|
492
|
+
* @default 10
|
|
493
|
+
*/
|
|
494
|
+
max_concurrency?: number;
|
|
495
|
+
}
|
|
496
|
+
/** AdminBackfillAntCodeBranchResponse */
|
|
497
|
+
export interface IAdminBackfillAntCodeBranchResponse {
|
|
498
|
+
/** Total Scanned */
|
|
499
|
+
total_scanned: number;
|
|
500
|
+
/** Matched Branch Null */
|
|
501
|
+
matched_branch_null: number;
|
|
502
|
+
/** Updated Count */
|
|
503
|
+
updated_count: number;
|
|
504
|
+
/** Failed Count */
|
|
505
|
+
failed_count: number;
|
|
506
|
+
/** Details */
|
|
507
|
+
details: IAdminBackfillAntCodeBranchDetail[];
|
|
508
|
+
}
|
|
509
|
+
/** AdminCheckChunkKnowledgeConsistencyRequest */
|
|
510
|
+
export interface IAdminCheckChunkKnowledgeConsistencyRequest {
|
|
511
|
+
/**
|
|
512
|
+
* Tenant Id
|
|
513
|
+
* 需要检查的一租户 ID
|
|
514
|
+
*/
|
|
515
|
+
tenant_id: string;
|
|
516
|
+
/**
|
|
517
|
+
* Space Id
|
|
518
|
+
* 可选:限制检查范围到指定 space_id;不传表示扫描全部 space。
|
|
519
|
+
*/
|
|
520
|
+
space_id?: string | null;
|
|
521
|
+
/**
|
|
522
|
+
* Dry Run
|
|
523
|
+
* 如果为 true,仅校验,不执行物理删除
|
|
524
|
+
* @default false
|
|
525
|
+
*/
|
|
526
|
+
dry_run?: boolean;
|
|
527
|
+
/**
|
|
528
|
+
* Index Names
|
|
529
|
+
* 指定需要扫描/删除的 chunk 索引列表(显式传入以避免遗漏)。
|
|
530
|
+
* @minItems 1
|
|
531
|
+
*/
|
|
532
|
+
index_names: string[];
|
|
533
|
+
/**
|
|
534
|
+
* Max Missing Preview
|
|
535
|
+
* 返回的缺失 knowledge_id 预览数量上限
|
|
536
|
+
* @min 1
|
|
537
|
+
* @max 500
|
|
538
|
+
* @default 50
|
|
539
|
+
*/
|
|
540
|
+
max_missing_preview?: number;
|
|
541
|
+
}
|
|
542
|
+
/** AdminCheckChunkKnowledgeConsistencyResponse */
|
|
543
|
+
export interface IAdminCheckChunkKnowledgeConsistencyResponse {
|
|
544
|
+
/** Tenant Id */
|
|
545
|
+
tenant_id: string;
|
|
546
|
+
/** Scanned Index Names */
|
|
547
|
+
scanned_index_names: string[];
|
|
548
|
+
/** Scanned Knowledge Id Count */
|
|
549
|
+
scanned_knowledge_id_count: number;
|
|
550
|
+
/** Existing Knowledge Id Count */
|
|
551
|
+
existing_knowledge_id_count: number;
|
|
552
|
+
/** Missing Knowledge Id Count */
|
|
553
|
+
missing_knowledge_id_count: number;
|
|
554
|
+
/** Missing Knowledge Id Preview */
|
|
555
|
+
missing_knowledge_id_preview: string[];
|
|
556
|
+
/** Deleted Missing Knowledge Id Count */
|
|
557
|
+
deleted_missing_knowledge_id_count: number;
|
|
558
|
+
}
|
|
559
|
+
/** AdminDeleteWohuProductSpaceRequest */
|
|
560
|
+
export interface IAdminDeleteWohuProductSpaceRequest {
|
|
561
|
+
/**
|
|
562
|
+
* Space Id
|
|
563
|
+
* wohu product 的 space_id(不是 whisker space_id)
|
|
564
|
+
*/
|
|
565
|
+
space_id: string;
|
|
566
|
+
/**
|
|
567
|
+
* Dry Run
|
|
568
|
+
* 仅预览,不实际删除
|
|
569
|
+
* @default false
|
|
570
|
+
*/
|
|
571
|
+
dry_run?: boolean;
|
|
572
|
+
}
|
|
573
|
+
/** AdminDeleteWohuProductSpaceResponse */
|
|
574
|
+
export interface IAdminDeleteWohuProductSpaceResponse {
|
|
575
|
+
/** Space Id */
|
|
576
|
+
space_id: string;
|
|
577
|
+
/** Dry Run */
|
|
578
|
+
dry_run: boolean;
|
|
579
|
+
/** Deleted Space */
|
|
580
|
+
deleted_space: number;
|
|
581
|
+
/** Deleted Space User Role */
|
|
582
|
+
deleted_space_user_role: number;
|
|
583
|
+
}
|
|
415
584
|
/**
|
|
416
585
|
* AdminManageSchedulerRequest
|
|
417
586
|
* 管理员按条件管理 scheduler 请求
|
|
@@ -923,62 +1092,155 @@ export interface IBatchQueryRequest {
|
|
|
923
1092
|
knowledge_names: string[];
|
|
924
1093
|
}
|
|
925
1094
|
/**
|
|
926
|
-
*
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
* Provides an interface to materialize the blob in different representations, and
|
|
930
|
-
* help to decouple the development of data loaders from the downstream parsing of
|
|
931
|
-
* the raw data.
|
|
932
|
-
*
|
|
933
|
-
* Inspired by: https://developer.mozilla.org/en-US/docs/Web/API/Blob
|
|
1095
|
+
* BindMemoryConsolidationRequest
|
|
1096
|
+
* 批量绑定记忆巩固 scheduler job 请求
|
|
934
1097
|
*
|
|
935
|
-
*
|
|
1098
|
+
* 调度配置字段与 SchedulerJobCreate 保持一致,
|
|
1099
|
+
* job_type / target_type / target_id 由接口自动填充。
|
|
1100
|
+
*/
|
|
1101
|
+
export interface IBindMemoryConsolidationRequest {
|
|
1102
|
+
/**
|
|
1103
|
+
* Tenant Id Prefix
|
|
1104
|
+
* 租户 ID 前缀,只对匹配的活跃租户绑定
|
|
1105
|
+
* @default "personal"
|
|
1106
|
+
*/
|
|
1107
|
+
tenant_id_prefix?: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* Dry Run
|
|
1110
|
+
* 预演模式:仅列出将被绑定的租户,不实际创建
|
|
1111
|
+
* @default false
|
|
1112
|
+
*/
|
|
1113
|
+
dry_run?: boolean;
|
|
1114
|
+
/**
|
|
1115
|
+
* Enabled
|
|
1116
|
+
* 是否启用
|
|
1117
|
+
* @default true
|
|
1118
|
+
*/
|
|
1119
|
+
enabled?: boolean;
|
|
1120
|
+
/** 调度类型:cron / interval */
|
|
1121
|
+
interval_type: ISchedulerIntervalType;
|
|
1122
|
+
/**
|
|
1123
|
+
* Cron Expression
|
|
1124
|
+
* Cron 表达式,interval_type=cron 时必填
|
|
1125
|
+
*/
|
|
1126
|
+
cron_expression?: string | null;
|
|
1127
|
+
/**
|
|
1128
|
+
* Cron 时区
|
|
1129
|
+
* @default "UTC"
|
|
1130
|
+
*/
|
|
1131
|
+
cron_timezone?: ISchedulerCronTimezone;
|
|
1132
|
+
/**
|
|
1133
|
+
* Interval Seconds
|
|
1134
|
+
* 间隔秒数,interval_type=interval 时必填
|
|
1135
|
+
*/
|
|
1136
|
+
interval_seconds?: number | null;
|
|
1137
|
+
/** Payload Ext */
|
|
1138
|
+
payload_ext?: Record<string, any>;
|
|
1139
|
+
/** Policy Ext */
|
|
1140
|
+
policy_ext?: Record<string, any>;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* BindMemoryConsolidationResponse
|
|
1144
|
+
* 批量绑定记忆巩固 scheduler job 响应
|
|
1145
|
+
*/
|
|
1146
|
+
export interface IBindMemoryConsolidationResponse {
|
|
1147
|
+
/** Tenant Id Prefix */
|
|
1148
|
+
tenant_id_prefix: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* Matched Count
|
|
1151
|
+
* 匹配到的租户数量
|
|
1152
|
+
*/
|
|
1153
|
+
matched_count: number;
|
|
1154
|
+
/**
|
|
1155
|
+
* Created Count
|
|
1156
|
+
* @default 0
|
|
1157
|
+
*/
|
|
1158
|
+
created_count?: number;
|
|
1159
|
+
/**
|
|
1160
|
+
* Updated Count
|
|
1161
|
+
* @default 0
|
|
1162
|
+
*/
|
|
1163
|
+
updated_count?: number;
|
|
1164
|
+
/**
|
|
1165
|
+
* Failed Count
|
|
1166
|
+
* @default 0
|
|
1167
|
+
*/
|
|
1168
|
+
failed_count?: number;
|
|
1169
|
+
/**
|
|
1170
|
+
* Dry Run
|
|
1171
|
+
* @default false
|
|
1172
|
+
*/
|
|
1173
|
+
dry_run?: boolean;
|
|
1174
|
+
/** Details */
|
|
1175
|
+
details?: IBindResultItem[];
|
|
1176
|
+
}
|
|
1177
|
+
/** BindResultItem */
|
|
1178
|
+
export interface IBindResultItem {
|
|
1179
|
+
/** Tenant Id */
|
|
1180
|
+
tenant_id: string;
|
|
1181
|
+
/** Status */
|
|
1182
|
+
status: "created" | "updated" | "failed";
|
|
1183
|
+
/** Job Id */
|
|
1184
|
+
job_id?: string | null;
|
|
1185
|
+
/** Error */
|
|
1186
|
+
error?: string | null;
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* Blob
|
|
1190
|
+
* Raw data abstraction for document loading and file processing.
|
|
936
1191
|
*
|
|
937
|
-
*
|
|
1192
|
+
* Represents raw bytes or text, either in-memory or by file reference. Used
|
|
1193
|
+
* primarily by document loaders to decouple data loading from parsing.
|
|
938
1194
|
*
|
|
939
|
-
*
|
|
1195
|
+
* Inspired by [Mozilla's `Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
|
|
940
1196
|
*
|
|
941
|
-
*
|
|
1197
|
+
* ???+ example "Initialize a blob from in-memory data"
|
|
942
1198
|
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
1199
|
+
* ```python
|
|
1200
|
+
* from langchain_core.documents import Blob
|
|
945
1201
|
*
|
|
946
|
-
*
|
|
947
|
-
* print(blob.as_bytes())
|
|
1202
|
+
* blob = Blob.from_data("Hello, world!")
|
|
948
1203
|
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
* print(f.read())
|
|
1204
|
+
* # Read the blob as a string
|
|
1205
|
+
* print(blob.as_string())
|
|
952
1206
|
*
|
|
953
|
-
*
|
|
1207
|
+
* # Read the blob as bytes
|
|
1208
|
+
* print(blob.as_bytes())
|
|
954
1209
|
*
|
|
955
|
-
*
|
|
1210
|
+
* # Read the blob as a byte stream
|
|
1211
|
+
* with blob.as_bytes_io() as f:
|
|
1212
|
+
* print(f.read())
|
|
1213
|
+
* ```
|
|
956
1214
|
*
|
|
957
|
-
*
|
|
1215
|
+
* ??? example "Load from memory and specify MIME type and metadata"
|
|
958
1216
|
*
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
* mime_type="text/plain",
|
|
962
|
-
* metadata={"source": "https://example.com"},
|
|
963
|
-
* )
|
|
1217
|
+
* ```python
|
|
1218
|
+
* from langchain_core.documents import Blob
|
|
964
1219
|
*
|
|
965
|
-
*
|
|
1220
|
+
* blob = Blob.from_data(
|
|
1221
|
+
* data="Hello, world!",
|
|
1222
|
+
* mime_type="text/plain",
|
|
1223
|
+
* metadata={"source": "https://example.com"},
|
|
1224
|
+
* )
|
|
1225
|
+
* ```
|
|
966
1226
|
*
|
|
967
|
-
*
|
|
1227
|
+
* ??? example "Load the blob from a file"
|
|
968
1228
|
*
|
|
969
|
-
*
|
|
1229
|
+
* ```python
|
|
1230
|
+
* from langchain_core.documents import Blob
|
|
970
1231
|
*
|
|
971
|
-
*
|
|
1232
|
+
* blob = Blob.from_path("path/to/file.txt")
|
|
972
1233
|
*
|
|
973
|
-
*
|
|
974
|
-
*
|
|
1234
|
+
* # Read the blob as a string
|
|
1235
|
+
* print(blob.as_string())
|
|
975
1236
|
*
|
|
976
|
-
*
|
|
977
|
-
*
|
|
1237
|
+
* # Read the blob as bytes
|
|
1238
|
+
* print(blob.as_bytes())
|
|
978
1239
|
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
1240
|
+
* # Read the blob as a byte stream
|
|
1241
|
+
* with blob.as_bytes_io() as f:
|
|
1242
|
+
* print(f.read())
|
|
1243
|
+
* ```
|
|
982
1244
|
*/
|
|
983
1245
|
export interface IBlob {
|
|
984
1246
|
/** Id */
|
|
@@ -1331,6 +1593,63 @@ export interface IEnableStatusUpdate {
|
|
|
1331
1593
|
/** Status */
|
|
1332
1594
|
status: boolean;
|
|
1333
1595
|
}
|
|
1596
|
+
/**
|
|
1597
|
+
* FileUploadCreate
|
|
1598
|
+
* 通过文件上传信息创建知识的简化 DTO。
|
|
1599
|
+
*
|
|
1600
|
+
* 系统根据 file_ext 自动推导 knowledge_type、source_type、source_config、split_config,
|
|
1601
|
+
* 调用方无需了解内部配置细节。
|
|
1602
|
+
*/
|
|
1603
|
+
export interface IFileUploadCreate {
|
|
1604
|
+
/**
|
|
1605
|
+
* Space Id
|
|
1606
|
+
* 空间 ID
|
|
1607
|
+
*/
|
|
1608
|
+
space_id: string;
|
|
1609
|
+
/**
|
|
1610
|
+
* File Name
|
|
1611
|
+
* 文件名(含扩展名),同时作为 knowledge_name
|
|
1612
|
+
* @maxLength 255
|
|
1613
|
+
*/
|
|
1614
|
+
file_name: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* File Ext
|
|
1617
|
+
* 文件扩展名(不含 '.'),如 pdf / md / xlsx
|
|
1618
|
+
*/
|
|
1619
|
+
file_ext: string;
|
|
1620
|
+
/**
|
|
1621
|
+
* File Url
|
|
1622
|
+
* 文件下载地址
|
|
1623
|
+
*/
|
|
1624
|
+
file_url: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* File Sha
|
|
1627
|
+
* 文件 MD5 摘要
|
|
1628
|
+
*/
|
|
1629
|
+
file_sha: string;
|
|
1630
|
+
/**
|
|
1631
|
+
* File Size
|
|
1632
|
+
* 文件大小(字节)
|
|
1633
|
+
* @min 0
|
|
1634
|
+
*/
|
|
1635
|
+
file_size: number;
|
|
1636
|
+
/**
|
|
1637
|
+
* Embedding Model Name
|
|
1638
|
+
* embedding 模型名
|
|
1639
|
+
*/
|
|
1640
|
+
embedding_model_name: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* Metadata
|
|
1643
|
+
* 附加元数据
|
|
1644
|
+
* @default {}
|
|
1645
|
+
*/
|
|
1646
|
+
metadata?: Record<string, any>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Parent Id
|
|
1649
|
+
* 父级知识 ID
|
|
1650
|
+
*/
|
|
1651
|
+
parent_id?: string | null;
|
|
1652
|
+
}
|
|
1334
1653
|
/**
|
|
1335
1654
|
* FileUploadResponse
|
|
1336
1655
|
* 文件上传响应
|
|
@@ -2010,10 +2329,11 @@ export interface IKnowledgeInput {
|
|
|
2010
2329
|
*/
|
|
2011
2330
|
tenant_id: string;
|
|
2012
2331
|
/**
|
|
2332
|
+
* Knowledge Type
|
|
2013
2333
|
* type of knowledge resource
|
|
2014
2334
|
* @default "text"
|
|
2015
2335
|
*/
|
|
2016
|
-
knowledge_type?: IKnowledgeTypeEnum;
|
|
2336
|
+
knowledge_type?: IKnowledgeTypeEnum | string;
|
|
2017
2337
|
/**
|
|
2018
2338
|
* Knowledge Name
|
|
2019
2339
|
* name of the knowledge resource
|
|
@@ -2039,7 +2359,7 @@ export interface IKnowledgeInput {
|
|
|
2039
2359
|
* Split Config
|
|
2040
2360
|
* configuration for splitting the knowledge
|
|
2041
2361
|
*/
|
|
2042
|
-
split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig
|
|
2362
|
+
split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig | Record<string, any>;
|
|
2043
2363
|
/**
|
|
2044
2364
|
* File Sha
|
|
2045
2365
|
* SHA of the file
|
|
@@ -2073,6 +2393,16 @@ export interface IKnowledgeInput {
|
|
|
2073
2393
|
* @default true
|
|
2074
2394
|
*/
|
|
2075
2395
|
enabled?: boolean;
|
|
2396
|
+
/**
|
|
2397
|
+
* Expires At
|
|
2398
|
+
* expiration time
|
|
2399
|
+
*/
|
|
2400
|
+
expires_at?: string | null;
|
|
2401
|
+
/**
|
|
2402
|
+
* Last Accessed At
|
|
2403
|
+
* last access time
|
|
2404
|
+
*/
|
|
2405
|
+
last_accessed_at?: string | null;
|
|
2076
2406
|
}
|
|
2077
2407
|
/** Knowledge */
|
|
2078
2408
|
export interface IKnowledgeOutput {
|
|
@@ -2101,7 +2431,10 @@ export interface IKnowledgeOutput {
|
|
|
2101
2431
|
* tenant id
|
|
2102
2432
|
*/
|
|
2103
2433
|
tenant_id: string;
|
|
2104
|
-
/**
|
|
2434
|
+
/**
|
|
2435
|
+
* Knowledge Type
|
|
2436
|
+
* type of knowledge resource
|
|
2437
|
+
*/
|
|
2105
2438
|
knowledge_type?: string;
|
|
2106
2439
|
/**
|
|
2107
2440
|
* Knowledge Name
|
|
@@ -2125,7 +2458,7 @@ export interface IKnowledgeOutput {
|
|
|
2125
2458
|
* Split Config
|
|
2126
2459
|
* configuration for splitting the knowledge
|
|
2127
2460
|
*/
|
|
2128
|
-
split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig
|
|
2461
|
+
split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig | Record<string, any>;
|
|
2129
2462
|
/**
|
|
2130
2463
|
* File Sha
|
|
2131
2464
|
* SHA of the file
|
|
@@ -2158,6 +2491,16 @@ export interface IKnowledgeOutput {
|
|
|
2158
2491
|
* @default true
|
|
2159
2492
|
*/
|
|
2160
2493
|
enabled?: boolean;
|
|
2494
|
+
/**
|
|
2495
|
+
* Expires At
|
|
2496
|
+
* expiration time
|
|
2497
|
+
*/
|
|
2498
|
+
expires_at?: string | null;
|
|
2499
|
+
/**
|
|
2500
|
+
* Last Accessed At
|
|
2501
|
+
* last access time
|
|
2502
|
+
*/
|
|
2503
|
+
last_accessed_at?: string | null;
|
|
2161
2504
|
}
|
|
2162
2505
|
/**
|
|
2163
2506
|
* KnowledgeBatchRefreshRequest
|
|
@@ -2353,7 +2696,10 @@ export interface IKnowledgeResponse {
|
|
|
2353
2696
|
* tenant id
|
|
2354
2697
|
*/
|
|
2355
2698
|
tenant_id: string;
|
|
2356
|
-
/**
|
|
2699
|
+
/**
|
|
2700
|
+
* Knowledge Type
|
|
2701
|
+
* type of knowledge resource
|
|
2702
|
+
*/
|
|
2357
2703
|
knowledge_type?: string;
|
|
2358
2704
|
/**
|
|
2359
2705
|
* Knowledge Name
|
|
@@ -2377,7 +2723,7 @@ export interface IKnowledgeResponse {
|
|
|
2377
2723
|
* Split Config
|
|
2378
2724
|
* configuration for splitting the knowledge
|
|
2379
2725
|
*/
|
|
2380
|
-
split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig
|
|
2726
|
+
split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig | Record<string, any>;
|
|
2381
2727
|
/**
|
|
2382
2728
|
* File Sha
|
|
2383
2729
|
* SHA of the file
|
|
@@ -2410,6 +2756,16 @@ export interface IKnowledgeResponse {
|
|
|
2410
2756
|
* @default true
|
|
2411
2757
|
*/
|
|
2412
2758
|
enabled?: boolean;
|
|
2759
|
+
/**
|
|
2760
|
+
* Expires At
|
|
2761
|
+
* expiration time
|
|
2762
|
+
*/
|
|
2763
|
+
expires_at?: string | null;
|
|
2764
|
+
/**
|
|
2765
|
+
* Last Accessed At
|
|
2766
|
+
* last access time
|
|
2767
|
+
*/
|
|
2768
|
+
last_accessed_at?: string | null;
|
|
2413
2769
|
/**
|
|
2414
2770
|
* Scheduler Jobs
|
|
2415
2771
|
* scheduler jobs bound to this knowledge
|
|
@@ -2432,6 +2788,46 @@ export interface ILLMTxtSourceRequest {
|
|
|
2432
2788
|
/** Page Size */
|
|
2433
2789
|
page_size?: number | null;
|
|
2434
2790
|
}
|
|
2791
|
+
/**
|
|
2792
|
+
* LongTermMemoryCreate
|
|
2793
|
+
* Create long-term memory request DTO
|
|
2794
|
+
*/
|
|
2795
|
+
export interface ILongTermMemoryCreate {
|
|
2796
|
+
/**
|
|
2797
|
+
* Content
|
|
2798
|
+
* Memory content, supports plain text
|
|
2799
|
+
* @minLength 1
|
|
2800
|
+
* @maxLength 10000
|
|
2801
|
+
*/
|
|
2802
|
+
content: string;
|
|
2803
|
+
/** Memory source information (agent, session, input type) */
|
|
2804
|
+
from_source?: IMemorySource | null;
|
|
2805
|
+
/**
|
|
2806
|
+
* Tags
|
|
2807
|
+
* Memory tags for filtering retrieval
|
|
2808
|
+
* @maxItems 10
|
|
2809
|
+
* @default []
|
|
2810
|
+
*/
|
|
2811
|
+
tags?: string[];
|
|
2812
|
+
/**
|
|
2813
|
+
* Metadata
|
|
2814
|
+
* Additional metadata following MemoryKnowledgeMetadata constraints
|
|
2815
|
+
* @default {}
|
|
2816
|
+
*/
|
|
2817
|
+
metadata?: Record<string, any>;
|
|
2818
|
+
/**
|
|
2819
|
+
* Embedding Model Name
|
|
2820
|
+
* Embedding model name, uses Space default if empty
|
|
2821
|
+
*/
|
|
2822
|
+
embedding_model_name?: string | null;
|
|
2823
|
+
/** Target cortex region for long-term memory storage */
|
|
2824
|
+
cortex_region: IMemoryCortexEnum;
|
|
2825
|
+
/**
|
|
2826
|
+
* Expires At
|
|
2827
|
+
* Expiration time (UTC), None means never expires
|
|
2828
|
+
*/
|
|
2829
|
+
expires_at?: string | null;
|
|
2830
|
+
}
|
|
2435
2831
|
/** MarkdownCreate */
|
|
2436
2832
|
export interface IMarkdownCreate {
|
|
2437
2833
|
/**
|
|
@@ -2547,11 +2943,6 @@ export interface IMemory {
|
|
|
2547
2943
|
* Memory unique identifier (= knowledge_id)
|
|
2548
2944
|
*/
|
|
2549
2945
|
memory_id: string;
|
|
2550
|
-
/**
|
|
2551
|
-
* Agent Id
|
|
2552
|
-
* Owning Agent ID
|
|
2553
|
-
*/
|
|
2554
|
-
agent_id: string;
|
|
2555
2946
|
/**
|
|
2556
2947
|
* Tenant Id
|
|
2557
2948
|
* Owning tenant ID
|
|
@@ -2562,13 +2953,17 @@ export interface IMemory {
|
|
|
2562
2953
|
* Memory content
|
|
2563
2954
|
*/
|
|
2564
2955
|
content: string;
|
|
2565
|
-
/** Memory type */
|
|
2956
|
+
/** Memory lifecycle type */
|
|
2566
2957
|
memory_type: IMemoryTypeEnum;
|
|
2958
|
+
/** Brain cortex region this memory resides in */
|
|
2959
|
+
cortex_region: IMemoryCortexEnum;
|
|
2567
2960
|
/**
|
|
2568
2961
|
* Memory status
|
|
2569
2962
|
* @default "activated"
|
|
2570
2963
|
*/
|
|
2571
2964
|
memory_status?: IMemoryStatusEnum;
|
|
2965
|
+
/** Memory source information */
|
|
2966
|
+
from_source?: IMemorySource;
|
|
2572
2967
|
/**
|
|
2573
2968
|
* Tags
|
|
2574
2969
|
* Tag list
|
|
@@ -2587,16 +2982,6 @@ export interface IMemory {
|
|
|
2587
2982
|
* @default 0
|
|
2588
2983
|
*/
|
|
2589
2984
|
retrieval_count?: number;
|
|
2590
|
-
/**
|
|
2591
|
-
* Session Id
|
|
2592
|
-
* Source session ID
|
|
2593
|
-
*/
|
|
2594
|
-
session_id?: string | null;
|
|
2595
|
-
/**
|
|
2596
|
-
* Message Index
|
|
2597
|
-
* Source message index
|
|
2598
|
-
*/
|
|
2599
|
-
message_index?: number | null;
|
|
2600
2985
|
/**
|
|
2601
2986
|
* Expires At
|
|
2602
2987
|
* Expiration time
|
|
@@ -2632,69 +3017,15 @@ export interface IMemory {
|
|
|
2632
3017
|
embedding_model_name: string;
|
|
2633
3018
|
}
|
|
2634
3019
|
/**
|
|
2635
|
-
*
|
|
2636
|
-
*
|
|
3020
|
+
* MemoryConsolidateResponse
|
|
3021
|
+
* Memory consolidation response DTO
|
|
2637
3022
|
*/
|
|
2638
|
-
export interface
|
|
2639
|
-
/**
|
|
2640
|
-
* Agent Id
|
|
2641
|
-
* Agent unique identifier, converted to mem_{agent_id} as space_id
|
|
2642
|
-
* @maxLength 255
|
|
2643
|
-
*/
|
|
2644
|
-
agent_id: string;
|
|
2645
|
-
/**
|
|
2646
|
-
* Content
|
|
2647
|
-
* Memory content, supports plain text
|
|
2648
|
-
* @minLength 1
|
|
2649
|
-
* @maxLength 10000
|
|
2650
|
-
*/
|
|
2651
|
-
content: string;
|
|
2652
|
-
/**
|
|
2653
|
-
* Memory type, auto-classified based on content semantics if empty
|
|
2654
|
-
* @default "memory_working"
|
|
2655
|
-
*/
|
|
2656
|
-
memory_type?: IMemoryTypeEnum | null;
|
|
2657
|
-
/**
|
|
2658
|
-
* Session Id
|
|
2659
|
-
* Source session ID for tracing memory origin
|
|
2660
|
-
*/
|
|
2661
|
-
session_id?: string | null;
|
|
2662
|
-
/**
|
|
2663
|
-
* Message Index
|
|
2664
|
-
* Source message index within session
|
|
2665
|
-
*/
|
|
2666
|
-
message_index?: number | null;
|
|
3023
|
+
export interface IMemoryConsolidateResponse {
|
|
2667
3024
|
/**
|
|
2668
|
-
*
|
|
2669
|
-
*
|
|
2670
|
-
* @maxItems 10
|
|
2671
|
-
* @default []
|
|
2672
|
-
*/
|
|
2673
|
-
tags?: string[];
|
|
2674
|
-
/**
|
|
2675
|
-
* Confidence
|
|
2676
|
-
* Memory confidence (0-1) for dedup and merge decisions
|
|
2677
|
-
* @min 0
|
|
2678
|
-
* @max 1
|
|
2679
|
-
* @default 1
|
|
2680
|
-
*/
|
|
2681
|
-
confidence?: number;
|
|
2682
|
-
/**
|
|
2683
|
-
* Expires At
|
|
2684
|
-
* Expiration time (UTC), None means never expires
|
|
2685
|
-
*/
|
|
2686
|
-
expires_at?: string | null;
|
|
2687
|
-
/**
|
|
2688
|
-
* Metadata
|
|
2689
|
-
* Additional metadata following MemoryKnowledgeMetadata constraints
|
|
2690
|
-
* @default {}
|
|
2691
|
-
*/
|
|
2692
|
-
metadata?: Record<string, any>;
|
|
2693
|
-
/**
|
|
2694
|
-
* Embedding Model Name
|
|
2695
|
-
* Embedding model name, uses Space default if empty
|
|
3025
|
+
* Consolidated Count
|
|
3026
|
+
* Number of memories consolidated
|
|
2696
3027
|
*/
|
|
2697
|
-
|
|
3028
|
+
consolidated_count: number;
|
|
2698
3029
|
}
|
|
2699
3030
|
/**
|
|
2700
3031
|
* MemoryRecord
|
|
@@ -2706,11 +3037,8 @@ export interface IMemoryRecord {
|
|
|
2706
3037
|
* Memory ID (= knowledge_id)
|
|
2707
3038
|
*/
|
|
2708
3039
|
memory_id: string;
|
|
2709
|
-
/**
|
|
2710
|
-
|
|
2711
|
-
* Owning Agent ID
|
|
2712
|
-
*/
|
|
2713
|
-
agent_id: string;
|
|
3040
|
+
/** Cortex region this memory belongs to */
|
|
3041
|
+
cortex_region: IMemoryCortexEnum;
|
|
2714
3042
|
/**
|
|
2715
3043
|
* Content
|
|
2716
3044
|
* Memory content
|
|
@@ -2729,6 +3057,8 @@ export interface IMemoryRecord {
|
|
|
2729
3057
|
* @default "vector_search"
|
|
2730
3058
|
*/
|
|
2731
3059
|
source?: string;
|
|
3060
|
+
/** Memory source information */
|
|
3061
|
+
from_source?: IMemorySource;
|
|
2732
3062
|
/**
|
|
2733
3063
|
* Tags
|
|
2734
3064
|
* Tags
|
|
@@ -2765,10 +3095,10 @@ export interface IMemoryRetrievalConfig {
|
|
|
2765
3095
|
*/
|
|
2766
3096
|
type?: "memory";
|
|
2767
3097
|
/**
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
3098
|
+
* Cortex Regions
|
|
3099
|
+
* Cortex regions to search. None means search all regions.
|
|
2770
3100
|
*/
|
|
2771
|
-
|
|
3101
|
+
cortex_regions?: IMemoryCortexEnum[] | null;
|
|
2772
3102
|
/**
|
|
2773
3103
|
* Memory Types
|
|
2774
3104
|
* Specify memory types, None means retrieve all types
|
|
@@ -2776,7 +3106,7 @@ export interface IMemoryRetrievalConfig {
|
|
|
2776
3106
|
memory_types?: IMemoryTypeEnum[] | null;
|
|
2777
3107
|
/**
|
|
2778
3108
|
* Include Working Memory
|
|
2779
|
-
* Whether to include working memory
|
|
3109
|
+
* Whether to include working memory from hippocampus
|
|
2780
3110
|
* @default true
|
|
2781
3111
|
*/
|
|
2782
3112
|
include_working_memory?: boolean;
|
|
@@ -2803,7 +3133,7 @@ export interface IMemoryRetrievalConfig {
|
|
|
2803
3133
|
tags?: string[] | null;
|
|
2804
3134
|
/**
|
|
2805
3135
|
* Skip Rerank
|
|
2806
|
-
* Whether to
|
|
3136
|
+
* Whether to skip rerank reordering
|
|
2807
3137
|
* @default false
|
|
2808
3138
|
*/
|
|
2809
3139
|
skip_rerank?: boolean;
|
|
@@ -2870,36 +3200,36 @@ export interface IMemoryRetrievalResponse {
|
|
|
2870
3200
|
latency_ms: number;
|
|
2871
3201
|
}
|
|
2872
3202
|
/**
|
|
2873
|
-
*
|
|
2874
|
-
* Memory
|
|
3203
|
+
* MemorySource
|
|
3204
|
+
* Memory source information - tracks where the memory originated
|
|
2875
3205
|
*/
|
|
2876
|
-
export interface
|
|
3206
|
+
export interface IMemorySource {
|
|
2877
3207
|
/**
|
|
2878
|
-
*
|
|
2879
|
-
*
|
|
3208
|
+
* Agent Id
|
|
3209
|
+
* Agent that contributed this memory
|
|
2880
3210
|
*/
|
|
2881
|
-
|
|
2882
|
-
}
|
|
2883
|
-
/**
|
|
2884
|
-
* MemoryUpdate
|
|
2885
|
-
* Update memory request DTO
|
|
2886
|
-
*/
|
|
2887
|
-
export interface IMemoryUpdate {
|
|
3211
|
+
agent_id?: string | null;
|
|
2888
3212
|
/**
|
|
2889
|
-
*
|
|
2890
|
-
*
|
|
3213
|
+
* Session Id
|
|
3214
|
+
* Source session ID for tracing
|
|
2891
3215
|
*/
|
|
2892
|
-
|
|
3216
|
+
session_id?: string | null;
|
|
2893
3217
|
/**
|
|
2894
|
-
*
|
|
2895
|
-
*
|
|
3218
|
+
* How this memory was created
|
|
3219
|
+
* @default "direct"
|
|
2896
3220
|
*/
|
|
2897
|
-
|
|
3221
|
+
input_type?: IMemoryInputTypeEnum;
|
|
3222
|
+
}
|
|
3223
|
+
/**
|
|
3224
|
+
* MemorySplitConfig
|
|
3225
|
+
* Memory split configuration
|
|
3226
|
+
*/
|
|
3227
|
+
export interface IMemorySplitConfig {
|
|
2898
3228
|
/**
|
|
2899
|
-
*
|
|
2900
|
-
*
|
|
3229
|
+
* Type
|
|
3230
|
+
* @default "memory"
|
|
2901
3231
|
*/
|
|
2902
|
-
|
|
3232
|
+
type?: "memory";
|
|
2903
3233
|
}
|
|
2904
3234
|
/**
|
|
2905
3235
|
* MoveKnowledgeRequest
|
|
@@ -3906,6 +4236,30 @@ export interface IResponseModelAPIKey {
|
|
|
3906
4236
|
/** Message */
|
|
3907
4237
|
message?: string | null;
|
|
3908
4238
|
}
|
|
4239
|
+
/** ResponseModel[AdminBackfillAntCodeBranchResponse] */
|
|
4240
|
+
export interface IResponseModelAdminBackfillAntCodeBranchResponse {
|
|
4241
|
+
/** Success */
|
|
4242
|
+
success: boolean;
|
|
4243
|
+
data?: IAdminBackfillAntCodeBranchResponse | null;
|
|
4244
|
+
/** Message */
|
|
4245
|
+
message?: string | null;
|
|
4246
|
+
}
|
|
4247
|
+
/** ResponseModel[AdminCheckChunkKnowledgeConsistencyResponse] */
|
|
4248
|
+
export interface IResponseModelAdminCheckChunkKnowledgeConsistencyResponse {
|
|
4249
|
+
/** Success */
|
|
4250
|
+
success: boolean;
|
|
4251
|
+
data?: IAdminCheckChunkKnowledgeConsistencyResponse | null;
|
|
4252
|
+
/** Message */
|
|
4253
|
+
message?: string | null;
|
|
4254
|
+
}
|
|
4255
|
+
/** ResponseModel[AdminDeleteWohuProductSpaceResponse] */
|
|
4256
|
+
export interface IResponseModelAdminDeleteWohuProductSpaceResponse {
|
|
4257
|
+
/** Success */
|
|
4258
|
+
success: boolean;
|
|
4259
|
+
data?: IAdminDeleteWohuProductSpaceResponse | null;
|
|
4260
|
+
/** Message */
|
|
4261
|
+
message?: string | null;
|
|
4262
|
+
}
|
|
3909
4263
|
/** ResponseModel[AdminManageSchedulerResponse] */
|
|
3910
4264
|
export interface IResponseModelAdminManageSchedulerResponse {
|
|
3911
4265
|
/** Success */
|
|
@@ -3979,6 +4333,14 @@ export interface IResponseModelArtifactIndex {
|
|
|
3979
4333
|
/** Message */
|
|
3980
4334
|
message?: string | null;
|
|
3981
4335
|
}
|
|
4336
|
+
/** ResponseModel[BindMemoryConsolidationResponse] */
|
|
4337
|
+
export interface IResponseModelBindMemoryConsolidationResponse {
|
|
4338
|
+
/** Success */
|
|
4339
|
+
success: boolean;
|
|
4340
|
+
data?: IBindMemoryConsolidationResponse | null;
|
|
4341
|
+
/** Message */
|
|
4342
|
+
message?: string | null;
|
|
4343
|
+
}
|
|
3982
4344
|
/** ResponseModel[Chunk] */
|
|
3983
4345
|
export interface IResponseModelChunk {
|
|
3984
4346
|
/** Success */
|
|
@@ -4114,15 +4476,6 @@ export interface IResponseModelListKnowledge {
|
|
|
4114
4476
|
/** Message */
|
|
4115
4477
|
message?: string | null;
|
|
4116
4478
|
}
|
|
4117
|
-
/** ResponseModel[List[Memory]] */
|
|
4118
|
-
export interface IResponseModelListMemory {
|
|
4119
|
-
/** Success */
|
|
4120
|
-
success: boolean;
|
|
4121
|
-
/** Data */
|
|
4122
|
-
data?: IMemory[] | null;
|
|
4123
|
-
/** Message */
|
|
4124
|
-
message?: string | null;
|
|
4125
|
-
}
|
|
4126
4479
|
/** ResponseModel[List[PublicReadEndpointIdItem]] */
|
|
4127
4480
|
export interface IResponseModelListPublicReadEndpointIdItem {
|
|
4128
4481
|
/** Success */
|
|
@@ -4204,6 +4557,14 @@ export interface IResponseModelListWohuProductSpace {
|
|
|
4204
4557
|
/** Message */
|
|
4205
4558
|
message?: string | null;
|
|
4206
4559
|
}
|
|
4560
|
+
/** ResponseModel[MemoryConsolidateResponse] */
|
|
4561
|
+
export interface IResponseModelMemoryConsolidateResponse {
|
|
4562
|
+
/** Success */
|
|
4563
|
+
success: boolean;
|
|
4564
|
+
data?: IMemoryConsolidateResponse | null;
|
|
4565
|
+
/** Message */
|
|
4566
|
+
message?: string | null;
|
|
4567
|
+
}
|
|
4207
4568
|
/** ResponseModel[MemoryRetrievalResponse] */
|
|
4208
4569
|
export interface IResponseModelMemoryRetrievalResponse {
|
|
4209
4570
|
/** Success */
|
|
@@ -5547,6 +5908,11 @@ export interface ITenantCreateBindWohu {
|
|
|
5547
5908
|
* 产品空间头像 URL,可选
|
|
5548
5909
|
*/
|
|
5549
5910
|
spaceAvatar?: string | null;
|
|
5911
|
+
/**
|
|
5912
|
+
* Membergrants
|
|
5913
|
+
* 额外成员角色列表(可选,避免重复工号)
|
|
5914
|
+
*/
|
|
5915
|
+
memberGrants?: IWohuSpaceMemberGrant[];
|
|
5550
5916
|
}
|
|
5551
5917
|
/** TenantLog */
|
|
5552
5918
|
export interface ITenantLog {
|
|
@@ -6038,6 +6404,59 @@ export interface IWohuProductSpace {
|
|
|
6038
6404
|
*/
|
|
6039
6405
|
visit_url: string;
|
|
6040
6406
|
}
|
|
6407
|
+
/**
|
|
6408
|
+
* WohuSpaceMemberGrant
|
|
6409
|
+
* 绑定卧虎产品空间后,为其他成员补建角色。
|
|
6410
|
+
*
|
|
6411
|
+
* - role: 角色枚举(SPACE_MASTER / SPACE_MEMBER / SPACE_GUEST)
|
|
6412
|
+
* - outUserId: 成员工号
|
|
6413
|
+
*/
|
|
6414
|
+
export interface IWohuSpaceMemberGrant {
|
|
6415
|
+
/** 角色枚举(SPACE_MASTER / SPACE_MEMBER / SPACE_GUEST) */
|
|
6416
|
+
role: IWohuSpaceRole;
|
|
6417
|
+
/**
|
|
6418
|
+
* Outuserid
|
|
6419
|
+
* 成员工号
|
|
6420
|
+
* @minLength 1
|
|
6421
|
+
*/
|
|
6422
|
+
outUserId: string;
|
|
6423
|
+
}
|
|
6424
|
+
/**
|
|
6425
|
+
* WorkingMemoryCreate
|
|
6426
|
+
* Create working memory request DTO
|
|
6427
|
+
*
|
|
6428
|
+
* Working memory is always written to hippocampus and always uses
|
|
6429
|
+
* `memory_working`. Callers cannot override those invariants.
|
|
6430
|
+
*/
|
|
6431
|
+
export interface IWorkingMemoryCreate {
|
|
6432
|
+
/**
|
|
6433
|
+
* Content
|
|
6434
|
+
* Memory content, supports plain text
|
|
6435
|
+
* @minLength 1
|
|
6436
|
+
* @maxLength 10000
|
|
6437
|
+
*/
|
|
6438
|
+
content: string;
|
|
6439
|
+
/** Memory source information (agent, session, input type) */
|
|
6440
|
+
from_source?: IMemorySource | null;
|
|
6441
|
+
/**
|
|
6442
|
+
* Tags
|
|
6443
|
+
* Memory tags for filtering retrieval
|
|
6444
|
+
* @maxItems 10
|
|
6445
|
+
* @default []
|
|
6446
|
+
*/
|
|
6447
|
+
tags?: string[];
|
|
6448
|
+
/**
|
|
6449
|
+
* Metadata
|
|
6450
|
+
* Additional metadata following MemoryKnowledgeMetadata constraints
|
|
6451
|
+
* @default {}
|
|
6452
|
+
*/
|
|
6453
|
+
metadata?: Record<string, any>;
|
|
6454
|
+
/**
|
|
6455
|
+
* Embedding Model Name
|
|
6456
|
+
* Embedding model name, uses Space default if empty
|
|
6457
|
+
*/
|
|
6458
|
+
embedding_model_name?: string | null;
|
|
6459
|
+
}
|
|
6041
6460
|
/** YuqueCreate */
|
|
6042
6461
|
export interface IYuqueCreate {
|
|
6043
6462
|
/**
|
|
@@ -6298,6 +6717,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6298
6717
|
* @request POST:/api/knowledge/add
|
|
6299
6718
|
*/
|
|
6300
6719
|
addKnowledge: (data: (ITextCreate | IImageCreate | IJSONCreate | IMarkdownCreate | IPDFCreate | IDocxCreate | IPowerPointCreate | IWebpageCreate | IGithubRepoCreate | IQACreate | IYuqueCreate | IHituNodePackageCreate | IHituNodePackageElementCreate | IFolderCreate)[], params?: RequestParams) => Promise<HttpResponse<IResponseModelListKnowledge, void | IHTTPValidationError>>;
|
|
6720
|
+
/**
|
|
6721
|
+
* @description 通过文件信息批量添加知识(简化接口) 仅需提供文件基础信息(名称、扩展名、URL、MD5、大小),系统根据扩展名自动推导 knowledge_type、source_type、source_config、split_config 等配置。 - 扩展名可映射到已知类型(md/txt/json/image/docx/pdf/pptx 等):自动组装配置并创建处理任务 - 扩展名不可映射:以扩展名原值作为 knowledge_type 存储,不创建处理任务
|
|
6722
|
+
*
|
|
6723
|
+
* @tags knowledge
|
|
6724
|
+
* @name AddKnowledgeByFile
|
|
6725
|
+
* @summary Add Knowledge By File
|
|
6726
|
+
* @request POST:/api/knowledge/add_by_file
|
|
6727
|
+
*/
|
|
6728
|
+
addKnowledgeByFile: (data: IFileUploadCreate[], params?: RequestParams) => Promise<HttpResponse<IResponseModelListKnowledge, void | IHTTPValidationError>>;
|
|
6301
6729
|
/**
|
|
6302
6730
|
* @description 更新知识(全量更新) 更新知识的完整信息,支持以下字段变更: - 元数据(metadata)变更:同步更新对应 chunk 的 metadata - 启用状态(enabled)变更:同步更新对应 chunk 的启用状态 - 嵌入模型/分片配置/来源配置变更:自动触发重新入库任务 注意:knowledge_type、source_type 等核心字段不可变更。 Args: knowledge: 完整的知识对象,需包含 knowledge_id Returns: 更新后的知识对象(auth_info 字段已脱敏)
|
|
6303
6731
|
*
|
|
@@ -6659,7 +7087,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6659
7087
|
*/
|
|
6660
7088
|
checkTenantName: (data: ITenantNameCheckRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenantNameCheckResponse, void | IHTTPValidationError>>;
|
|
6661
7089
|
/**
|
|
6662
|
-
* @description 创建租户 创建新租户并自动生成认证密钥(secret_key): - tenant_id 可自定义或由系统自动生成 - secret_key 由系统自动生成,仅在创建时返回一次 - 创建成功后根据 notify 参数决定是否发送通知邮件 - 如果 metadata.default_space_id 存在,则自动创建默认空间 Args: params.tenant_name: 租户名称,必须唯一 params.email: 联系邮箱,用于接收通知 params.metadata: 自定义元数据(可选),可包含 default_space_id params.notify: 是否发送邮件通知,默认 true params.default_spaces_config: 默认知识库配置(可选) params.tenant_id: 自定义租户ID(可选),支持字母、数字、下划线、中划线 Returns: 创建的租户信息,包含 secret_key(仅此一次) Raises: 400: 租户名称或ID已存在
|
|
7090
|
+
* @description 创建租户 创建新租户并自动生成认证密钥(secret_key): - tenant_id 可自定义或由系统自动生成 - secret_key 由系统自动生成,仅在创建时返回一次 - 创建成功后根据 notify 参数决定是否发送通知邮件 - 如果 metadata.default_space_id 存在,则自动创建默认空间 Args: params.tenant_name: 租户名称,必须唯一 params.email: 联系邮箱,用于接收通知 params.metadata: 自定义元数据(可选),可包含 default_space_id params.notify: 是否发送邮件通知,默认 true params.default_spaces_config: 默认知识库配置(可选) params.tenant_id: 自定义租户ID(可选),支持字母、数字、下划线、中划线 Returns: 创建的租户信息,包含 secret_key(仅此一次) Raises: 400: 租户名称或ID已存在 403: 无权使用 personal_ 前缀的自定义租户ID
|
|
6663
7091
|
*
|
|
6664
7092
|
* @tags tenant
|
|
6665
7093
|
* @name CreateTenant
|
|
@@ -7289,6 +7717,42 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7289
7717
|
* @request POST:/api/admin/scheduler/manage
|
|
7290
7718
|
*/
|
|
7291
7719
|
adminManageSchedulerByFilter: (data: IAdminManageSchedulerRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminManageSchedulerResponse, void | IHTTPValidationError>>;
|
|
7720
|
+
/**
|
|
7721
|
+
* @description 批量为指定前缀的租户绑定记忆巩固 scheduler job。 对每个匹配的活跃租户,使用 upsert 语义创建或更新 job_type=memory_consolidation / target_type=space / target_id=mem_hippocampus 的定时任务。
|
|
7722
|
+
*
|
|
7723
|
+
* @tags admin
|
|
7724
|
+
* @name AdminBindMemoryConsolidationJobs
|
|
7725
|
+
* @summary Admin Bind Memory Consolidation Jobs
|
|
7726
|
+
* @request POST:/api/admin/scheduler/bind-memory-consolidation
|
|
7727
|
+
*/
|
|
7728
|
+
adminBindMemoryConsolidationJobs: (data: IBindMemoryConsolidationRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelBindMemoryConsolidationResponse, void | IHTTPValidationError>>;
|
|
7729
|
+
/**
|
|
7730
|
+
* @description 管理员接口:校验 tenant 下 chunk 与 knowledge 的存在一致性。 使用 ES 聚合(composite terms)获取 distinct knowledge_id 集合; 以 DB 校验知识是否存在;对缺失 knowledge_id 对应 chunk 做物理删除。
|
|
7731
|
+
*
|
|
7732
|
+
* @tags admin
|
|
7733
|
+
* @name AdminCheckChunkKnowledgeConsistency
|
|
7734
|
+
* @summary Admin Check Chunk Knowledge Consistency
|
|
7735
|
+
* @request POST:/api/admin/chunk/knowledge-consistency/check
|
|
7736
|
+
*/
|
|
7737
|
+
adminCheckChunkKnowledgeConsistency: (data: IAdminCheckChunkKnowledgeConsistencyRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminCheckChunkKnowledgeConsistencyResponse, void | IHTTPValidationError>>;
|
|
7738
|
+
/**
|
|
7739
|
+
* @description 管理员接口:回填 AntCode 仓库知识的 source_config.branch(写入数据库)。 仅处理: - source_type = github_repo - source_config.url 包含 code.alipay.com - source_config.branch 为空 回填策略: - 优先调用 AntCode v3 project API 获取 default_branch - 失败/无 token 兜底写入 master(保证 webhook 严格匹配可用)
|
|
7740
|
+
*
|
|
7741
|
+
* @tags admin
|
|
7742
|
+
* @name AdminBackfillAntcodeKnowledgeBranch
|
|
7743
|
+
* @summary Admin Backfill Antcode Knowledge Branch
|
|
7744
|
+
* @request POST:/api/admin/knowledge-source/antcode/branch/backfill
|
|
7745
|
+
*/
|
|
7746
|
+
adminBackfillAntcodeKnowledgeBranch: (data: IAdminBackfillAntCodeBranchRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminBackfillAntCodeBranchResponse, void | IHTTPValidationError>>;
|
|
7747
|
+
/**
|
|
7748
|
+
* @description 管理员接口:删除卧虎产品空间(space + space_user_role)。
|
|
7749
|
+
*
|
|
7750
|
+
* @tags admin
|
|
7751
|
+
* @name AdminDeleteWohuProductSpace
|
|
7752
|
+
* @summary Admin Delete Wohu Product Space
|
|
7753
|
+
* @request POST:/api/admin/wohu/product-space/delete
|
|
7754
|
+
*/
|
|
7755
|
+
adminDeleteWohuProductSpace: (data: IAdminDeleteWohuProductSpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminDeleteWohuProductSpaceResponse, void | IHTTPValidationError>>;
|
|
7292
7756
|
};
|
|
7293
7757
|
llmTxt: {
|
|
7294
7758
|
/**
|
|
@@ -7312,34 +7776,34 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7312
7776
|
};
|
|
7313
7777
|
memory: {
|
|
7314
7778
|
/**
|
|
7315
|
-
* @description Add a new
|
|
7779
|
+
* @description Add a new working memory to hippocampus.
|
|
7316
7780
|
*
|
|
7317
7781
|
* @tags memory
|
|
7318
|
-
* @name
|
|
7319
|
-
* @summary Add Memory
|
|
7320
|
-
* @request POST:/api/memory/
|
|
7782
|
+
* @name AddWorkingMemory
|
|
7783
|
+
* @summary Add Working Memory
|
|
7784
|
+
* @request POST:/api/memory/working
|
|
7321
7785
|
*/
|
|
7322
|
-
|
|
7786
|
+
addWorkingMemory: (data: IWorkingMemoryCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemory, void | IHTTPValidationError>>;
|
|
7323
7787
|
/**
|
|
7324
|
-
* @description
|
|
7788
|
+
* @description Add a new long-term memory to a specific cortex region.
|
|
7325
7789
|
*
|
|
7326
7790
|
* @tags memory
|
|
7327
|
-
* @name
|
|
7328
|
-
* @summary
|
|
7329
|
-
* @request
|
|
7791
|
+
* @name AddLongTermMemory
|
|
7792
|
+
* @summary Add Long Term Memory
|
|
7793
|
+
* @request POST:/api/memory/long-term
|
|
7330
7794
|
*/
|
|
7331
|
-
|
|
7795
|
+
addLongTermMemory: (data: ILongTermMemoryCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemory, void | IHTTPValidationError>>;
|
|
7332
7796
|
/**
|
|
7333
|
-
* @description
|
|
7797
|
+
* @description Get a memory by ID.
|
|
7334
7798
|
*
|
|
7335
7799
|
* @tags memory
|
|
7336
|
-
* @name
|
|
7337
|
-
* @summary
|
|
7338
|
-
* @request
|
|
7800
|
+
* @name GetMemoryById
|
|
7801
|
+
* @summary Get Memory By Id
|
|
7802
|
+
* @request GET:/api/memory/{memory_id}
|
|
7339
7803
|
*/
|
|
7340
|
-
|
|
7804
|
+
getMemoryById: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelUnionMemoryNoneType, void | IHTTPValidationError>>;
|
|
7341
7805
|
/**
|
|
7342
|
-
* @description Delete a memory
|
|
7806
|
+
* @description Delete a memory.
|
|
7343
7807
|
*
|
|
7344
7808
|
* @tags memory
|
|
7345
7809
|
* @name DeleteMemory
|
|
@@ -7348,7 +7812,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7348
7812
|
*/
|
|
7349
7813
|
deleteMemory: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelBool, void | IHTTPValidationError>>;
|
|
7350
7814
|
/**
|
|
7351
|
-
* @description Retrieve memories using semantic search
|
|
7815
|
+
* @description Retrieve memories using semantic search across cortex regions. Specify cortex_regions to limit search scope.
|
|
7352
7816
|
*
|
|
7353
7817
|
* @tags memory
|
|
7354
7818
|
* @name RetrieveMemory
|
|
@@ -7357,7 +7821,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7357
7821
|
*/
|
|
7358
7822
|
retrieveMemory: (data: IMemoryRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelMemoryRetrievalResponse, void | IHTTPValidationError>>;
|
|
7359
7823
|
/**
|
|
7360
|
-
* @description Archive a memory (soft delete)
|
|
7824
|
+
* @description Archive a memory (soft delete).
|
|
7361
7825
|
*
|
|
7362
7826
|
* @tags memory
|
|
7363
7827
|
* @name ArchiveMemory
|
|
@@ -7366,31 +7830,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7366
7830
|
*/
|
|
7367
7831
|
archiveMemory: (memoryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelUnionMemoryNoneType, void | IHTTPValidationError>>;
|
|
7368
7832
|
/**
|
|
7369
|
-
* @description
|
|
7370
|
-
*
|
|
7371
|
-
* @tags memory
|
|
7372
|
-
* @name GetMemoriesByAgent
|
|
7373
|
-
* @summary Get Memories By Agent
|
|
7374
|
-
* @request GET:/api/memory/agent/{agent_id}
|
|
7375
|
-
*/
|
|
7376
|
-
getMemoriesByAgent: (agentId: string, query?: {
|
|
7377
|
-
/** Memory Type */
|
|
7378
|
-
memory_type?: IMemoryTypeEnum | null;
|
|
7379
|
-
/** Limit */
|
|
7380
|
-
limit?: number | null;
|
|
7381
|
-
}, params?: RequestParams) => Promise<HttpResponse<IResponseModelListMemory, void | IHTTPValidationError>>;
|
|
7382
|
-
/**
|
|
7383
|
-
* @description Trigger memory consolidation (Phase 2 placeholder) Reserved endpoint for Phase 2 memory consolidation feature. Currently returns a placeholder response. Args: agent_id: Optional agent ID to consolidate memories for Returns: Status message
|
|
7833
|
+
* @description Manually trigger memory consolidation for pending hippocampus memories.
|
|
7384
7834
|
*
|
|
7385
7835
|
* @tags memory
|
|
7386
7836
|
* @name ConsolidateMemory
|
|
7387
7837
|
* @summary Consolidate Memory
|
|
7388
7838
|
* @request POST:/api/memory/consolidate
|
|
7389
7839
|
*/
|
|
7390
|
-
consolidateMemory: (
|
|
7391
|
-
/** Agent Id */
|
|
7392
|
-
agent_id?: string | null;
|
|
7393
|
-
}, params?: RequestParams) => Promise<HttpResponse<IResponseModelStr, void | IHTTPValidationError>>;
|
|
7840
|
+
consolidateMemory: (params?: RequestParams) => Promise<HttpResponse<IResponseModelMemoryConsolidateResponse, void | IHTTPValidationError>>;
|
|
7394
7841
|
};
|
|
7395
7842
|
scheduler: {
|
|
7396
7843
|
/**
|