@petercatai/whisker-client 0.1.202505141300 → 0.1.202505160555
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 +98 -33
- package/dist/api.js +14 -5
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -105,6 +105,12 @@ export interface IChunk {
|
|
|
105
105
|
* file source info
|
|
106
106
|
*/
|
|
107
107
|
knowledge_id: string;
|
|
108
|
+
/**
|
|
109
|
+
* Enabled
|
|
110
|
+
* is chunk enabled
|
|
111
|
+
* @default true
|
|
112
|
+
*/
|
|
113
|
+
enabled?: boolean;
|
|
108
114
|
/**
|
|
109
115
|
* Embedding Model Name
|
|
110
116
|
* name of the embedding model
|
|
@@ -150,6 +156,13 @@ export interface IChunkUpdate {
|
|
|
150
156
|
/** Metadata */
|
|
151
157
|
metadata?: Record<string, any> | null;
|
|
152
158
|
}
|
|
159
|
+
/** EnableStatusUpdate */
|
|
160
|
+
export interface IEnableStatusUpdate {
|
|
161
|
+
/** Knowledge Id */
|
|
162
|
+
knowledge_id: string;
|
|
163
|
+
/** Status */
|
|
164
|
+
status: boolean;
|
|
165
|
+
}
|
|
153
166
|
/**
|
|
154
167
|
* GeaGraphSplitConfig
|
|
155
168
|
* JSON document split configuration
|
|
@@ -165,7 +178,7 @@ export interface IGeaGraphSplitConfig {
|
|
|
165
178
|
* Kisid
|
|
166
179
|
* The Kis platform business id
|
|
167
180
|
*/
|
|
168
|
-
kisId
|
|
181
|
+
kisId: number;
|
|
169
182
|
}
|
|
170
183
|
/** GithubFileSourceConfig */
|
|
171
184
|
export interface IGithubFileSourceConfig {
|
|
@@ -788,21 +801,6 @@ export interface IPDFSplitConfig {
|
|
|
788
801
|
}
|
|
789
802
|
/** PageParams[Chunk] */
|
|
790
803
|
export interface IPageParamsChunk {
|
|
791
|
-
/**
|
|
792
|
-
* Page
|
|
793
|
-
* page number
|
|
794
|
-
* @min 1
|
|
795
|
-
* @default 1
|
|
796
|
-
*/
|
|
797
|
-
page?: number;
|
|
798
|
-
/**
|
|
799
|
-
* Page Size
|
|
800
|
-
* page size
|
|
801
|
-
* @min 1
|
|
802
|
-
* @max 1000
|
|
803
|
-
* @default 10
|
|
804
|
-
*/
|
|
805
|
-
page_size?: number;
|
|
806
804
|
/**
|
|
807
805
|
* Order By
|
|
808
806
|
* order by field
|
|
@@ -819,9 +817,6 @@ export interface IPageParamsChunk {
|
|
|
819
817
|
* list of equality conditions, each as a dict with key and value
|
|
820
818
|
*/
|
|
821
819
|
eq_conditions?: Record<string, any> | null;
|
|
822
|
-
}
|
|
823
|
-
/** PageParams[Knowledge] */
|
|
824
|
-
export interface IPageParamsKnowledge {
|
|
825
820
|
/**
|
|
826
821
|
* Page
|
|
827
822
|
* page number
|
|
@@ -837,6 +832,9 @@ export interface IPageParamsKnowledge {
|
|
|
837
832
|
* @default 10
|
|
838
833
|
*/
|
|
839
834
|
page_size?: number;
|
|
835
|
+
}
|
|
836
|
+
/** PageParams[Knowledge] */
|
|
837
|
+
export interface IPageParamsKnowledge {
|
|
840
838
|
/**
|
|
841
839
|
* Order By
|
|
842
840
|
* order by field
|
|
@@ -853,9 +851,6 @@ export interface IPageParamsKnowledge {
|
|
|
853
851
|
* list of equality conditions, each as a dict with key and value
|
|
854
852
|
*/
|
|
855
853
|
eq_conditions?: Record<string, any> | null;
|
|
856
|
-
}
|
|
857
|
-
/** PageParams[Space] */
|
|
858
|
-
export interface IPageParamsSpace {
|
|
859
854
|
/**
|
|
860
855
|
* Page
|
|
861
856
|
* page number
|
|
@@ -871,6 +866,9 @@ export interface IPageParamsSpace {
|
|
|
871
866
|
* @default 10
|
|
872
867
|
*/
|
|
873
868
|
page_size?: number;
|
|
869
|
+
}
|
|
870
|
+
/** PageParams[Space] */
|
|
871
|
+
export interface IPageParamsSpace {
|
|
874
872
|
/**
|
|
875
873
|
* Order By
|
|
876
874
|
* order by field
|
|
@@ -887,9 +885,6 @@ export interface IPageParamsSpace {
|
|
|
887
885
|
* list of equality conditions, each as a dict with key and value
|
|
888
886
|
*/
|
|
889
887
|
eq_conditions?: Record<string, any> | null;
|
|
890
|
-
}
|
|
891
|
-
/** PageParams[Task] */
|
|
892
|
-
export interface IPageParamsTask {
|
|
893
888
|
/**
|
|
894
889
|
* Page
|
|
895
890
|
* page number
|
|
@@ -905,6 +900,9 @@ export interface IPageParamsTask {
|
|
|
905
900
|
* @default 10
|
|
906
901
|
*/
|
|
907
902
|
page_size?: number;
|
|
903
|
+
}
|
|
904
|
+
/** PageParams[Task] */
|
|
905
|
+
export interface IPageParamsTask {
|
|
908
906
|
/**
|
|
909
907
|
* Order By
|
|
910
908
|
* order by field
|
|
@@ -921,6 +919,21 @@ export interface IPageParamsTask {
|
|
|
921
919
|
* list of equality conditions, each as a dict with key and value
|
|
922
920
|
*/
|
|
923
921
|
eq_conditions?: Record<string, any> | null;
|
|
922
|
+
/**
|
|
923
|
+
* Page
|
|
924
|
+
* page number
|
|
925
|
+
* @min 1
|
|
926
|
+
* @default 1
|
|
927
|
+
*/
|
|
928
|
+
page?: number;
|
|
929
|
+
/**
|
|
930
|
+
* Page Size
|
|
931
|
+
* page size
|
|
932
|
+
* @min 1
|
|
933
|
+
* @max 1000
|
|
934
|
+
* @default 10
|
|
935
|
+
*/
|
|
936
|
+
page_size?: number;
|
|
924
937
|
}
|
|
925
938
|
/** PageResponse[Chunk] */
|
|
926
939
|
export interface IPageResponseChunk {
|
|
@@ -1400,6 +1413,12 @@ export interface IRetrievalChunk {
|
|
|
1400
1413
|
* file source info
|
|
1401
1414
|
*/
|
|
1402
1415
|
knowledge_id: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* Enabled
|
|
1418
|
+
* is chunk enabled
|
|
1419
|
+
* @default true
|
|
1420
|
+
*/
|
|
1421
|
+
enabled?: boolean;
|
|
1403
1422
|
/**
|
|
1404
1423
|
* Embedding Model Name
|
|
1405
1424
|
* name of the embedding model
|
|
@@ -1593,6 +1612,11 @@ export interface IStatusStatisticsPageResponseTask {
|
|
|
1593
1612
|
* @default 0
|
|
1594
1613
|
*/
|
|
1595
1614
|
cancelled?: number;
|
|
1615
|
+
/**
|
|
1616
|
+
* Pending
|
|
1617
|
+
* @default 0
|
|
1618
|
+
*/
|
|
1619
|
+
pending?: number;
|
|
1596
1620
|
}
|
|
1597
1621
|
/** Task */
|
|
1598
1622
|
export interface ITask {
|
|
@@ -1776,9 +1800,9 @@ export interface ITextCreate {
|
|
|
1776
1800
|
export interface ITextSourceConfig {
|
|
1777
1801
|
/**
|
|
1778
1802
|
* Text
|
|
1779
|
-
* Text content, length range 1-
|
|
1803
|
+
* Text content, length range 1-1000000 characters
|
|
1780
1804
|
* @minLength 1
|
|
1781
|
-
* @maxLength
|
|
1805
|
+
* @maxLength 10000000
|
|
1782
1806
|
* @default ""
|
|
1783
1807
|
*/
|
|
1784
1808
|
text?: string;
|
|
@@ -1891,7 +1915,7 @@ export interface IYuqueCreate {
|
|
|
1891
1915
|
* Split Config
|
|
1892
1916
|
* split config of the knowledge
|
|
1893
1917
|
*/
|
|
1894
|
-
split_config: IGeaGraphSplitConfig |
|
|
1918
|
+
split_config: IGeaGraphSplitConfig | IYuqueSplitConfig;
|
|
1895
1919
|
}
|
|
1896
1920
|
/** YuqueSourceConfig */
|
|
1897
1921
|
export interface IYuqueSourceConfig {
|
|
@@ -1922,6 +1946,38 @@ export interface IYuqueSourceConfig {
|
|
|
1922
1946
|
*/
|
|
1923
1947
|
auth_info: string;
|
|
1924
1948
|
}
|
|
1949
|
+
/** YuqueSplitConfig */
|
|
1950
|
+
export interface IYuqueSplitConfig {
|
|
1951
|
+
/**
|
|
1952
|
+
* Chunk Size
|
|
1953
|
+
* chunk max size
|
|
1954
|
+
* @min 1
|
|
1955
|
+
* @default 1500
|
|
1956
|
+
*/
|
|
1957
|
+
chunk_size?: number;
|
|
1958
|
+
/**
|
|
1959
|
+
* Chunk Overlap
|
|
1960
|
+
* chunk overlap size, must be less than chunk_size
|
|
1961
|
+
* @min 0
|
|
1962
|
+
* @default 150
|
|
1963
|
+
*/
|
|
1964
|
+
chunk_overlap?: number;
|
|
1965
|
+
/**
|
|
1966
|
+
* Type
|
|
1967
|
+
* @default "yuque"
|
|
1968
|
+
*/
|
|
1969
|
+
type?: "yuque";
|
|
1970
|
+
/**
|
|
1971
|
+
* Separators
|
|
1972
|
+
* List of separators to split the text. If None, uses default separators
|
|
1973
|
+
*/
|
|
1974
|
+
separators: string[];
|
|
1975
|
+
/**
|
|
1976
|
+
* Is Separator Regex
|
|
1977
|
+
* If true, the separators should be in regular expression format.
|
|
1978
|
+
*/
|
|
1979
|
+
is_separator_regex: boolean;
|
|
1980
|
+
}
|
|
1925
1981
|
export type QueryParamsType = Record<string | number, any>;
|
|
1926
1982
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
1927
1983
|
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|
@@ -2012,6 +2068,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2012
2068
|
* @request POST:/api/knowledge/update
|
|
2013
2069
|
*/
|
|
2014
2070
|
updateKnowledge: (data: IKnowledgeInput, params?: RequestParams) => Promise<HttpResponse<IResponseModelKnowledge, void | IHTTPValidationError>>;
|
|
2071
|
+
/**
|
|
2072
|
+
* No description
|
|
2073
|
+
*
|
|
2074
|
+
* @tags knowledge
|
|
2075
|
+
* @name UpdateKnowledgeEnableStatus
|
|
2076
|
+
* @summary Update Knowledge Enable Status
|
|
2077
|
+
* @request POST:/api/knowledge/update/enabled
|
|
2078
|
+
*/
|
|
2079
|
+
updateKnowledgeEnableStatus: (data: IEnableStatusUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
|
|
2015
2080
|
/**
|
|
2016
2081
|
* No description
|
|
2017
2082
|
*
|
|
@@ -2253,7 +2318,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2253
2318
|
};
|
|
2254
2319
|
space: {
|
|
2255
2320
|
/**
|
|
2256
|
-
*
|
|
2321
|
+
* No description
|
|
2257
2322
|
*
|
|
2258
2323
|
* @tags space
|
|
2259
2324
|
* @name GetSpaceList
|
|
@@ -2262,7 +2327,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2262
2327
|
*/
|
|
2263
2328
|
getSpaceList: (data: IPageParamsSpace, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseSpaceResponse, void | IHTTPValidationError>>;
|
|
2264
2329
|
/**
|
|
2265
|
-
*
|
|
2330
|
+
* No description
|
|
2266
2331
|
*
|
|
2267
2332
|
* @tags space
|
|
2268
2333
|
* @name AddSpace
|
|
@@ -2271,7 +2336,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2271
2336
|
*/
|
|
2272
2337
|
addSpace: (data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
|
|
2273
2338
|
/**
|
|
2274
|
-
*
|
|
2339
|
+
* No description
|
|
2275
2340
|
*
|
|
2276
2341
|
* @tags space
|
|
2277
2342
|
* @name DeleteSpace
|
|
@@ -2280,7 +2345,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2280
2345
|
*/
|
|
2281
2346
|
deleteSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
|
|
2282
2347
|
/**
|
|
2283
|
-
*
|
|
2348
|
+
* No description
|
|
2284
2349
|
*
|
|
2285
2350
|
* @tags space
|
|
2286
2351
|
* @name UpdateSpace
|
|
@@ -2289,7 +2354,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2289
2354
|
*/
|
|
2290
2355
|
updateSpace: (spaceId: string, data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
|
|
2291
2356
|
/**
|
|
2292
|
-
*
|
|
2357
|
+
* No description
|
|
2293
2358
|
*
|
|
2294
2359
|
* @tags space
|
|
2295
2360
|
* @name GetSpaceById
|
package/dist/api.js
CHANGED
|
@@ -240,6 +240,15 @@ class Api extends HttpClient {
|
|
|
240
240
|
* @request POST:/api/knowledge/update
|
|
241
241
|
*/
|
|
242
242
|
updateKnowledge: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/update`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
243
|
+
/**
|
|
244
|
+
* No description
|
|
245
|
+
*
|
|
246
|
+
* @tags knowledge
|
|
247
|
+
* @name UpdateKnowledgeEnableStatus
|
|
248
|
+
* @summary Update Knowledge Enable Status
|
|
249
|
+
* @request POST:/api/knowledge/update/enabled
|
|
250
|
+
*/
|
|
251
|
+
updateKnowledgeEnableStatus: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/update/enabled`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
243
252
|
/**
|
|
244
253
|
* No description
|
|
245
254
|
*
|
|
@@ -458,7 +467,7 @@ class Api extends HttpClient {
|
|
|
458
467
|
};
|
|
459
468
|
this.space = {
|
|
460
469
|
/**
|
|
461
|
-
*
|
|
470
|
+
* No description
|
|
462
471
|
*
|
|
463
472
|
* @tags space
|
|
464
473
|
* @name GetSpaceList
|
|
@@ -467,7 +476,7 @@ class Api extends HttpClient {
|
|
|
467
476
|
*/
|
|
468
477
|
getSpaceList: (data, params = {}) => this.request(Object.assign({ path: `/api/space/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
469
478
|
/**
|
|
470
|
-
*
|
|
479
|
+
* No description
|
|
471
480
|
*
|
|
472
481
|
* @tags space
|
|
473
482
|
* @name AddSpace
|
|
@@ -476,7 +485,7 @@ class Api extends HttpClient {
|
|
|
476
485
|
*/
|
|
477
486
|
addSpace: (data, params = {}) => this.request(Object.assign({ path: `/api/space/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
478
487
|
/**
|
|
479
|
-
*
|
|
488
|
+
* No description
|
|
480
489
|
*
|
|
481
490
|
* @tags space
|
|
482
491
|
* @name DeleteSpace
|
|
@@ -485,7 +494,7 @@ class Api extends HttpClient {
|
|
|
485
494
|
*/
|
|
486
495
|
deleteSpace: (spaceId, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "DELETE", format: "json" }, params)),
|
|
487
496
|
/**
|
|
488
|
-
*
|
|
497
|
+
* No description
|
|
489
498
|
*
|
|
490
499
|
* @tags space
|
|
491
500
|
* @name UpdateSpace
|
|
@@ -494,7 +503,7 @@ class Api extends HttpClient {
|
|
|
494
503
|
*/
|
|
495
504
|
updateSpace: (spaceId, data, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
496
505
|
/**
|
|
497
|
-
*
|
|
506
|
+
* No description
|
|
498
507
|
*
|
|
499
508
|
* @tags space
|
|
500
509
|
* @name GetSpaceById
|