@petercatai/whisker-client 0.1.202511191614 → 0.1.202511251305

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.
Files changed (3) hide show
  1. package/dist/api.d.ts +206 -768
  2. package/dist/api.js +18 -0
  3. package/package.json +1 -1
package/dist/api.d.ts CHANGED
@@ -138,69 +138,7 @@ export declare enum IAction {
138
138
  Value = "*"
139
139
  }
140
140
  /** APIKey */
141
- export interface IAPIKeyInput {
142
- /**
143
- * Gmt Create
144
- * creation time
145
- */
146
- gmt_create?: string | null;
147
- /**
148
- * Gmt Modified
149
- * update time
150
- */
151
- gmt_modified?: string | null;
152
- /**
153
- * Key Id
154
- * key id
155
- */
156
- key_id?: string;
157
- /**
158
- * Tenant Id
159
- * tenant id
160
- */
161
- tenant_id: string;
162
- /**
163
- * Key Name
164
- * key name
165
- * @default ""
166
- */
167
- key_name?: string;
168
- /**
169
- * Key Value
170
- * key value
171
- */
172
- key_value: string;
173
- /**
174
- * Permissions
175
- * permissions config
176
- */
177
- permissions?: IPermission[];
178
- /**
179
- * Rate Limit
180
- * rate limit per minute
181
- * @min 0
182
- * @default 0
183
- */
184
- rate_limit?: number;
185
- /**
186
- * Expires At
187
- * expire time (UTC)
188
- */
189
- expires_at?: string | null;
190
- /**
191
- * Is Active
192
- * key status
193
- * @default true
194
- */
195
- is_active?: boolean;
196
- /**
197
- * Metadata
198
- * key metadata
199
- */
200
- metadata?: Record<string, any> | null;
201
- }
202
- /** APIKey */
203
- export interface IAPIKeyOutput {
141
+ export interface IAPIKey {
204
142
  /**
205
143
  * Gmt Create
206
144
  * creation time
@@ -318,58 +256,7 @@ export interface IActiveStatusUpdate {
318
256
  * ArtifactIndex
319
257
  * whisker_artifact_index 模型
320
258
  */
321
- export interface IArtifactIndexInput {
322
- /**
323
- * Gmt Create
324
- * creation time
325
- */
326
- gmt_create?: string | null;
327
- /**
328
- * Gmt Modified
329
- * update time
330
- */
331
- gmt_modified?: string | null;
332
- /**
333
- * Ecosystem
334
- * 制品来源生态系统(pypi / npm / maven / go / php)
335
- * @maxLength 32
336
- */
337
- ecosystem: string;
338
- /**
339
- * Name
340
- * 制品名(构建产物名,如 requests / @company/sdk)
341
- * @maxLength 255
342
- */
343
- name: string;
344
- /**
345
- * Version
346
- * 版本号(可为空)
347
- */
348
- version?: string | null;
349
- /**
350
- * Space Id
351
- * 关联的 whisker_space.space_id
352
- * @maxLength 255
353
- * @pattern ^[A-Za-z0-9._@/-]{1,255}$
354
- */
355
- space_id: string;
356
- /**
357
- * Extra
358
- * 额外元数据信息,扩展用,如构建参数、标签、扫描信息等
359
- * @default {}
360
- */
361
- extra?: Record<string, any>;
362
- /**
363
- * Artifact Id
364
- * 制品索引表主键(UUID字符串)
365
- */
366
- artifact_id?: string;
367
- }
368
- /**
369
- * ArtifactIndex
370
- * whisker_artifact_index 模型
371
- */
372
- export interface IArtifactIndexOutput {
259
+ export interface IArtifactIndex {
373
260
  /**
374
261
  * Gmt Create
375
262
  * creation time
@@ -523,97 +410,82 @@ export interface IBatchQueryRequest {
523
410
  /** Knowledge Names */
524
411
  knowledge_names: string[];
525
412
  }
526
- /** Chunk */
527
- export interface IChunkInput {
528
- /**
529
- * Gmt Create
530
- * creation time
531
- */
532
- gmt_create?: string | null;
533
- /**
534
- * Gmt Modified
535
- * update time
536
- */
537
- gmt_modified?: string | null;
538
- /**
539
- * Chunk Id
540
- * chunk id
541
- */
542
- chunk_id?: string;
543
- /**
544
- * Space Id
545
- * space id
546
- */
547
- space_id: string;
548
- /**
549
- * Tenant Id
550
- * tenant id
551
- */
552
- tenant_id: string;
553
- /**
554
- * Embedding
555
- * chunk embedding
556
- */
557
- embedding?: number[] | null;
558
- /**
559
- * Context
560
- * chunk content
561
- */
562
- context: string;
563
- /**
564
- * Knowledge Id
565
- * file source info
566
- */
567
- knowledge_id: string;
568
- /**
569
- * Enabled
570
- * is chunk enabled
571
- * @default true
572
- */
573
- enabled?: boolean;
574
- /**
575
- * Embedding Model Name
576
- * name of the embedding model
577
- */
578
- embedding_model_name: string;
579
- /**
580
- * Metadata
581
- * Arbitrary metadata associated with the content.
582
- */
583
- metadata?: Record<string, any> | null;
584
- /**
585
- * Tags
586
- * Tags from knowledge.metadata._tags
587
- */
588
- tags?: string[] | null;
589
- /**
590
- * F1
591
- * Field 1 from knowledge.metadata._f1
592
- */
593
- f1?: string | null;
594
- /**
595
- * F2
596
- * Field 2 from knowledge.metadata._f2
597
- */
598
- f2?: string | null;
599
- /**
600
- * F3
601
- * Field 3 from knowledge.metadata._f3
602
- */
603
- f3?: string | null;
604
- /**
605
- * F4
606
- * Field 4 from knowledge.metadata._f4
607
- */
608
- f4?: string | null;
413
+ /**
414
+ * Blob
415
+ * Raw data abstraction for document loading and file processing.
416
+ *
417
+ * Represents raw bytes or text, either in-memory or by file reference. Used
418
+ * primarily by document loaders to decouple data loading from parsing.
419
+ *
420
+ * Inspired by [Mozilla's `Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
421
+ *
422
+ * ???+ example "Initialize a blob from in-memory data"
423
+ *
424
+ * ```python
425
+ * from langchain_core.documents import Blob
426
+ *
427
+ * blob = Blob.from_data("Hello, world!")
428
+ *
429
+ * # Read the blob as a string
430
+ * print(blob.as_string())
431
+ *
432
+ * # Read the blob as bytes
433
+ * print(blob.as_bytes())
434
+ *
435
+ * # Read the blob as a byte stream
436
+ * with blob.as_bytes_io() as f:
437
+ * print(f.read())
438
+ * ```
439
+ *
440
+ * ??? example "Load from memory and specify MIME type and metadata"
441
+ *
442
+ * ```python
443
+ * from langchain_core.documents import Blob
444
+ *
445
+ * blob = Blob.from_data(
446
+ * data="Hello, world!",
447
+ * mime_type="text/plain",
448
+ * metadata={"source": "https://example.com"},
449
+ * )
450
+ * ```
451
+ *
452
+ * ??? example "Load the blob from a file"
453
+ *
454
+ * ```python
455
+ * from langchain_core.documents import Blob
456
+ *
457
+ * blob = Blob.from_path("path/to/file.txt")
458
+ *
459
+ * # Read the blob as a string
460
+ * print(blob.as_string())
461
+ *
462
+ * # Read the blob as bytes
463
+ * print(blob.as_bytes())
464
+ *
465
+ * # Read the blob as a byte stream
466
+ * with blob.as_bytes_io() as f:
467
+ * print(f.read())
468
+ * ```
469
+ */
470
+ export interface IBlob {
471
+ /** Id */
472
+ id?: string | null;
473
+ /** Metadata */
474
+ metadata?: Record<string, any>;
475
+ /** Data */
476
+ data?: File | string | null;
477
+ /** Mimetype */
478
+ mimetype?: string | null;
609
479
  /**
610
- * F5
611
- * Field 5 from knowledge.metadata._f5
480
+ * Encoding
481
+ * @default "utf-8"
612
482
  */
613
- f5?: string | null;
483
+ encoding?: string;
484
+ /** Path */
485
+ path?: string | null;
614
486
  }
615
487
  /** Chunk */
616
- export interface IChunkOutput {
488
+ export interface IChunk {
617
489
  /**
618
490
  * Gmt Create
619
491
  * creation time
@@ -885,7 +757,7 @@ export interface IGithubRepoParseConfig {
885
757
  type?: "github_repo";
886
758
  /**
887
759
  * Include Patterns
888
- * List of include patterns (comma-separated) to filter files in the repo.Only files matching these patterns will be included, unless excluded by ignore_patterns or .gitignore. Lower priority than ignore_patterns and .gitignore.
760
+ * Whitelist patterns to specify which files to include. When set, ONLY files matching these patterns will be considered for inclusion. However, files are still subject to ignore_patterns, .gitignore (if use_gitignore=True), and default ignores (if use_default_ignore=True). When empty or None, all files not explicitly ignored are included.
889
761
  */
890
762
  include_patterns?: string[] | null;
891
763
  /**
@@ -955,6 +827,15 @@ export interface IHTTPValidationError {
955
827
  /** Detail */
956
828
  detail?: IValidationError[];
957
829
  }
830
+ /** Image */
831
+ export interface IImage {
832
+ /** Url */
833
+ url?: string | null;
834
+ /** B64 Json */
835
+ b64_json?: string | null;
836
+ /** Metadata */
837
+ metadata: Record<string, any>;
838
+ }
958
839
  /** ImageCreate */
959
840
  export interface IImageCreate {
960
841
  /**
@@ -1353,21 +1234,27 @@ export interface IMarkdownSplitConfig {
1353
1234
  * @default 150
1354
1235
  */
1355
1236
  chunk_overlap?: number;
1237
+ /**
1238
+ * Separators
1239
+ * separator list, if None, use default separators
1240
+ */
1241
+ separators?: string[] | null;
1242
+ /**
1243
+ * Split Regex
1244
+ * split_regex,if set, use it instead of separators
1245
+ */
1246
+ split_regex?: string | null;
1356
1247
  /**
1357
1248
  * Type
1358
1249
  * @default "markdown"
1359
1250
  */
1360
1251
  type?: "markdown";
1361
- /**
1362
- * Separators
1363
- * List of separators to split the text. If None, uses default separators
1364
- */
1365
- separators: string[];
1366
1252
  /**
1367
1253
  * Is Separator Regex
1368
1254
  * If true, the separators should be in regular expression format.
1255
+ * @default true
1369
1256
  */
1370
- is_separator_regex: boolean;
1257
+ is_separator_regex?: boolean;
1371
1258
  /**
1372
1259
  * Keep Separator
1373
1260
  * Whether to keep the separator and where to place it in each corresponding chunk (True='start')
@@ -1804,9 +1691,9 @@ export interface IPageQueryParamsTask {
1804
1691
  page_size?: number;
1805
1692
  }
1806
1693
  /** PageResponse[APIKey] */
1807
- export interface IPageResponseAPIKeyInput {
1694
+ export interface IPageResponseAPIKey {
1808
1695
  /** Items */
1809
- items: IAPIKeyInput[];
1696
+ items: IAPIKey[];
1810
1697
  /** Total */
1811
1698
  total: number;
1812
1699
  /** Page */
@@ -1816,10 +1703,10 @@ export interface IPageResponseAPIKeyInput {
1816
1703
  /** Total Pages */
1817
1704
  total_pages: number;
1818
1705
  }
1819
- /** PageResponse[APIKey] */
1820
- export interface IPageResponseAPIKeyOutput {
1706
+ /** PageResponse[ArtifactIndex] */
1707
+ export interface IPageResponseArtifactIndex {
1821
1708
  /** Items */
1822
- items: IAPIKeyOutput[];
1709
+ items: IArtifactIndex[];
1823
1710
  /** Total */
1824
1711
  total: number;
1825
1712
  /** Page */
@@ -1829,10 +1716,10 @@ export interface IPageResponseAPIKeyOutput {
1829
1716
  /** Total Pages */
1830
1717
  total_pages: number;
1831
1718
  }
1832
- /** PageResponse[ArtifactIndex] */
1833
- export interface IPageResponseArtifactIndexInput {
1719
+ /** PageResponse[Chunk] */
1720
+ export interface IPageResponseChunk {
1834
1721
  /** Items */
1835
- items: IArtifactIndexInput[];
1722
+ items: IChunk[];
1836
1723
  /** Total */
1837
1724
  total: number;
1838
1725
  /** Page */
@@ -1842,10 +1729,10 @@ export interface IPageResponseArtifactIndexInput {
1842
1729
  /** Total Pages */
1843
1730
  total_pages: number;
1844
1731
  }
1845
- /** PageResponse[ArtifactIndex] */
1846
- export interface IPageResponseArtifactIndexOutput {
1732
+ /** PageResponse[Knowledge] */
1733
+ export interface IPageResponseKnowledge {
1847
1734
  /** Items */
1848
- items: IArtifactIndexOutput[];
1735
+ items: IKnowledgeOutput[];
1849
1736
  /** Total */
1850
1737
  total: number;
1851
1738
  /** Page */
@@ -1855,10 +1742,10 @@ export interface IPageResponseArtifactIndexOutput {
1855
1742
  /** Total Pages */
1856
1743
  total_pages: number;
1857
1744
  }
1858
- /** PageResponse[Chunk] */
1859
- export interface IPageResponseChunkInput {
1745
+ /** PageResponse[SpaceResponse] */
1746
+ export interface IPageResponseSpaceResponse {
1860
1747
  /** Items */
1861
- items: IChunkInput[];
1748
+ items: ISpaceResponse[];
1862
1749
  /** Total */
1863
1750
  total: number;
1864
1751
  /** Page */
@@ -1868,10 +1755,10 @@ export interface IPageResponseChunkInput {
1868
1755
  /** Total Pages */
1869
1756
  total_pages: number;
1870
1757
  }
1871
- /** PageResponse[Chunk] */
1872
- export interface IPageResponseChunkOutput {
1758
+ /** PageResponse[Tag] */
1759
+ export interface IPageResponseTag {
1873
1760
  /** Items */
1874
- items: IChunkOutput[];
1761
+ items: ITag[];
1875
1762
  /** Total */
1876
1763
  total: number;
1877
1764
  /** Page */
@@ -1881,10 +1768,10 @@ export interface IPageResponseChunkOutput {
1881
1768
  /** Total Pages */
1882
1769
  total_pages: number;
1883
1770
  }
1884
- /** PageResponse[Knowledge] */
1885
- export interface IPageResponseKnowledgeInput {
1771
+ /** PageResponse[Tagging] */
1772
+ export interface IPageResponseTagging {
1886
1773
  /** Items */
1887
- items: IKnowledgeInput[];
1774
+ items: ITagging[];
1888
1775
  /** Total */
1889
1776
  total: number;
1890
1777
  /** Page */
@@ -1894,114 +1781,10 @@ export interface IPageResponseKnowledgeInput {
1894
1781
  /** Total Pages */
1895
1782
  total_pages: number;
1896
1783
  }
1897
- /** PageResponse[Knowledge] */
1898
- export interface IPageResponseKnowledgeOutput {
1784
+ /** PageResponse[Tenant] */
1785
+ export interface IPageResponseTenant {
1899
1786
  /** Items */
1900
- items: IKnowledgeOutput[];
1901
- /** Total */
1902
- total: number;
1903
- /** Page */
1904
- page: number;
1905
- /** Page Size */
1906
- page_size: number;
1907
- /** Total Pages */
1908
- total_pages: number;
1909
- }
1910
- /** PageResponse[SpaceResponse] */
1911
- export interface IPageResponseSpaceResponseInput {
1912
- /** Items */
1913
- items: ISpaceResponseInput[];
1914
- /** Total */
1915
- total: number;
1916
- /** Page */
1917
- page: number;
1918
- /** Page Size */
1919
- page_size: number;
1920
- /** Total Pages */
1921
- total_pages: number;
1922
- }
1923
- /** PageResponse[SpaceResponse] */
1924
- export interface IPageResponseSpaceResponseOutput {
1925
- /** Items */
1926
- items: ISpaceResponseOutput[];
1927
- /** Total */
1928
- total: number;
1929
- /** Page */
1930
- page: number;
1931
- /** Page Size */
1932
- page_size: number;
1933
- /** Total Pages */
1934
- total_pages: number;
1935
- }
1936
- /** PageResponse[Tag] */
1937
- export interface IPageResponseTagInput {
1938
- /** Items */
1939
- items: ITagInput[];
1940
- /** Total */
1941
- total: number;
1942
- /** Page */
1943
- page: number;
1944
- /** Page Size */
1945
- page_size: number;
1946
- /** Total Pages */
1947
- total_pages: number;
1948
- }
1949
- /** PageResponse[Tag] */
1950
- export interface IPageResponseTagOutput {
1951
- /** Items */
1952
- items: ITagOutput[];
1953
- /** Total */
1954
- total: number;
1955
- /** Page */
1956
- page: number;
1957
- /** Page Size */
1958
- page_size: number;
1959
- /** Total Pages */
1960
- total_pages: number;
1961
- }
1962
- /** PageResponse[Tagging] */
1963
- export interface IPageResponseTaggingInput {
1964
- /** Items */
1965
- items: ITaggingInput[];
1966
- /** Total */
1967
- total: number;
1968
- /** Page */
1969
- page: number;
1970
- /** Page Size */
1971
- page_size: number;
1972
- /** Total Pages */
1973
- total_pages: number;
1974
- }
1975
- /** PageResponse[Tagging] */
1976
- export interface IPageResponseTaggingOutput {
1977
- /** Items */
1978
- items: ITaggingOutput[];
1979
- /** Total */
1980
- total: number;
1981
- /** Page */
1982
- page: number;
1983
- /** Page Size */
1984
- page_size: number;
1985
- /** Total Pages */
1986
- total_pages: number;
1987
- }
1988
- /** PageResponse[Tenant] */
1989
- export interface IPageResponseTenantInput {
1990
- /** Items */
1991
- items: ITenantInput[];
1992
- /** Total */
1993
- total: number;
1994
- /** Page */
1995
- page: number;
1996
- /** Page Size */
1997
- page_size: number;
1998
- /** Total Pages */
1999
- total_pages: number;
2000
- }
2001
- /** PageResponse[Tenant] */
2002
- export interface IPageResponseTenantOutput {
2003
- /** Items */
2004
- items: ITenantOutput[];
1787
+ items: ITenant[];
2005
1788
  /** Total */
2006
1789
  total: number;
2007
1790
  /** Page */
@@ -2098,7 +1881,7 @@ export interface IResponseModel {
2098
1881
  export interface IResponseModelAPIKey {
2099
1882
  /** Success */
2100
1883
  success: boolean;
2101
- data?: IAPIKeyOutput | null;
1884
+ data?: IAPIKey | null;
2102
1885
  /** Message */
2103
1886
  message?: string | null;
2104
1887
  }
@@ -2115,7 +1898,7 @@ export interface IResponseModelAny {
2115
1898
  export interface IResponseModelArtifactIndex {
2116
1899
  /** Success */
2117
1900
  success: boolean;
2118
- data?: IArtifactIndexOutput | null;
1901
+ data?: IArtifactIndex | null;
2119
1902
  /** Message */
2120
1903
  message?: string | null;
2121
1904
  }
@@ -2123,7 +1906,7 @@ export interface IResponseModelArtifactIndex {
2123
1906
  export interface IResponseModelChunk {
2124
1907
  /** Success */
2125
1908
  success: boolean;
2126
- data?: IChunkOutput | null;
1909
+ data?: IChunk | null;
2127
1910
  /** Message */
2128
1911
  message?: string | null;
2129
1912
  }
@@ -2148,7 +1931,7 @@ export interface IResponseModelListAPIKey {
2148
1931
  /** Success */
2149
1932
  success: boolean;
2150
1933
  /** Data */
2151
- data?: IAPIKeyOutput[] | null;
1934
+ data?: IAPIKey[] | null;
2152
1935
  /** Message */
2153
1936
  message?: string | null;
2154
1937
  }
@@ -2157,7 +1940,7 @@ export interface IResponseModelListArtifactIndex {
2157
1940
  /** Success */
2158
1941
  success: boolean;
2159
1942
  /** Data */
2160
- data?: IArtifactIndexOutput[] | null;
1943
+ data?: IArtifactIndex[] | null;
2161
1944
  /** Message */
2162
1945
  message?: string | null;
2163
1946
  }
@@ -2175,7 +1958,7 @@ export interface IResponseModelListRetrievalChunk {
2175
1958
  /** Success */
2176
1959
  success: boolean;
2177
1960
  /** Data */
2178
- data?: IRetrievalChunkOutput[] | null;
1961
+ data?: IRetrievalChunk[] | null;
2179
1962
  /** Message */
2180
1963
  message?: string | null;
2181
1964
  }
@@ -2184,7 +1967,7 @@ export interface IResponseModelListTag {
2184
1967
  /** Success */
2185
1968
  success: boolean;
2186
1969
  /** Data */
2187
- data?: ITagOutput[] | null;
1970
+ data?: ITag[] | null;
2188
1971
  /** Message */
2189
1972
  message?: string | null;
2190
1973
  }
@@ -2193,7 +1976,7 @@ export interface IResponseModelListTagging {
2193
1976
  /** Success */
2194
1977
  success: boolean;
2195
1978
  /** Data */
2196
- data?: ITaggingOutput[] | null;
1979
+ data?: ITagging[] | null;
2197
1980
  /** Message */
2198
1981
  message?: string | null;
2199
1982
  }
@@ -2202,7 +1985,7 @@ export interface IResponseModelListTask {
2202
1985
  /** Success */
2203
1986
  success: boolean;
2204
1987
  /** Data */
2205
- data?: ITaskOutput[] | null;
1988
+ data?: ITask[] | null;
2206
1989
  /** Message */
2207
1990
  message?: string | null;
2208
1991
  }
@@ -2215,6 +1998,15 @@ export interface IResponseModelListTenantLog {
2215
1998
  /** Message */
2216
1999
  message?: string | null;
2217
2000
  }
2001
+ /** ResponseModel[List[Union[Text, Image, Blob]]] */
2002
+ export interface IResponseModelListUnionTextImageBlob {
2003
+ /** Success */
2004
+ success: boolean;
2005
+ /** Data */
2006
+ data?: (IText | IImage | IBlob)[] | null;
2007
+ /** Message */
2008
+ message?: string | null;
2009
+ }
2218
2010
  /** ResponseModel[List[WohuProductSpace]] */
2219
2011
  export interface IResponseModelListWohuProductSpace {
2220
2012
  /** Success */
@@ -2237,7 +2029,7 @@ export interface IResponseModelNoneType {
2237
2029
  export interface IResponseModelPageResponseAPIKey {
2238
2030
  /** Success */
2239
2031
  success: boolean;
2240
- data?: IPageResponseAPIKeyOutput | null;
2032
+ data?: IPageResponseAPIKey | null;
2241
2033
  /** Message */
2242
2034
  message?: string | null;
2243
2035
  }
@@ -2245,7 +2037,7 @@ export interface IResponseModelPageResponseAPIKey {
2245
2037
  export interface IResponseModelPageResponseArtifactIndex {
2246
2038
  /** Success */
2247
2039
  success: boolean;
2248
- data?: IPageResponseArtifactIndexOutput | null;
2040
+ data?: IPageResponseArtifactIndex | null;
2249
2041
  /** Message */
2250
2042
  message?: string | null;
2251
2043
  }
@@ -2253,7 +2045,7 @@ export interface IResponseModelPageResponseArtifactIndex {
2253
2045
  export interface IResponseModelPageResponseChunk {
2254
2046
  /** Success */
2255
2047
  success: boolean;
2256
- data?: IPageResponseChunkOutput | null;
2048
+ data?: IPageResponseChunk | null;
2257
2049
  /** Message */
2258
2050
  message?: string | null;
2259
2051
  }
@@ -2261,7 +2053,7 @@ export interface IResponseModelPageResponseChunk {
2261
2053
  export interface IResponseModelPageResponseKnowledge {
2262
2054
  /** Success */
2263
2055
  success: boolean;
2264
- data?: IPageResponseKnowledgeOutput | null;
2056
+ data?: IPageResponseKnowledge | null;
2265
2057
  /** Message */
2266
2058
  message?: string | null;
2267
2059
  }
@@ -2269,7 +2061,7 @@ export interface IResponseModelPageResponseKnowledge {
2269
2061
  export interface IResponseModelPageResponseSpaceResponse {
2270
2062
  /** Success */
2271
2063
  success: boolean;
2272
- data?: IPageResponseSpaceResponseOutput | null;
2064
+ data?: IPageResponseSpaceResponse | null;
2273
2065
  /** Message */
2274
2066
  message?: string | null;
2275
2067
  }
@@ -2277,7 +2069,7 @@ export interface IResponseModelPageResponseSpaceResponse {
2277
2069
  export interface IResponseModelPageResponseTag {
2278
2070
  /** Success */
2279
2071
  success: boolean;
2280
- data?: IPageResponseTagOutput | null;
2072
+ data?: IPageResponseTag | null;
2281
2073
  /** Message */
2282
2074
  message?: string | null;
2283
2075
  }
@@ -2285,7 +2077,7 @@ export interface IResponseModelPageResponseTag {
2285
2077
  export interface IResponseModelPageResponseTagging {
2286
2078
  /** Success */
2287
2079
  success: boolean;
2288
- data?: IPageResponseTaggingOutput | null;
2080
+ data?: IPageResponseTagging | null;
2289
2081
  /** Message */
2290
2082
  message?: string | null;
2291
2083
  }
@@ -2293,7 +2085,7 @@ export interface IResponseModelPageResponseTagging {
2293
2085
  export interface IResponseModelPageResponseTenant {
2294
2086
  /** Success */
2295
2087
  success: boolean;
2296
- data?: IPageResponseTenantOutput | null;
2088
+ data?: IPageResponseTenant | null;
2297
2089
  /** Message */
2298
2090
  message?: string | null;
2299
2091
  }
@@ -2301,7 +2093,7 @@ export interface IResponseModelPageResponseTenant {
2301
2093
  export interface IResponseModelSpaceResponse {
2302
2094
  /** Success */
2303
2095
  success: boolean;
2304
- data?: ISpaceResponseOutput | null;
2096
+ data?: ISpaceResponse | null;
2305
2097
  /** Message */
2306
2098
  message?: string | null;
2307
2099
  }
@@ -2309,7 +2101,7 @@ export interface IResponseModelSpaceResponse {
2309
2101
  export interface IResponseModelStatusStatisticsPageResponseTask {
2310
2102
  /** Success */
2311
2103
  success: boolean;
2312
- data?: IStatusStatisticsPageResponseTaskOutput | null;
2104
+ data?: IStatusStatisticsPageResponseTask | null;
2313
2105
  /** Message */
2314
2106
  message?: string | null;
2315
2107
  }
@@ -2317,7 +2109,7 @@ export interface IResponseModelStatusStatisticsPageResponseTask {
2317
2109
  export interface IResponseModelTag {
2318
2110
  /** Success */
2319
2111
  success: boolean;
2320
- data?: ITagOutput | null;
2112
+ data?: ITag | null;
2321
2113
  /** Message */
2322
2114
  message?: string | null;
2323
2115
  }
@@ -2325,7 +2117,7 @@ export interface IResponseModelTag {
2325
2117
  export interface IResponseModelTask {
2326
2118
  /** Success */
2327
2119
  success: boolean;
2328
- data?: ITaskOutput | null;
2120
+ data?: ITask | null;
2329
2121
  /** Message */
2330
2122
  message?: string | null;
2331
2123
  }
@@ -2333,7 +2125,7 @@ export interface IResponseModelTask {
2333
2125
  export interface IResponseModelTenant {
2334
2126
  /** Success */
2335
2127
  success: boolean;
2336
- data?: ITenantOutput | null;
2128
+ data?: ITenant | null;
2337
2129
  /** Message */
2338
2130
  message?: string | null;
2339
2131
  }
@@ -2434,101 +2226,7 @@ export interface IRetrievalBySpaceRequest {
2434
2226
  space_id_list: string[];
2435
2227
  }
2436
2228
  /** RetrievalChunk */
2437
- export interface IRetrievalChunkInput {
2438
- /**
2439
- * Gmt Create
2440
- * creation time
2441
- */
2442
- gmt_create?: string | null;
2443
- /**
2444
- * Gmt Modified
2445
- * update time
2446
- */
2447
- gmt_modified?: string | null;
2448
- /**
2449
- * Chunk Id
2450
- * chunk id
2451
- */
2452
- chunk_id?: string;
2453
- /**
2454
- * Space Id
2455
- * space id
2456
- */
2457
- space_id: string;
2458
- /**
2459
- * Tenant Id
2460
- * tenant id
2461
- */
2462
- tenant_id: string;
2463
- /**
2464
- * Embedding
2465
- * chunk embedding
2466
- */
2467
- embedding?: number[] | null;
2468
- /**
2469
- * Context
2470
- * chunk content
2471
- */
2472
- context: string;
2473
- /**
2474
- * Knowledge Id
2475
- * file source info
2476
- */
2477
- knowledge_id: string;
2478
- /**
2479
- * Enabled
2480
- * is chunk enabled
2481
- * @default true
2482
- */
2483
- enabled?: boolean;
2484
- /**
2485
- * Embedding Model Name
2486
- * name of the embedding model
2487
- */
2488
- embedding_model_name: string;
2489
- /**
2490
- * Metadata
2491
- * Arbitrary metadata associated with the content.
2492
- */
2493
- metadata?: Record<string, any> | null;
2494
- /**
2495
- * Tags
2496
- * Tags from knowledge.metadata._tags
2497
- */
2498
- tags?: string[] | null;
2499
- /**
2500
- * F1
2501
- * Field 1 from knowledge.metadata._f1
2502
- */
2503
- f1?: string | null;
2504
- /**
2505
- * F2
2506
- * Field 2 from knowledge.metadata._f2
2507
- */
2508
- f2?: string | null;
2509
- /**
2510
- * F3
2511
- * Field 3 from knowledge.metadata._f3
2512
- */
2513
- f3?: string | null;
2514
- /**
2515
- * F4
2516
- * Field 4 from knowledge.metadata._f4
2517
- */
2518
- f4?: string | null;
2519
- /**
2520
- * F5
2521
- * Field 5 from knowledge.metadata._f5
2522
- */
2523
- f5?: string | null;
2524
- /**
2525
- * Similarity
2526
- * The similarity of the chunk, ranging from 0.0 to 1.0.
2527
- */
2528
- similarity: number;
2529
- }
2530
- /** RetrievalChunk */
2531
- export interface IRetrievalChunkOutput {
2229
+ export interface IRetrievalChunk {
2532
2230
  /**
2533
2231
  * Gmt Create
2534
2232
  * creation time
@@ -2725,67 +2423,7 @@ export interface ISpaceCreate {
2725
2423
  * total_size Optional[int]: size of the all kowledge in this space.
2726
2424
  * knowledge_size Optional[int]: count of the knowledge in this space.
2727
2425
  */
2728
- export interface ISpaceResponseInput {
2729
- /**
2730
- * Gmt Create
2731
- * creation time
2732
- */
2733
- gmt_create?: string | null;
2734
- /**
2735
- * Gmt Modified
2736
- * update time
2737
- */
2738
- gmt_modified?: string | null;
2739
- /**
2740
- * Space Name
2741
- * name of the space resource
2742
- * @maxLength 64
2743
- */
2744
- space_name: string;
2745
- /**
2746
- * Space Id
2747
- * space id
2748
- */
2749
- space_id?: string;
2750
- /**
2751
- * Description
2752
- * descrition of the space
2753
- * @maxLength 255
2754
- */
2755
- description: string;
2756
- /**
2757
- * Metadata
2758
- * metadata of the space resource
2759
- * @default {}
2760
- */
2761
- metadata?: Record<string, any>;
2762
- /**
2763
- * Tenant Id
2764
- * tenant id
2765
- */
2766
- tenant_id: string;
2767
- /**
2768
- * Storage Size
2769
- * size of the all kowledge in this space
2770
- * @default 0
2771
- */
2772
- storage_size?: number | null;
2773
- /**
2774
- * Knowledge Count
2775
- * count of the knowledge in this space
2776
- * @default 0
2777
- */
2778
- knowledge_count?: number | null;
2779
- }
2780
- /**
2781
- * SpaceResponse
2782
- * SpaceResponse model class that extends Space.
2783
- * Attributes:
2784
- * (str): Space ID.
2785
- * total_size Optional[int]: size of the all kowledge in this space.
2786
- * knowledge_size Optional[int]: count of the knowledge in this space.
2787
- */
2788
- export interface ISpaceResponseOutput {
2426
+ export interface ISpaceResponse {
2789
2427
  /**
2790
2428
  * Gmt Create
2791
2429
  * creation time
@@ -2866,57 +2504,9 @@ export interface ISpaceUpdate {
2866
2504
  metadata?: Record<string, any> | null;
2867
2505
  }
2868
2506
  /** StatusStatisticsPageResponse[Task] */
2869
- export interface IStatusStatisticsPageResponseTaskInput {
2870
- /** Items */
2871
- items: ITaskInput[];
2872
- /** Total */
2873
- total: number;
2874
- /** Page */
2875
- page: number;
2876
- /** Page Size */
2877
- page_size: number;
2878
- /** Total Pages */
2879
- total_pages: number;
2880
- /**
2881
- * Success
2882
- * @default 0
2883
- */
2884
- success?: number;
2885
- /**
2886
- * Failed
2887
- * @default 0
2888
- */
2889
- failed?: number;
2890
- /**
2891
- * Cancelled
2892
- * @default 0
2893
- */
2894
- cancelled?: number;
2895
- /**
2896
- * Pending
2897
- * @default 0
2898
- */
2899
- pending?: number;
2900
- /**
2901
- * Running
2902
- * @default 0
2903
- */
2904
- running?: number;
2905
- /**
2906
- * Pending Retry
2907
- * @default 0
2908
- */
2909
- pending_retry?: number;
2910
- /**
2911
- * Deleted
2912
- * @default 0
2913
- */
2914
- deleted?: number;
2915
- }
2916
- /** StatusStatisticsPageResponse[Task] */
2917
- export interface IStatusStatisticsPageResponseTaskOutput {
2507
+ export interface IStatusStatisticsPageResponseTask {
2918
2508
  /** Items */
2919
- items: ITaskOutput[];
2509
+ items: ITask[];
2920
2510
  /** Total */
2921
2511
  total: number;
2922
2512
  /** Page */
@@ -2962,47 +2552,7 @@ export interface IStatusStatisticsPageResponseTaskOutput {
2962
2552
  deleted?: number;
2963
2553
  }
2964
2554
  /** Tag */
2965
- export interface ITagInput {
2966
- /**
2967
- * Gmt Create
2968
- * creation time
2969
- */
2970
- gmt_create?: string | null;
2971
- /**
2972
- * Gmt Modified
2973
- * update time
2974
- */
2975
- gmt_modified?: string | null;
2976
- /**
2977
- * Name
2978
- * 标签名称(租户内唯一)
2979
- * @maxLength 64
2980
- */
2981
- name: string;
2982
- /**
2983
- * Description
2984
- * 标签描述
2985
- */
2986
- description?: string | null;
2987
- /**
2988
- * 标签作用对象类型(如 "space")
2989
- * @default "space"
2990
- */
2991
- object_type?: ITagObjectType;
2992
- /**
2993
- * Tag Id
2994
- * 标签ID(UUID字符串)
2995
- */
2996
- tag_id?: string;
2997
- /**
2998
- * Tenant Id
2999
- * 所属租户ID
3000
- * @maxLength 64
3001
- */
3002
- tenant_id: string;
3003
- }
3004
- /** Tag */
3005
- export interface ITagOutput {
2555
+ export interface ITag {
3006
2556
  /**
3007
2557
  * Gmt Create
3008
2558
  * creation time
@@ -3079,54 +2629,7 @@ export interface ITagUpdate {
3079
2629
  description?: string | null;
3080
2630
  }
3081
2631
  /** Tagging */
3082
- export interface ITaggingInput {
3083
- /**
3084
- * Gmt Create
3085
- * creation time
3086
- */
3087
- gmt_create?: string | null;
3088
- /**
3089
- * Gmt Modified
3090
- * update time
3091
- */
3092
- gmt_modified?: string | null;
3093
- /**
3094
- * Tagging Id
3095
- * 标签绑定ID(UUID字符串)
3096
- */
3097
- tagging_id?: string;
3098
- /**
3099
- * Tenant Id
3100
- * 所属租户ID
3101
- * @maxLength 64
3102
- */
3103
- tenant_id: string;
3104
- /**
3105
- * Tag Id
3106
- * 标签ID(FK -> tag.tag_id,UUID字符串)
3107
- */
3108
- tag_id: string;
3109
- /**
3110
- * Tag Name
3111
- * 标签名称(在 object_type 内唯一)
3112
- * @maxLength 64
3113
- */
3114
- tag_name: string;
3115
- /**
3116
- * Object Id
3117
- * 被打标签对象ID(如 space_id)
3118
- * @maxLength 255
3119
- */
3120
- object_id: string;
3121
- /**
3122
- * 对象类型,当前仅支持 "space"
3123
- * @maxLength 32
3124
- * @default "space"
3125
- */
3126
- object_type?: ITagObjectType;
3127
- }
3128
- /** Tagging */
3129
- export interface ITaggingOutput {
2632
+ export interface ITagging {
3130
2633
  /**
3131
2634
  * Gmt Create
3132
2635
  * creation time
@@ -3193,66 +2696,7 @@ export interface ITaggingCreate {
3193
2696
  object_id: string;
3194
2697
  }
3195
2698
  /** Task */
3196
- export interface ITaskInput {
3197
- /**
3198
- * Gmt Create
3199
- * creation time
3200
- */
3201
- gmt_create?: string | null;
3202
- /**
3203
- * Gmt Modified
3204
- * update time
3205
- */
3206
- gmt_modified?: string | null;
3207
- /**
3208
- * Task Id
3209
- * Unique identifier for the task
3210
- */
3211
- task_id?: string;
3212
- /**
3213
- * Current status of the task
3214
- * @default "pending"
3215
- */
3216
- status?: ITaskStatus;
3217
- /**
3218
- * Knowledge Id
3219
- * Identifier for the source file
3220
- */
3221
- knowledge_id: string;
3222
- /**
3223
- * Metadata
3224
- * Metadata for the task
3225
- */
3226
- metadata?: Record<string, any> | null;
3227
- /**
3228
- * Error Message
3229
- * Error message (only present if the task failed)
3230
- */
3231
- error_message?: string | null;
3232
- /**
3233
- * Space Id
3234
- * Identifier for the space
3235
- */
3236
- space_id: string;
3237
- /**
3238
- * User Id
3239
- * Identifier for the user
3240
- */
3241
- user_id?: string | null;
3242
- /**
3243
- * Tenant Id
3244
- * Identifier for the tenant
3245
- */
3246
- tenant_id: string;
3247
- /**
3248
- * Task Type
3249
- * Type of the task
3250
- * @default "knowledge_chunk"
3251
- */
3252
- task_type?: string;
3253
- }
3254
- /** Task */
3255
- export interface ITaskOutput {
2699
+ export interface ITask {
3256
2700
  /**
3257
2701
  * Gmt Create
3258
2702
  * creation time
@@ -3319,7 +2763,7 @@ export interface ITaskRestartRequest {
3319
2763
  task_id_list: string[];
3320
2764
  }
3321
2765
  /** Tenant */
3322
- export interface ITenantInput {
2766
+ export interface ITenant {
3323
2767
  /**
3324
2768
  * Gmt Create
3325
2769
  * creation time
@@ -3364,51 +2808,10 @@ export interface ITenantInput {
3364
2808
  */
3365
2809
  metadata?: Record<string, any> | null;
3366
2810
  }
3367
- /** Tenant */
3368
- export interface ITenantOutput {
3369
- /**
3370
- * Gmt Create
3371
- * creation time
3372
- */
3373
- gmt_create?: string | null;
3374
- /**
3375
- * Gmt Modified
3376
- * update time
3377
- */
3378
- gmt_modified?: string | null;
3379
- /**
3380
- * Tenant Id
3381
- * tenant id
3382
- */
3383
- tenant_id?: string;
3384
- /**
3385
- * Tenant Name
3386
- * tenant name
3387
- * @default ""
3388
- */
3389
- tenant_name?: string;
3390
- /**
3391
- * Email
3392
- * email
3393
- */
3394
- email: string;
3395
- /**
3396
- * Secret Key
3397
- * secret_key
3398
- * @default ""
3399
- */
3400
- secret_key?: string;
3401
- /**
3402
- * Is Active
3403
- * is active
3404
- * @default true
3405
- */
3406
- is_active?: boolean;
3407
- /**
3408
- * Metadata
3409
- * Metadata for the tenant
3410
- */
3411
- metadata?: Record<string, any> | null;
2811
+ /** TenantBindWohu */
2812
+ export interface ITenantBindWohu {
2813
+ /** Wohu Product Space Id */
2814
+ wohu_product_space_id: string;
3412
2815
  }
3413
2816
  /** TenantCreate */
3414
2817
  export interface ITenantCreate {
@@ -3444,6 +2847,13 @@ export interface ITenantUpdate {
3444
2847
  /** Metadata */
3445
2848
  metadata?: Record<string, any> | null;
3446
2849
  }
2850
+ /** Text */
2851
+ export interface IText {
2852
+ /** Content */
2853
+ content: string;
2854
+ /** Metadata */
2855
+ metadata: Record<string, any>;
2856
+ }
3447
2857
  /** TextCreate */
3448
2858
  export interface ITextCreate {
3449
2859
  /**
@@ -3531,9 +2941,9 @@ export interface ITextSplitConfig {
3531
2941
  chunk_overlap?: number;
3532
2942
  /**
3533
2943
  * Separators
3534
- * List of separators to split the text. If None, uses default separators
2944
+ * separator list, if None, use default separators
3535
2945
  */
3536
- separators: string[];
2946
+ separators?: string[] | null;
3537
2947
  /**
3538
2948
  * Split Regex
3539
2949
  * split_regex,if set, use it instead of separators
@@ -3547,8 +2957,9 @@ export interface ITextSplitConfig {
3547
2957
  /**
3548
2958
  * Is Separator Regex
3549
2959
  * If true, the separators should be in regular expression format.
2960
+ * @default false
3550
2961
  */
3551
- is_separator_regex: boolean;
2962
+ is_separator_regex?: boolean;
3552
2963
  /**
3553
2964
  * Keep Separator
3554
2965
  * Whether to keep the separator and where to place it in each corresponding chunk (True='start')
@@ -3719,21 +3130,27 @@ export interface IYuqueSplitConfig {
3719
3130
  * @default 150
3720
3131
  */
3721
3132
  chunk_overlap?: number;
3133
+ /**
3134
+ * Separators
3135
+ * separator list, if None, use default separators
3136
+ */
3137
+ separators?: string[] | null;
3138
+ /**
3139
+ * Split Regex
3140
+ * split_regex,if set, use it instead of separators
3141
+ */
3142
+ split_regex?: string | null;
3722
3143
  /**
3723
3144
  * Type
3724
3145
  * @default "yuquedoc"
3725
3146
  */
3726
3147
  type?: "yuquedoc";
3727
- /**
3728
- * Separators
3729
- * List of separators to split the text. If None, uses default separators
3730
- */
3731
- separators: string[];
3732
3148
  /**
3733
3149
  * Is Separator Regex
3734
3150
  * If true, the separators should be in regular expression format.
3151
+ * @default true
3735
3152
  */
3736
- is_separator_regex: boolean;
3153
+ is_separator_regex?: boolean;
3737
3154
  }
3738
3155
  export type QueryParamsType = Record<string | number, any>;
3739
3156
  export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
@@ -3903,6 +3320,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3903
3320
  * @request POST:/api/knowledge/batch_query_by_names
3904
3321
  */
3905
3322
  batchQueryKnowledgeByNames: (data: IBatchQueryRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListKnowledge, void | IHTTPValidationError>>;
3323
+ /**
3324
+ * @description 根据知识ID获取知识原文内容 通过对应的Loader加载知识的原始内容。 不同类型的知识会返回不同类型的内容(文本、图片等)。 Args: knowledge_id: 知识ID Returns: 知识原文内容列表(可能包含Text、Image或Blob类型)
3325
+ *
3326
+ * @tags knowledge
3327
+ * @name GetKnowledgeOriginalContent
3328
+ * @summary Get Knowledge Original Content
3329
+ * @request GET:/api/knowledge/original_content
3330
+ */
3331
+ getKnowledgeOriginalContent: (query: {
3332
+ /** Knowledge Id */
3333
+ knowledge_id: string;
3334
+ }, params?: RequestParams) => Promise<HttpResponse<IResponseModelListUnionTextImageBlob, void | IHTTPValidationError>>;
3906
3335
  };
3907
3336
  retrieval: {
3908
3337
  /**
@@ -4108,6 +3537,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4108
3537
  * @request GET:/api/tenant/me
4109
3538
  */
4110
3539
  getTenant: (params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
3540
+ /**
3541
+ * @description 绑定 Wohu 相关信息 在租户 metadata 中添加 _wohu_product_space_id 字段
3542
+ *
3543
+ * @tags tenant
3544
+ * @name BindWohuInfo
3545
+ * @summary Bind Wohu Info
3546
+ * @request POST:/api/tenant/bind-wohu-info
3547
+ */
3548
+ bindWohuInfo: (data: ITenantBindWohu, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
4111
3549
  };
4112
3550
  space: {
4113
3551
  /**
package/dist/api.js CHANGED
@@ -413,6 +413,15 @@ class Api extends HttpClient {
413
413
  * @request POST:/api/knowledge/batch_query_by_names
414
414
  */
415
415
  batchQueryKnowledgeByNames: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/batch_query_by_names`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
416
+ /**
417
+ * @description 根据知识ID获取知识原文内容 通过对应的Loader加载知识的原始内容。 不同类型的知识会返回不同类型的内容(文本、图片等)。 Args: knowledge_id: 知识ID Returns: 知识原文内容列表(可能包含Text、Image或Blob类型)
418
+ *
419
+ * @tags knowledge
420
+ * @name GetKnowledgeOriginalContent
421
+ * @summary Get Knowledge Original Content
422
+ * @request GET:/api/knowledge/original_content
423
+ */
424
+ getKnowledgeOriginalContent: (query, params = {}) => this.request(Object.assign({ path: `/api/knowledge/original_content`, method: "GET", query: query, format: "json" }, params)),
416
425
  };
417
426
  this.retrieval = {
418
427
  /**
@@ -601,6 +610,15 @@ class Api extends HttpClient {
601
610
  * @request GET:/api/tenant/me
602
611
  */
603
612
  getTenant: (params = {}) => this.request(Object.assign({ path: `/api/tenant/me`, method: "GET", format: "json" }, params)),
613
+ /**
614
+ * @description 绑定 Wohu 相关信息 在租户 metadata 中添加 _wohu_product_space_id 字段
615
+ *
616
+ * @tags tenant
617
+ * @name BindWohuInfo
618
+ * @summary Bind Wohu Info
619
+ * @request POST:/api/tenant/bind-wohu-info
620
+ */
621
+ bindWohuInfo: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/bind-wohu-info`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
604
622
  };
605
623
  this.space = {
606
624
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.1.202511191614",
3
+ "version": "0.1.202511251305",
4
4
  "description": "Generated API client (Production)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",