@petercatai/whisker-client 0.1.202504211908-dev → 0.1.202504301149
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 +455 -85
- package/dist/api.js +91 -2
- package/package.json +5 -5
package/dist/api.d.ts
CHANGED
|
@@ -20,14 +20,22 @@ export declare enum IKnowledgeTypeEnum {
|
|
|
20
20
|
Docx = "docx",
|
|
21
21
|
Pdf = "pdf",
|
|
22
22
|
Qa = "qa",
|
|
23
|
+
Yuquedoc = "yuquedoc",
|
|
24
|
+
OpenapiApp = "openapi_app",
|
|
23
25
|
Folder = "folder"
|
|
24
26
|
}
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* KnowledgeSourceEnum
|
|
29
|
+
* Specifies the source of knowledge, which influences the behavior of the resource loader
|
|
30
|
+
*/
|
|
26
31
|
export declare enum IKnowledgeSourceEnum {
|
|
27
32
|
GithubRepo = "github_repo",
|
|
28
33
|
GithubFile = "github_file",
|
|
29
34
|
UserInputText = "user_input_text",
|
|
30
|
-
UserUploadFile = "user_upload_file"
|
|
35
|
+
UserUploadFile = "user_upload_file",
|
|
36
|
+
Yuque = "yuque",
|
|
37
|
+
Youtube = "youtube",
|
|
38
|
+
Database = "database"
|
|
31
39
|
}
|
|
32
40
|
/** EmbeddingModelEnum */
|
|
33
41
|
export declare enum IEmbeddingModelEnum {
|
|
@@ -44,17 +52,28 @@ export declare enum IEmbeddingModelEnum {
|
|
|
44
52
|
export interface IBaseCharSplitConfig {
|
|
45
53
|
/**
|
|
46
54
|
* Chunk Size
|
|
55
|
+
* chunk max size
|
|
47
56
|
* @min 1
|
|
48
|
-
* @exclusiveMax 5000
|
|
49
57
|
* @default 1500
|
|
50
58
|
*/
|
|
51
59
|
chunk_size?: number;
|
|
52
60
|
/**
|
|
53
61
|
* Chunk Overlap
|
|
62
|
+
* chunk overlap size, must be less than chunk_size
|
|
54
63
|
* @min 0
|
|
55
64
|
* @default 150
|
|
56
65
|
*/
|
|
57
66
|
chunk_overlap?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Separators
|
|
69
|
+
* separator list, if None, use default separators
|
|
70
|
+
*/
|
|
71
|
+
separators?: string[] | null;
|
|
72
|
+
/**
|
|
73
|
+
* Split Regex
|
|
74
|
+
* split_regex,if set, use it instead of separators
|
|
75
|
+
*/
|
|
76
|
+
split_regex?: string | null;
|
|
58
77
|
}
|
|
59
78
|
/** Chunk */
|
|
60
79
|
export interface IChunk {
|
|
@@ -97,7 +116,7 @@ export interface IChunk {
|
|
|
97
116
|
* Metadata
|
|
98
117
|
* Arbitrary metadata associated with the content.
|
|
99
118
|
*/
|
|
100
|
-
metadata?:
|
|
119
|
+
metadata?: Record<string, any> | null;
|
|
101
120
|
/**
|
|
102
121
|
* Gmt Create
|
|
103
122
|
* creation time
|
|
@@ -109,6 +128,38 @@ export interface IChunk {
|
|
|
109
128
|
*/
|
|
110
129
|
gmt_modified?: string;
|
|
111
130
|
}
|
|
131
|
+
/** ChunkSave */
|
|
132
|
+
export interface IChunkSave {
|
|
133
|
+
/** Chunk Id */
|
|
134
|
+
chunk_id?: string | null;
|
|
135
|
+
/** Space Id */
|
|
136
|
+
space_id: string;
|
|
137
|
+
/** Context */
|
|
138
|
+
context: string;
|
|
139
|
+
/** Knowledge Id */
|
|
140
|
+
knowledge_id: string;
|
|
141
|
+
/** Embedding Model Name */
|
|
142
|
+
embedding_model_name: string;
|
|
143
|
+
/** Metadata */
|
|
144
|
+
metadata?: Record<string, any> | null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* GeaGraphSplitConfig
|
|
148
|
+
* JSON document split configuration
|
|
149
|
+
* @link {https://python.langchain.com/api_reference/text_splitters/json/langchain_text_splitters.json.RecursiveJsonSplitter.html}
|
|
150
|
+
*/
|
|
151
|
+
export interface IGeaGraphSplitConfig {
|
|
152
|
+
/**
|
|
153
|
+
* Type
|
|
154
|
+
* @default "geagraph"
|
|
155
|
+
*/
|
|
156
|
+
type?: "geagraph";
|
|
157
|
+
/**
|
|
158
|
+
* Schema Id
|
|
159
|
+
* The maximum size for each chunk. Defaults to 2000
|
|
160
|
+
*/
|
|
161
|
+
schema_id?: string | null;
|
|
162
|
+
}
|
|
112
163
|
/** GithubFileSourceConfig */
|
|
113
164
|
export interface IGithubFileSourceConfig {
|
|
114
165
|
/**
|
|
@@ -161,7 +212,7 @@ export interface IGithubRepoCreate {
|
|
|
161
212
|
* additional metadata, user can update it
|
|
162
213
|
* @default {}
|
|
163
214
|
*/
|
|
164
|
-
metadata?:
|
|
215
|
+
metadata?: Record<string, any>;
|
|
165
216
|
/** source type */
|
|
166
217
|
source_type: IKnowledgeSourceEnum;
|
|
167
218
|
/**
|
|
@@ -237,7 +288,7 @@ export interface IImageCreate {
|
|
|
237
288
|
* additional metadata, user can update it
|
|
238
289
|
* @default {}
|
|
239
290
|
*/
|
|
240
|
-
metadata?:
|
|
291
|
+
metadata?: Record<string, any>;
|
|
241
292
|
/** source type */
|
|
242
293
|
source_type: IKnowledgeSourceEnum;
|
|
243
294
|
/**
|
|
@@ -286,7 +337,7 @@ export interface IJSONCreate {
|
|
|
286
337
|
* additional metadata, user can update it
|
|
287
338
|
* @default {}
|
|
288
339
|
*/
|
|
289
|
-
metadata?:
|
|
340
|
+
metadata?: Record<string, any>;
|
|
290
341
|
/** source type */
|
|
291
342
|
source_type: IKnowledgeSourceEnum;
|
|
292
343
|
/**
|
|
@@ -316,45 +367,27 @@ export interface IJSONCreate {
|
|
|
316
367
|
/**
|
|
317
368
|
* JSONSplitConfig
|
|
318
369
|
* JSON document split configuration
|
|
370
|
+
* @link {https://python.langchain.com/api_reference/text_splitters/json/langchain_text_splitters.json.RecursiveJsonSplitter.html}
|
|
319
371
|
*/
|
|
320
372
|
export interface IJSONSplitConfig {
|
|
321
373
|
/**
|
|
322
|
-
*
|
|
323
|
-
* @
|
|
324
|
-
* @exclusiveMax 5000
|
|
325
|
-
* @default 1500
|
|
326
|
-
*/
|
|
327
|
-
chunk_size?: number;
|
|
328
|
-
/**
|
|
329
|
-
* Chunk Overlap
|
|
330
|
-
* @min 0
|
|
331
|
-
* @default 150
|
|
332
|
-
*/
|
|
333
|
-
chunk_overlap?: number;
|
|
334
|
-
/**
|
|
335
|
-
* Split Level
|
|
336
|
-
* Depth level for JSON splitting
|
|
337
|
-
* @min 1
|
|
338
|
-
* @default 1
|
|
339
|
-
*/
|
|
340
|
-
split_level?: number;
|
|
341
|
-
/**
|
|
342
|
-
* Preserve Structure
|
|
343
|
-
* Whether to preserve JSON structure
|
|
344
|
-
* @default true
|
|
374
|
+
* Type
|
|
375
|
+
* @default "json"
|
|
345
376
|
*/
|
|
346
|
-
|
|
377
|
+
type?: "json";
|
|
347
378
|
/**
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
* @default
|
|
379
|
+
* Max Chunk Size
|
|
380
|
+
* The maximum size for each chunk. Defaults to 2000
|
|
381
|
+
* @default 2000
|
|
351
382
|
*/
|
|
352
|
-
|
|
383
|
+
max_chunk_size?: number;
|
|
353
384
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
385
|
+
* Min Chunk Size
|
|
386
|
+
* The minimum size for a chunk. If None,
|
|
387
|
+
* defaults to the maximum chunk size minus 200, with a lower bound of 50.
|
|
388
|
+
* @default 200
|
|
356
389
|
*/
|
|
357
|
-
|
|
390
|
+
min_chunk_size?: number | null;
|
|
358
391
|
}
|
|
359
392
|
/** Knowledge */
|
|
360
393
|
export interface IKnowledgeInput {
|
|
@@ -404,7 +437,7 @@ export interface IKnowledgeInput {
|
|
|
404
437
|
* Split Config
|
|
405
438
|
* configuration for splitting the knowledge
|
|
406
439
|
*/
|
|
407
|
-
split_config: IBaseCharSplitConfig | IMarkdownSplitConfig |
|
|
440
|
+
split_config: IBaseCharSplitConfig | IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IPDFSplitConfig | IGeaGraphSplitConfig;
|
|
408
441
|
/**
|
|
409
442
|
* File Sha
|
|
410
443
|
* SHA of the file
|
|
@@ -420,7 +453,7 @@ export interface IKnowledgeInput {
|
|
|
420
453
|
* additional metadata, user can update it
|
|
421
454
|
* @default {}
|
|
422
455
|
*/
|
|
423
|
-
metadata?:
|
|
456
|
+
metadata?: Record<string, any>;
|
|
424
457
|
/**
|
|
425
458
|
* Retrieval Count
|
|
426
459
|
* count of the retrieval
|
|
@@ -490,7 +523,7 @@ export interface IKnowledgeOutput {
|
|
|
490
523
|
* Split Config
|
|
491
524
|
* configuration for splitting the knowledge
|
|
492
525
|
*/
|
|
493
|
-
split_config: IBaseCharSplitConfig | IMarkdownSplitConfig |
|
|
526
|
+
split_config: IBaseCharSplitConfig | IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IPDFSplitConfig | IGeaGraphSplitConfig;
|
|
494
527
|
/**
|
|
495
528
|
* File Sha
|
|
496
529
|
* SHA of the file
|
|
@@ -505,7 +538,7 @@ export interface IKnowledgeOutput {
|
|
|
505
538
|
* Metadata
|
|
506
539
|
* additional metadata, user can update it
|
|
507
540
|
*/
|
|
508
|
-
metadata?:
|
|
541
|
+
metadata?: Record<string, any> | null;
|
|
509
542
|
/**
|
|
510
543
|
* Retrieval Count
|
|
511
544
|
* count of the retrieval
|
|
@@ -586,7 +619,7 @@ export interface IKnowledgeCreate {
|
|
|
586
619
|
* Split Config
|
|
587
620
|
* configuration for splitting the knowledge
|
|
588
621
|
*/
|
|
589
|
-
split_config: IBaseCharSplitConfig | IMarkdownSplitConfig |
|
|
622
|
+
split_config: IBaseCharSplitConfig | IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IPDFSplitConfig | IGeaGraphSplitConfig;
|
|
590
623
|
/**
|
|
591
624
|
* File Sha
|
|
592
625
|
* SHA of the file
|
|
@@ -602,7 +635,7 @@ export interface IKnowledgeCreate {
|
|
|
602
635
|
* additional metadata, user can update it
|
|
603
636
|
* @default {}
|
|
604
637
|
*/
|
|
605
|
-
metadata?:
|
|
638
|
+
metadata?: Record<string, any>;
|
|
606
639
|
/**
|
|
607
640
|
* Parent Id
|
|
608
641
|
* parent knowledge id
|
|
@@ -639,7 +672,7 @@ export interface IMarkdownCreate {
|
|
|
639
672
|
* additional metadata, user can update it
|
|
640
673
|
* @default {}
|
|
641
674
|
*/
|
|
642
|
-
metadata?:
|
|
675
|
+
metadata?: Record<string, any>;
|
|
643
676
|
/** source type */
|
|
644
677
|
source_type: IKnowledgeSourceEnum;
|
|
645
678
|
/**
|
|
@@ -666,34 +699,38 @@ export interface IMarkdownCreate {
|
|
|
666
699
|
/** split config of the knowledge */
|
|
667
700
|
split_config: IMarkdownSplitConfig;
|
|
668
701
|
}
|
|
669
|
-
/**
|
|
670
|
-
* MarkdownSplitConfig
|
|
671
|
-
* Markdown document split configuration
|
|
672
|
-
*/
|
|
702
|
+
/** MarkdownSplitConfig */
|
|
673
703
|
export interface IMarkdownSplitConfig {
|
|
674
704
|
/**
|
|
675
705
|
* Chunk Size
|
|
706
|
+
* chunk max size
|
|
676
707
|
* @min 1
|
|
677
|
-
* @exclusiveMax 5000
|
|
678
708
|
* @default 1500
|
|
679
709
|
*/
|
|
680
710
|
chunk_size?: number;
|
|
681
711
|
/**
|
|
682
712
|
* Chunk Overlap
|
|
713
|
+
* chunk overlap size, must be less than chunk_size
|
|
683
714
|
* @min 0
|
|
684
715
|
* @default 150
|
|
685
716
|
*/
|
|
686
717
|
chunk_overlap?: number;
|
|
687
718
|
/**
|
|
688
719
|
* Separators
|
|
689
|
-
*
|
|
720
|
+
* List of separators to split the text. If None, uses default separators
|
|
721
|
+
* @default ["\n\n"]
|
|
690
722
|
*/
|
|
691
|
-
separators
|
|
723
|
+
separators?: string[];
|
|
692
724
|
/**
|
|
693
725
|
* Split Regex
|
|
694
|
-
* split_regex
|
|
726
|
+
* split_regex,if set, use it instead of separators
|
|
695
727
|
*/
|
|
696
|
-
split_regex
|
|
728
|
+
split_regex?: string | null;
|
|
729
|
+
/**
|
|
730
|
+
* Type
|
|
731
|
+
* @default "markdown"
|
|
732
|
+
*/
|
|
733
|
+
type?: "markdown";
|
|
697
734
|
}
|
|
698
735
|
/** OpenIdSourceConfig */
|
|
699
736
|
export interface IOpenIdSourceConfig {
|
|
@@ -735,7 +772,7 @@ export interface IPDFCreate {
|
|
|
735
772
|
* additional metadata, user can update it
|
|
736
773
|
* @default {}
|
|
737
774
|
*/
|
|
738
|
-
metadata?:
|
|
775
|
+
metadata?: Record<string, any>;
|
|
739
776
|
/** source type */
|
|
740
777
|
source_type: IKnowledgeSourceEnum;
|
|
741
778
|
/**
|
|
@@ -769,17 +806,33 @@ export interface IPDFCreate {
|
|
|
769
806
|
export interface IPDFSplitConfig {
|
|
770
807
|
/**
|
|
771
808
|
* Chunk Size
|
|
809
|
+
* chunk max size
|
|
772
810
|
* @min 1
|
|
773
|
-
* @exclusiveMax 5000
|
|
774
811
|
* @default 1500
|
|
775
812
|
*/
|
|
776
813
|
chunk_size?: number;
|
|
777
814
|
/**
|
|
778
815
|
* Chunk Overlap
|
|
816
|
+
* chunk overlap size, must be less than chunk_size
|
|
779
817
|
* @min 0
|
|
780
818
|
* @default 150
|
|
781
819
|
*/
|
|
782
820
|
chunk_overlap?: number;
|
|
821
|
+
/**
|
|
822
|
+
* Separators
|
|
823
|
+
* separator list, if None, use default separators
|
|
824
|
+
*/
|
|
825
|
+
separators?: string[] | null;
|
|
826
|
+
/**
|
|
827
|
+
* Split Regex
|
|
828
|
+
* split_regex,if set, use it instead of separators
|
|
829
|
+
*/
|
|
830
|
+
split_regex?: string | null;
|
|
831
|
+
/**
|
|
832
|
+
* Type
|
|
833
|
+
* @default "pdf"
|
|
834
|
+
*/
|
|
835
|
+
type?: "pdf";
|
|
783
836
|
/**
|
|
784
837
|
* Split By Page
|
|
785
838
|
* Whether to split by pages
|
|
@@ -837,7 +890,7 @@ export interface IPageParamsChunk {
|
|
|
837
890
|
* Eq Conditions
|
|
838
891
|
* list of equality conditions, each as a dict with key and value
|
|
839
892
|
*/
|
|
840
|
-
eq_conditions?:
|
|
893
|
+
eq_conditions?: Record<string, any> | null;
|
|
841
894
|
}
|
|
842
895
|
/** PageParams[Knowledge] */
|
|
843
896
|
export interface IPageParamsKnowledge {
|
|
@@ -871,7 +924,7 @@ export interface IPageParamsKnowledge {
|
|
|
871
924
|
* Eq Conditions
|
|
872
925
|
* list of equality conditions, each as a dict with key and value
|
|
873
926
|
*/
|
|
874
|
-
eq_conditions?:
|
|
927
|
+
eq_conditions?: Record<string, any> | null;
|
|
875
928
|
}
|
|
876
929
|
/** PageParams[Space] */
|
|
877
930
|
export interface IPageParamsSpace {
|
|
@@ -905,7 +958,7 @@ export interface IPageParamsSpace {
|
|
|
905
958
|
* Eq Conditions
|
|
906
959
|
* list of equality conditions, each as a dict with key and value
|
|
907
960
|
*/
|
|
908
|
-
eq_conditions?:
|
|
961
|
+
eq_conditions?: Record<string, any> | null;
|
|
909
962
|
}
|
|
910
963
|
/** PageParams[Task] */
|
|
911
964
|
export interface IPageParamsTask {
|
|
@@ -939,7 +992,7 @@ export interface IPageParamsTask {
|
|
|
939
992
|
* Eq Conditions
|
|
940
993
|
* list of equality conditions, each as a dict with key and value
|
|
941
994
|
*/
|
|
942
|
-
eq_conditions?:
|
|
995
|
+
eq_conditions?: Record<string, any> | null;
|
|
943
996
|
}
|
|
944
997
|
/** PageResponse[Chunk] */
|
|
945
998
|
export interface IPageResponseChunk {
|
|
@@ -980,6 +1033,19 @@ export interface IPageResponseSpaceResponse {
|
|
|
980
1033
|
/** Total Pages */
|
|
981
1034
|
total_pages: number;
|
|
982
1035
|
}
|
|
1036
|
+
/** PageResponse[Tenant] */
|
|
1037
|
+
export interface IPageResponseTenant {
|
|
1038
|
+
/** Items */
|
|
1039
|
+
items: ITenant[];
|
|
1040
|
+
/** Total */
|
|
1041
|
+
total: number;
|
|
1042
|
+
/** Page */
|
|
1043
|
+
page: number;
|
|
1044
|
+
/** Page Size */
|
|
1045
|
+
page_size: number;
|
|
1046
|
+
/** Total Pages */
|
|
1047
|
+
total_pages: number;
|
|
1048
|
+
}
|
|
983
1049
|
/** QACreate */
|
|
984
1050
|
export interface IQACreate {
|
|
985
1051
|
/**
|
|
@@ -1004,7 +1070,7 @@ export interface IQACreate {
|
|
|
1004
1070
|
* additional metadata, user can update it
|
|
1005
1071
|
* @default {}
|
|
1006
1072
|
*/
|
|
1007
|
-
metadata?:
|
|
1073
|
+
metadata?: Record<string, any>;
|
|
1008
1074
|
/** source type */
|
|
1009
1075
|
source_type: IKnowledgeSourceEnum;
|
|
1010
1076
|
/**
|
|
@@ -1033,11 +1099,131 @@ export interface IQACreate {
|
|
|
1033
1099
|
* answer of the knowledge resource
|
|
1034
1100
|
*/
|
|
1035
1101
|
answer: string;
|
|
1036
|
-
/** split config of the knowledge */
|
|
1102
|
+
/** split config of the knowledge, used to split the question into chunks */
|
|
1037
1103
|
split_config: ITextSplitConfig;
|
|
1038
1104
|
/** source config of the knowledge */
|
|
1039
1105
|
source_config?: ITextSourceConfig | null;
|
|
1040
1106
|
}
|
|
1107
|
+
/** QueryByDeepSearch */
|
|
1108
|
+
export interface IQueryByDeepSearch {
|
|
1109
|
+
/**
|
|
1110
|
+
* Embedding Model Name
|
|
1111
|
+
* The name of the embedding model
|
|
1112
|
+
*/
|
|
1113
|
+
embedding_model_name: IEmbeddingModelEnum | string;
|
|
1114
|
+
/**
|
|
1115
|
+
* Similarity Threshold
|
|
1116
|
+
* The similarity threshold, ranging from 0.0 to 1.0.
|
|
1117
|
+
* @min 0
|
|
1118
|
+
* @max 1
|
|
1119
|
+
* @default 0.5
|
|
1120
|
+
*/
|
|
1121
|
+
similarity_threshold?: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* Top
|
|
1124
|
+
* The maximum number of results to return.
|
|
1125
|
+
* @min 1
|
|
1126
|
+
* @default 1024
|
|
1127
|
+
*/
|
|
1128
|
+
top?: number;
|
|
1129
|
+
/**
|
|
1130
|
+
* Metadata Filter
|
|
1131
|
+
* metadata filter
|
|
1132
|
+
* @default {}
|
|
1133
|
+
*/
|
|
1134
|
+
metadata_filter?: Record<string, any>;
|
|
1135
|
+
/**
|
|
1136
|
+
* Type
|
|
1137
|
+
* The type of the request, should be 'deep_search'.
|
|
1138
|
+
* @default "deep_search"
|
|
1139
|
+
*/
|
|
1140
|
+
type?: string;
|
|
1141
|
+
/**
|
|
1142
|
+
* Space Name List
|
|
1143
|
+
* space name list
|
|
1144
|
+
*/
|
|
1145
|
+
space_name_list: string[];
|
|
1146
|
+
}
|
|
1147
|
+
/** QueryByKnowledgeConfig */
|
|
1148
|
+
export interface IQueryByKnowledgeConfig {
|
|
1149
|
+
/**
|
|
1150
|
+
* Embedding Model Name
|
|
1151
|
+
* The name of the embedding model
|
|
1152
|
+
*/
|
|
1153
|
+
embedding_model_name: string;
|
|
1154
|
+
/**
|
|
1155
|
+
* Similarity Threshold
|
|
1156
|
+
* The similarity threshold, ranging from 0.0 to 1.0.
|
|
1157
|
+
* @min 0
|
|
1158
|
+
* @max 1
|
|
1159
|
+
* @default 0.5
|
|
1160
|
+
*/
|
|
1161
|
+
similarity_threshold?: number;
|
|
1162
|
+
/**
|
|
1163
|
+
* Top
|
|
1164
|
+
* The maximum number of results to return.
|
|
1165
|
+
* @min 1
|
|
1166
|
+
* @default 1024
|
|
1167
|
+
*/
|
|
1168
|
+
top?: number;
|
|
1169
|
+
/**
|
|
1170
|
+
* Metadata Filter
|
|
1171
|
+
* metadata filter
|
|
1172
|
+
* @default {}
|
|
1173
|
+
*/
|
|
1174
|
+
metadata_filter?: Record<string, any>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Type
|
|
1177
|
+
* The type of the request, should be 'query_in_knowledge_list'.
|
|
1178
|
+
* @default "query_in_knowledge_list"
|
|
1179
|
+
*/
|
|
1180
|
+
type?: string;
|
|
1181
|
+
/**
|
|
1182
|
+
* Space Id List
|
|
1183
|
+
* knowledge id list
|
|
1184
|
+
*/
|
|
1185
|
+
space_id_list: string[];
|
|
1186
|
+
}
|
|
1187
|
+
/** QueryBySpaceConfig */
|
|
1188
|
+
export interface IQueryBySpaceConfig {
|
|
1189
|
+
/**
|
|
1190
|
+
* Embedding Model Name
|
|
1191
|
+
* The name of the embedding model
|
|
1192
|
+
*/
|
|
1193
|
+
embedding_model_name: IEmbeddingModelEnum | string;
|
|
1194
|
+
/**
|
|
1195
|
+
* Similarity Threshold
|
|
1196
|
+
* The similarity threshold, ranging from 0.0 to 1.0.
|
|
1197
|
+
* @min 0
|
|
1198
|
+
* @max 1
|
|
1199
|
+
* @default 0.5
|
|
1200
|
+
*/
|
|
1201
|
+
similarity_threshold?: number;
|
|
1202
|
+
/**
|
|
1203
|
+
* Top
|
|
1204
|
+
* The maximum number of results to return.
|
|
1205
|
+
* @min 1
|
|
1206
|
+
* @default 1024
|
|
1207
|
+
*/
|
|
1208
|
+
top?: number;
|
|
1209
|
+
/**
|
|
1210
|
+
* Metadata Filter
|
|
1211
|
+
* metadata filter
|
|
1212
|
+
* @default {}
|
|
1213
|
+
*/
|
|
1214
|
+
metadata_filter?: Record<string, any>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Type
|
|
1217
|
+
* The type of the request, should be 'query_in_space_list'.
|
|
1218
|
+
* @default "query_in_space_list"
|
|
1219
|
+
*/
|
|
1220
|
+
type?: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* Space Id List
|
|
1223
|
+
* space id list
|
|
1224
|
+
*/
|
|
1225
|
+
space_id_list: string[];
|
|
1226
|
+
}
|
|
1041
1227
|
/** ResponseModel */
|
|
1042
1228
|
export interface IResponseModel {
|
|
1043
1229
|
/** Success */
|
|
@@ -1047,6 +1233,14 @@ export interface IResponseModel {
|
|
|
1047
1233
|
/** Message */
|
|
1048
1234
|
message?: string | null;
|
|
1049
1235
|
}
|
|
1236
|
+
/** ResponseModel[Chunk] */
|
|
1237
|
+
export interface IResponseModelChunk {
|
|
1238
|
+
/** Success */
|
|
1239
|
+
success: boolean;
|
|
1240
|
+
data?: IChunk | null;
|
|
1241
|
+
/** Message */
|
|
1242
|
+
message?: string | null;
|
|
1243
|
+
}
|
|
1050
1244
|
/** ResponseModel[Knowledge] */
|
|
1051
1245
|
export interface IResponseModelKnowledge {
|
|
1052
1246
|
/** Success */
|
|
@@ -1115,6 +1309,14 @@ export interface IResponseModelPageResponseSpaceResponse {
|
|
|
1115
1309
|
/** Message */
|
|
1116
1310
|
message?: string | null;
|
|
1117
1311
|
}
|
|
1312
|
+
/** ResponseModel[PageResponse[Tenant]] */
|
|
1313
|
+
export interface IResponseModelPageResponseTenant {
|
|
1314
|
+
/** Success */
|
|
1315
|
+
success: boolean;
|
|
1316
|
+
data?: IPageResponseTenant | null;
|
|
1317
|
+
/** Message */
|
|
1318
|
+
message?: string | null;
|
|
1319
|
+
}
|
|
1118
1320
|
/** ResponseModel[SpaceResponse] */
|
|
1119
1321
|
export interface IResponseModelSpaceResponse {
|
|
1120
1322
|
/** Success */
|
|
@@ -1147,15 +1349,22 @@ export interface IResponseModelTenant {
|
|
|
1147
1349
|
/** Message */
|
|
1148
1350
|
message?: string | null;
|
|
1149
1351
|
}
|
|
1352
|
+
/** ResponseModel[object] */
|
|
1353
|
+
export interface IResponseModelObject {
|
|
1354
|
+
/** Success */
|
|
1355
|
+
success: boolean;
|
|
1356
|
+
/** Data */
|
|
1357
|
+
data?: null;
|
|
1358
|
+
/** Message */
|
|
1359
|
+
message?: string | null;
|
|
1360
|
+
}
|
|
1150
1361
|
/** RetrievalByKnowledgeRequest */
|
|
1151
1362
|
export interface IRetrievalByKnowledgeRequest {
|
|
1152
1363
|
/**
|
|
1153
|
-
*
|
|
1154
|
-
* The
|
|
1364
|
+
* Embedding Model Name
|
|
1365
|
+
* The name of the embedding model
|
|
1155
1366
|
*/
|
|
1156
|
-
|
|
1157
|
-
/** The name of the embedding model */
|
|
1158
|
-
embedding_model_name: IEmbeddingModelEnum;
|
|
1367
|
+
embedding_model_name: IEmbeddingModelEnum | string;
|
|
1159
1368
|
/**
|
|
1160
1369
|
* Similarity Threshold
|
|
1161
1370
|
* The similarity threshold, ranging from 0.0 to 1.0.
|
|
@@ -1176,7 +1385,12 @@ export interface IRetrievalByKnowledgeRequest {
|
|
|
1176
1385
|
* metadata filter
|
|
1177
1386
|
* @default {}
|
|
1178
1387
|
*/
|
|
1179
|
-
metadata_filter?:
|
|
1388
|
+
metadata_filter?: Record<string, any>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Question
|
|
1391
|
+
* The query question
|
|
1392
|
+
*/
|
|
1393
|
+
question: string;
|
|
1180
1394
|
/**
|
|
1181
1395
|
* Knowledge Id List
|
|
1182
1396
|
* knowledge id list
|
|
@@ -1186,12 +1400,10 @@ export interface IRetrievalByKnowledgeRequest {
|
|
|
1186
1400
|
/** RetrievalBySpaceRequest */
|
|
1187
1401
|
export interface IRetrievalBySpaceRequest {
|
|
1188
1402
|
/**
|
|
1189
|
-
*
|
|
1190
|
-
* The
|
|
1403
|
+
* Embedding Model Name
|
|
1404
|
+
* The name of the embedding model
|
|
1191
1405
|
*/
|
|
1192
|
-
|
|
1193
|
-
/** The name of the embedding model */
|
|
1194
|
-
embedding_model_name: IEmbeddingModelEnum;
|
|
1406
|
+
embedding_model_name: IEmbeddingModelEnum | string;
|
|
1195
1407
|
/**
|
|
1196
1408
|
* Similarity Threshold
|
|
1197
1409
|
* The similarity threshold, ranging from 0.0 to 1.0.
|
|
@@ -1212,7 +1424,12 @@ export interface IRetrievalBySpaceRequest {
|
|
|
1212
1424
|
* metadata filter
|
|
1213
1425
|
* @default {}
|
|
1214
1426
|
*/
|
|
1215
|
-
metadata_filter?:
|
|
1427
|
+
metadata_filter?: Record<string, any>;
|
|
1428
|
+
/**
|
|
1429
|
+
* Question
|
|
1430
|
+
* The query question
|
|
1431
|
+
*/
|
|
1432
|
+
question: string;
|
|
1216
1433
|
/**
|
|
1217
1434
|
* Space Id List
|
|
1218
1435
|
* space id list
|
|
@@ -1260,7 +1477,7 @@ export interface IRetrievalChunk {
|
|
|
1260
1477
|
* Metadata
|
|
1261
1478
|
* Arbitrary metadata associated with the content.
|
|
1262
1479
|
*/
|
|
1263
|
-
metadata?:
|
|
1480
|
+
metadata?: Record<string, any> | null;
|
|
1264
1481
|
/**
|
|
1265
1482
|
* Gmt Create
|
|
1266
1483
|
* creation time
|
|
@@ -1273,10 +1490,23 @@ export interface IRetrievalChunk {
|
|
|
1273
1490
|
gmt_modified?: string;
|
|
1274
1491
|
/**
|
|
1275
1492
|
* Similarity
|
|
1276
|
-
* The similarity of the chunk
|
|
1493
|
+
* The similarity of the chunk, ranging from 0.0 to 1.0.
|
|
1277
1494
|
*/
|
|
1278
1495
|
similarity: number;
|
|
1279
1496
|
}
|
|
1497
|
+
/** RetrievalRequest */
|
|
1498
|
+
export interface IRetrievalRequest {
|
|
1499
|
+
/**
|
|
1500
|
+
* Question
|
|
1501
|
+
* The query question
|
|
1502
|
+
*/
|
|
1503
|
+
question: string;
|
|
1504
|
+
/**
|
|
1505
|
+
* Config
|
|
1506
|
+
* The configuration for the retrieval request
|
|
1507
|
+
*/
|
|
1508
|
+
config: IQueryBySpaceConfig | IQueryByKnowledgeConfig | IQueryByDeepSearch | Record<string, any>;
|
|
1509
|
+
}
|
|
1280
1510
|
/** S3SourceConfig */
|
|
1281
1511
|
export interface IS3SourceConfig {
|
|
1282
1512
|
/**
|
|
@@ -1310,10 +1540,10 @@ export interface IS3SourceConfig {
|
|
|
1310
1540
|
*/
|
|
1311
1541
|
secret_key?: string | null;
|
|
1312
1542
|
/**
|
|
1313
|
-
*
|
|
1543
|
+
* Auth Info
|
|
1314
1544
|
* s3 session token
|
|
1315
1545
|
*/
|
|
1316
|
-
|
|
1546
|
+
auth_info?: string | null;
|
|
1317
1547
|
}
|
|
1318
1548
|
/**
|
|
1319
1549
|
* SpaceCreate
|
|
@@ -1321,6 +1551,8 @@ export interface IS3SourceConfig {
|
|
|
1321
1551
|
* Attributes:
|
|
1322
1552
|
* space_name (str): Space name, example: petercat bot group.
|
|
1323
1553
|
* description (str): descrition of the space resource.
|
|
1554
|
+
* metadata (Dict[str, Any]): metadata of the space resource.such as embedding model name
|
|
1555
|
+
* and other parameters.
|
|
1324
1556
|
*/
|
|
1325
1557
|
export interface ISpaceCreate {
|
|
1326
1558
|
/**
|
|
@@ -1335,6 +1567,12 @@ export interface ISpaceCreate {
|
|
|
1335
1567
|
* @maxLength 255
|
|
1336
1568
|
*/
|
|
1337
1569
|
description: string;
|
|
1570
|
+
/**
|
|
1571
|
+
* Metadata
|
|
1572
|
+
* metadata of the space resource
|
|
1573
|
+
* @default {}
|
|
1574
|
+
*/
|
|
1575
|
+
metadata?: Record<string, any>;
|
|
1338
1576
|
}
|
|
1339
1577
|
/**
|
|
1340
1578
|
* SpaceResponse
|
|
@@ -1357,6 +1595,12 @@ export interface ISpaceResponse {
|
|
|
1357
1595
|
* @maxLength 255
|
|
1358
1596
|
*/
|
|
1359
1597
|
description: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* Metadata
|
|
1600
|
+
* metadata of the space resource
|
|
1601
|
+
* @default {}
|
|
1602
|
+
*/
|
|
1603
|
+
metadata?: Record<string, any>;
|
|
1360
1604
|
/**
|
|
1361
1605
|
* Space Id
|
|
1362
1606
|
* space id
|
|
@@ -1407,6 +1651,16 @@ export interface IStatusStatisticsPageResponseTask {
|
|
|
1407
1651
|
* @default 0
|
|
1408
1652
|
*/
|
|
1409
1653
|
success?: number;
|
|
1654
|
+
/**
|
|
1655
|
+
* Failed
|
|
1656
|
+
* @default 0
|
|
1657
|
+
*/
|
|
1658
|
+
failed?: number;
|
|
1659
|
+
/**
|
|
1660
|
+
* Cancelled
|
|
1661
|
+
* @default 0
|
|
1662
|
+
*/
|
|
1663
|
+
cancelled?: number;
|
|
1410
1664
|
}
|
|
1411
1665
|
/** Task */
|
|
1412
1666
|
export interface ITask {
|
|
@@ -1429,7 +1683,7 @@ export interface ITask {
|
|
|
1429
1683
|
* Metadata
|
|
1430
1684
|
* Metadata for the task
|
|
1431
1685
|
*/
|
|
1432
|
-
metadata?:
|
|
1686
|
+
metadata?: Record<string, any> | null;
|
|
1433
1687
|
/**
|
|
1434
1688
|
* Error Message
|
|
1435
1689
|
* Error message (only present if the task failed)
|
|
@@ -1503,7 +1757,7 @@ export interface ITenant {
|
|
|
1503
1757
|
* Metadata
|
|
1504
1758
|
* Metadata for the tenant
|
|
1505
1759
|
*/
|
|
1506
|
-
metadata?:
|
|
1760
|
+
metadata?: Record<string, any> | null;
|
|
1507
1761
|
/**
|
|
1508
1762
|
* Gmt Create
|
|
1509
1763
|
* tenant created time
|
|
@@ -1520,7 +1774,20 @@ export interface ITenantCreate {
|
|
|
1520
1774
|
/** Tenant Name */
|
|
1521
1775
|
tenant_name: string;
|
|
1522
1776
|
/** Email */
|
|
1777
|
+
email: string;
|
|
1778
|
+
/** Metadata */
|
|
1779
|
+
metadata?: Record<string, any> | null;
|
|
1780
|
+
}
|
|
1781
|
+
/** TenantUpdate */
|
|
1782
|
+
export interface ITenantUpdate {
|
|
1783
|
+
/** Tenant Id */
|
|
1784
|
+
tenant_id: string;
|
|
1785
|
+
/** Tenant Name */
|
|
1786
|
+
tenant_name?: string | null;
|
|
1787
|
+
/** Email */
|
|
1523
1788
|
email?: string | null;
|
|
1789
|
+
/** Metadata */
|
|
1790
|
+
metadata?: Record<string, any> | null;
|
|
1524
1791
|
}
|
|
1525
1792
|
/** TextCreate */
|
|
1526
1793
|
export interface ITextCreate {
|
|
@@ -1546,7 +1813,7 @@ export interface ITextCreate {
|
|
|
1546
1813
|
* additional metadata, user can update it
|
|
1547
1814
|
* @default {}
|
|
1548
1815
|
*/
|
|
1549
|
-
metadata?:
|
|
1816
|
+
metadata?: Record<string, any>;
|
|
1550
1817
|
/** source type */
|
|
1551
1818
|
source_type: IKnowledgeSourceEnum;
|
|
1552
1819
|
/**
|
|
@@ -1591,13 +1858,14 @@ export interface ITextSourceConfig {
|
|
|
1591
1858
|
export interface ITextSplitConfig {
|
|
1592
1859
|
/**
|
|
1593
1860
|
* Chunk Size
|
|
1861
|
+
* chunk max size
|
|
1594
1862
|
* @min 1
|
|
1595
|
-
* @exclusiveMax 5000
|
|
1596
1863
|
* @default 1500
|
|
1597
1864
|
*/
|
|
1598
1865
|
chunk_size?: number;
|
|
1599
1866
|
/**
|
|
1600
1867
|
* Chunk Overlap
|
|
1868
|
+
* chunk overlap size, must be less than chunk_size
|
|
1601
1869
|
* @min 0
|
|
1602
1870
|
* @default 150
|
|
1603
1871
|
*/
|
|
@@ -1607,7 +1875,17 @@ export interface ITextSplitConfig {
|
|
|
1607
1875
|
* List of separators to split the text. If None, uses default separators
|
|
1608
1876
|
* @default ["\n\n"]
|
|
1609
1877
|
*/
|
|
1610
|
-
separators?: string[];
|
|
1878
|
+
separators?: string[] | null;
|
|
1879
|
+
/**
|
|
1880
|
+
* Split Regex
|
|
1881
|
+
* split_regex,if set, use it instead of separators
|
|
1882
|
+
*/
|
|
1883
|
+
split_regex?: string | null;
|
|
1884
|
+
/**
|
|
1885
|
+
* Type
|
|
1886
|
+
* @default "text"
|
|
1887
|
+
*/
|
|
1888
|
+
type?: "text";
|
|
1611
1889
|
/**
|
|
1612
1890
|
* Keep Separator
|
|
1613
1891
|
* Whether to keep the separator and where to place it in each corresponding chunk (True='start')
|
|
@@ -1712,14 +1990,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1712
1990
|
*/
|
|
1713
1991
|
addKnowledge: (data: (IKnowledgeCreate | ITextCreate | IImageCreate | IJSONCreate | IMarkdownCreate | IPDFCreate | IGithubRepoCreate | IQACreate)[], params?: RequestParams) => Promise<HttpResponse<IResponseModelListKnowledge, void | IHTTPValidationError>>;
|
|
1714
1992
|
/**
|
|
1715
|
-
*
|
|
1993
|
+
* No description
|
|
1716
1994
|
*
|
|
1717
1995
|
* @tags knowledge
|
|
1718
1996
|
* @name UpdateKnowledge
|
|
1719
1997
|
* @summary Update Knowledge
|
|
1720
1998
|
* @request POST:/api/knowledge/update
|
|
1721
1999
|
*/
|
|
1722
|
-
updateKnowledge: (data: IKnowledgeInput
|
|
2000
|
+
updateKnowledge: (data: IKnowledgeInput, params?: RequestParams) => Promise<HttpResponse<IResponseModelKnowledge, void | IHTTPValidationError>>;
|
|
1723
2001
|
/**
|
|
1724
2002
|
* No description
|
|
1725
2003
|
*
|
|
@@ -1753,6 +2031,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1753
2031
|
/** Knowledge Id */
|
|
1754
2032
|
knowledge_id: string;
|
|
1755
2033
|
}, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
|
|
2034
|
+
/**
|
|
2035
|
+
* No description
|
|
2036
|
+
*
|
|
2037
|
+
* @tags knowledge
|
|
2038
|
+
* @name GetEmbeddingModelsList
|
|
2039
|
+
* @summary Get Embedding Models List
|
|
2040
|
+
* @request GET:/api/knowledge/embedding/models
|
|
2041
|
+
*/
|
|
2042
|
+
getEmbeddingModelsList: (params?: RequestParams) => Promise<HttpResponse<any, void | IHTTPValidationError>>;
|
|
1756
2043
|
};
|
|
1757
2044
|
retrieval: {
|
|
1758
2045
|
/**
|
|
@@ -1773,6 +2060,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1773
2060
|
* @request POST:/api/retrieval/space
|
|
1774
2061
|
*/
|
|
1775
2062
|
retrieveSpaceContent: (data: IRetrievalBySpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
|
|
2063
|
+
/**
|
|
2064
|
+
* @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id.
|
|
2065
|
+
*
|
|
2066
|
+
* @tags retrieval
|
|
2067
|
+
* @name Retrieve
|
|
2068
|
+
* @summary Retrieve
|
|
2069
|
+
* @request POST:/api/retrieval/
|
|
2070
|
+
*/
|
|
2071
|
+
retrieve: (data: IRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
|
|
1776
2072
|
};
|
|
1777
2073
|
task: {
|
|
1778
2074
|
/**
|
|
@@ -1837,6 +2133,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1837
2133
|
* @request POST:/api/chunk/list
|
|
1838
2134
|
*/
|
|
1839
2135
|
getChunkList: (data: IPageParamsChunk, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseChunk, void | IHTTPValidationError>>;
|
|
2136
|
+
/**
|
|
2137
|
+
* No description
|
|
2138
|
+
*
|
|
2139
|
+
* @tags chunk
|
|
2140
|
+
* @name DeleteChunkById
|
|
2141
|
+
* @summary Delete Chunk By Id
|
|
2142
|
+
* @request DELETE:/api/chunk/id/{id}/model_name/{model_name}
|
|
2143
|
+
*/
|
|
2144
|
+
deleteChunkById: (id: string, modelName: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelObject, void | IHTTPValidationError>>;
|
|
2145
|
+
/**
|
|
2146
|
+
* No description
|
|
2147
|
+
*
|
|
2148
|
+
* @tags chunk
|
|
2149
|
+
* @name GetChunkById
|
|
2150
|
+
* @summary Get Chunk By Id
|
|
2151
|
+
* @request GET:/api/chunk/id/{id}/model_name/{model_name}
|
|
2152
|
+
*/
|
|
2153
|
+
getChunkById: (id: string, modelName: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelChunk, void | IHTTPValidationError>>;
|
|
2154
|
+
/**
|
|
2155
|
+
* No description
|
|
2156
|
+
*
|
|
2157
|
+
* @tags chunk
|
|
2158
|
+
* @name SaveChunk
|
|
2159
|
+
* @summary Save Chunk
|
|
2160
|
+
* @request POST:/api/chunk/save
|
|
2161
|
+
*/
|
|
2162
|
+
saveChunk: (data: IChunkSave, params?: RequestParams) => Promise<HttpResponse<IResponseModelChunk, void | IHTTPValidationError>>;
|
|
1840
2163
|
};
|
|
1841
2164
|
tenant: {
|
|
1842
2165
|
/**
|
|
@@ -1848,6 +2171,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1848
2171
|
* @request POST:/api/tenant/create
|
|
1849
2172
|
*/
|
|
1850
2173
|
createTenant: (data: ITenantCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
|
|
2174
|
+
/**
|
|
2175
|
+
* No description
|
|
2176
|
+
*
|
|
2177
|
+
* @tags tenant
|
|
2178
|
+
* @name GetTenantById
|
|
2179
|
+
* @summary Query Tenant
|
|
2180
|
+
* @request GET:/api/tenant/id/{id}
|
|
2181
|
+
*/
|
|
2182
|
+
getTenantById: (id: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
|
|
2183
|
+
/**
|
|
2184
|
+
* No description
|
|
2185
|
+
*
|
|
2186
|
+
* @tags tenant
|
|
2187
|
+
* @name DeleteTenantById
|
|
2188
|
+
* @summary Delete Tenant
|
|
2189
|
+
* @request DELETE:/api/tenant/{id}
|
|
2190
|
+
*/
|
|
2191
|
+
deleteTenantById: (id: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelObject, void | IHTTPValidationError>>;
|
|
2192
|
+
/**
|
|
2193
|
+
* No description
|
|
2194
|
+
*
|
|
2195
|
+
* @tags tenant
|
|
2196
|
+
* @name UpdateTenant
|
|
2197
|
+
* @summary Update Tenant
|
|
2198
|
+
* @request POST:/api/tenant/update
|
|
2199
|
+
*/
|
|
2200
|
+
updateTenant: (data: ITenantUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
|
|
2201
|
+
/**
|
|
2202
|
+
* No description
|
|
2203
|
+
*
|
|
2204
|
+
* @tags tenant
|
|
2205
|
+
* @name GetTenantList
|
|
2206
|
+
* @summary Get Tenant List
|
|
2207
|
+
* @request GET:/api/tenant/list
|
|
2208
|
+
*/
|
|
2209
|
+
getTenantList: (query?: {
|
|
2210
|
+
/**
|
|
2211
|
+
* Page
|
|
2212
|
+
* @default 1
|
|
2213
|
+
*/
|
|
2214
|
+
page?: number;
|
|
2215
|
+
/**
|
|
2216
|
+
* Page Size
|
|
2217
|
+
* @default 10
|
|
2218
|
+
*/
|
|
2219
|
+
page_size?: number;
|
|
2220
|
+
}, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseTenant, void | IHTTPValidationError>>;
|
|
1851
2221
|
/**
|
|
1852
2222
|
* No description
|
|
1853
2223
|
*
|
package/dist/api.js
CHANGED
|
@@ -47,15 +47,23 @@ var IKnowledgeTypeEnum;
|
|
|
47
47
|
IKnowledgeTypeEnum["Docx"] = "docx";
|
|
48
48
|
IKnowledgeTypeEnum["Pdf"] = "pdf";
|
|
49
49
|
IKnowledgeTypeEnum["Qa"] = "qa";
|
|
50
|
+
IKnowledgeTypeEnum["Yuquedoc"] = "yuquedoc";
|
|
51
|
+
IKnowledgeTypeEnum["OpenapiApp"] = "openapi_app";
|
|
50
52
|
IKnowledgeTypeEnum["Folder"] = "folder";
|
|
51
53
|
})(IKnowledgeTypeEnum || (exports.IKnowledgeTypeEnum = IKnowledgeTypeEnum = {}));
|
|
52
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* KnowledgeSourceEnum
|
|
56
|
+
* Specifies the source of knowledge, which influences the behavior of the resource loader
|
|
57
|
+
*/
|
|
53
58
|
var IKnowledgeSourceEnum;
|
|
54
59
|
(function (IKnowledgeSourceEnum) {
|
|
55
60
|
IKnowledgeSourceEnum["GithubRepo"] = "github_repo";
|
|
56
61
|
IKnowledgeSourceEnum["GithubFile"] = "github_file";
|
|
57
62
|
IKnowledgeSourceEnum["UserInputText"] = "user_input_text";
|
|
58
63
|
IKnowledgeSourceEnum["UserUploadFile"] = "user_upload_file";
|
|
64
|
+
IKnowledgeSourceEnum["Yuque"] = "yuque";
|
|
65
|
+
IKnowledgeSourceEnum["Youtube"] = "youtube";
|
|
66
|
+
IKnowledgeSourceEnum["Database"] = "database";
|
|
59
67
|
})(IKnowledgeSourceEnum || (exports.IKnowledgeSourceEnum = IKnowledgeSourceEnum = {}));
|
|
60
68
|
/** EmbeddingModelEnum */
|
|
61
69
|
var IEmbeddingModelEnum;
|
|
@@ -226,7 +234,7 @@ class Api extends HttpClient {
|
|
|
226
234
|
*/
|
|
227
235
|
addKnowledge: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
228
236
|
/**
|
|
229
|
-
*
|
|
237
|
+
* No description
|
|
230
238
|
*
|
|
231
239
|
* @tags knowledge
|
|
232
240
|
* @name UpdateKnowledge
|
|
@@ -261,6 +269,15 @@ class Api extends HttpClient {
|
|
|
261
269
|
* @request DELETE:/api/knowledge/delete
|
|
262
270
|
*/
|
|
263
271
|
deleteKnowledge: (query, params = {}) => this.request(Object.assign({ path: `/api/knowledge/delete`, method: "DELETE", query: query, format: "json" }, params)),
|
|
272
|
+
/**
|
|
273
|
+
* No description
|
|
274
|
+
*
|
|
275
|
+
* @tags knowledge
|
|
276
|
+
* @name GetEmbeddingModelsList
|
|
277
|
+
* @summary Get Embedding Models List
|
|
278
|
+
* @request GET:/api/knowledge/embedding/models
|
|
279
|
+
*/
|
|
280
|
+
getEmbeddingModelsList: (params = {}) => this.request(Object.assign({ path: `/api/knowledge/embedding/models`, method: "GET", format: "json" }, params)),
|
|
264
281
|
};
|
|
265
282
|
this.retrieval = {
|
|
266
283
|
/**
|
|
@@ -281,6 +298,15 @@ class Api extends HttpClient {
|
|
|
281
298
|
* @request POST:/api/retrieval/space
|
|
282
299
|
*/
|
|
283
300
|
retrieveSpaceContent: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/space`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
301
|
+
/**
|
|
302
|
+
* @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id.
|
|
303
|
+
*
|
|
304
|
+
* @tags retrieval
|
|
305
|
+
* @name Retrieve
|
|
306
|
+
* @summary Retrieve
|
|
307
|
+
* @request POST:/api/retrieval/
|
|
308
|
+
*/
|
|
309
|
+
retrieve: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
284
310
|
};
|
|
285
311
|
this.task = {
|
|
286
312
|
/**
|
|
@@ -339,6 +365,33 @@ class Api extends HttpClient {
|
|
|
339
365
|
* @request POST:/api/chunk/list
|
|
340
366
|
*/
|
|
341
367
|
getChunkList: (data, params = {}) => this.request(Object.assign({ path: `/api/chunk/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
368
|
+
/**
|
|
369
|
+
* No description
|
|
370
|
+
*
|
|
371
|
+
* @tags chunk
|
|
372
|
+
* @name DeleteChunkById
|
|
373
|
+
* @summary Delete Chunk By Id
|
|
374
|
+
* @request DELETE:/api/chunk/id/{id}/model_name/{model_name}
|
|
375
|
+
*/
|
|
376
|
+
deleteChunkById: (id, modelName, params = {}) => this.request(Object.assign({ path: `/api/chunk/id/${id}/model_name/${modelName}`, method: "DELETE", format: "json" }, params)),
|
|
377
|
+
/**
|
|
378
|
+
* No description
|
|
379
|
+
*
|
|
380
|
+
* @tags chunk
|
|
381
|
+
* @name GetChunkById
|
|
382
|
+
* @summary Get Chunk By Id
|
|
383
|
+
* @request GET:/api/chunk/id/{id}/model_name/{model_name}
|
|
384
|
+
*/
|
|
385
|
+
getChunkById: (id, modelName, params = {}) => this.request(Object.assign({ path: `/api/chunk/id/${id}/model_name/${modelName}`, method: "GET", format: "json" }, params)),
|
|
386
|
+
/**
|
|
387
|
+
* No description
|
|
388
|
+
*
|
|
389
|
+
* @tags chunk
|
|
390
|
+
* @name SaveChunk
|
|
391
|
+
* @summary Save Chunk
|
|
392
|
+
* @request POST:/api/chunk/save
|
|
393
|
+
*/
|
|
394
|
+
saveChunk: (data, params = {}) => this.request(Object.assign({ path: `/api/chunk/save`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
342
395
|
};
|
|
343
396
|
this.tenant = {
|
|
344
397
|
/**
|
|
@@ -350,6 +403,42 @@ class Api extends HttpClient {
|
|
|
350
403
|
* @request POST:/api/tenant/create
|
|
351
404
|
*/
|
|
352
405
|
createTenant: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/create`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
406
|
+
/**
|
|
407
|
+
* No description
|
|
408
|
+
*
|
|
409
|
+
* @tags tenant
|
|
410
|
+
* @name GetTenantById
|
|
411
|
+
* @summary Query Tenant
|
|
412
|
+
* @request GET:/api/tenant/id/{id}
|
|
413
|
+
*/
|
|
414
|
+
getTenantById: (id, params = {}) => this.request(Object.assign({ path: `/api/tenant/id/${id}`, method: "GET", format: "json" }, params)),
|
|
415
|
+
/**
|
|
416
|
+
* No description
|
|
417
|
+
*
|
|
418
|
+
* @tags tenant
|
|
419
|
+
* @name DeleteTenantById
|
|
420
|
+
* @summary Delete Tenant
|
|
421
|
+
* @request DELETE:/api/tenant/{id}
|
|
422
|
+
*/
|
|
423
|
+
deleteTenantById: (id, params = {}) => this.request(Object.assign({ path: `/api/tenant/${id}`, method: "DELETE", format: "json" }, params)),
|
|
424
|
+
/**
|
|
425
|
+
* No description
|
|
426
|
+
*
|
|
427
|
+
* @tags tenant
|
|
428
|
+
* @name UpdateTenant
|
|
429
|
+
* @summary Update Tenant
|
|
430
|
+
* @request POST:/api/tenant/update
|
|
431
|
+
*/
|
|
432
|
+
updateTenant: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/update`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
433
|
+
/**
|
|
434
|
+
* No description
|
|
435
|
+
*
|
|
436
|
+
* @tags tenant
|
|
437
|
+
* @name GetTenantList
|
|
438
|
+
* @summary Get Tenant List
|
|
439
|
+
* @request GET:/api/tenant/list
|
|
440
|
+
*/
|
|
441
|
+
getTenantList: (query, params = {}) => this.request(Object.assign({ path: `/api/tenant/list`, method: "GET", query: query, format: "json" }, params)),
|
|
353
442
|
/**
|
|
354
443
|
* No description
|
|
355
444
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petercatai/whisker-client",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Generated API client (
|
|
3
|
+
"version": "0.1.202504301149",
|
|
4
|
+
"description": "Generated API client (Production)",
|
|
5
5
|
"main": "dist/api.js",
|
|
6
6
|
"types": "dist/api.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public",
|
|
16
|
-
"tag": "
|
|
16
|
+
"tag": "latest"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/node": "^22.
|
|
20
|
-
"axios": "^1.
|
|
19
|
+
"@types/node": "^22.15.3",
|
|
20
|
+
"axios": "^1.9.0",
|
|
21
21
|
"typescript": "^5.8.3"
|
|
22
22
|
}
|
|
23
23
|
}
|