@petercatai/whisker-client 0.1.202505071127 → 0.1.202505101149
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 +69 -24
- package/dist/api.js +14 -6
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ export declare enum IKnowledgeTypeEnum {
|
|
|
21
21
|
Pdf = "pdf",
|
|
22
22
|
Qa = "qa",
|
|
23
23
|
Yuquedoc = "yuquedoc",
|
|
24
|
-
OpenapiApp = "openapi_app",
|
|
25
24
|
Folder = "folder"
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
@@ -130,8 +129,6 @@ export interface IChunk {
|
|
|
130
129
|
}
|
|
131
130
|
/** ChunkSave */
|
|
132
131
|
export interface IChunkSave {
|
|
133
|
-
/** Chunk Id */
|
|
134
|
-
chunk_id?: string | null;
|
|
135
132
|
/** Space Id */
|
|
136
133
|
space_id: string;
|
|
137
134
|
/** Context */
|
|
@@ -143,6 +140,17 @@ export interface IChunkSave {
|
|
|
143
140
|
/** Metadata */
|
|
144
141
|
metadata?: Record<string, any> | null;
|
|
145
142
|
}
|
|
143
|
+
/** ChunkUpdate */
|
|
144
|
+
export interface IChunkUpdate {
|
|
145
|
+
/** Chunk Id */
|
|
146
|
+
chunk_id?: string;
|
|
147
|
+
/** Context */
|
|
148
|
+
context?: string | null;
|
|
149
|
+
/** Embedding Model Name */
|
|
150
|
+
embedding_model_name: string;
|
|
151
|
+
/** Metadata */
|
|
152
|
+
metadata?: Record<string, any> | null;
|
|
153
|
+
}
|
|
146
154
|
/**
|
|
147
155
|
* GeaGraphSplitConfig
|
|
148
156
|
* JSON document split configuration
|
|
@@ -155,10 +163,10 @@ export interface IGeaGraphSplitConfig {
|
|
|
155
163
|
*/
|
|
156
164
|
type?: "geagraph";
|
|
157
165
|
/**
|
|
158
|
-
*
|
|
159
|
-
* The
|
|
166
|
+
* Kisid
|
|
167
|
+
* The Kis platform business id
|
|
160
168
|
*/
|
|
161
|
-
|
|
169
|
+
kisId?: number | null;
|
|
162
170
|
}
|
|
163
171
|
/** GithubFileSourceConfig */
|
|
164
172
|
export interface IGithubFileSourceConfig {
|
|
@@ -426,7 +434,7 @@ export interface IKnowledgeInput {
|
|
|
426
434
|
* Source Config
|
|
427
435
|
* source config of the knowledge
|
|
428
436
|
*/
|
|
429
|
-
source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig;
|
|
437
|
+
source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig;
|
|
430
438
|
/**
|
|
431
439
|
* Embedding Model Name
|
|
432
440
|
* name of the embedding model. you can set any other model if target embedding service registered
|
|
@@ -513,7 +521,7 @@ export interface IKnowledgeOutput {
|
|
|
513
521
|
* Source Config
|
|
514
522
|
* source config of the knowledge
|
|
515
523
|
*/
|
|
516
|
-
source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig;
|
|
524
|
+
source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig;
|
|
517
525
|
/**
|
|
518
526
|
* Embedding Model Name
|
|
519
527
|
* name of the embedding model. you can set any other model if target embedding service registered
|
|
@@ -608,7 +616,7 @@ export interface IKnowledgeCreate {
|
|
|
608
616
|
* Source Config
|
|
609
617
|
* source config of the knowledge
|
|
610
618
|
*/
|
|
611
|
-
source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | ITextSourceConfig;
|
|
619
|
+
source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig;
|
|
612
620
|
/**
|
|
613
621
|
* Embedding Model Name
|
|
614
622
|
* name of the embedding model. you can set any other model if target embedding service registered
|
|
@@ -717,10 +725,9 @@ export interface IMarkdownSplitConfig {
|
|
|
717
725
|
chunk_overlap?: number;
|
|
718
726
|
/**
|
|
719
727
|
* Separators
|
|
720
|
-
*
|
|
721
|
-
* @default ["\n\n"]
|
|
728
|
+
* separator list, if None, use default separators
|
|
722
729
|
*/
|
|
723
|
-
separators?: string[];
|
|
730
|
+
separators?: string[] | null;
|
|
724
731
|
/**
|
|
725
732
|
* Split Regex
|
|
726
733
|
* split_regex,if set, use it instead of separators
|
|
@@ -1104,8 +1111,8 @@ export interface IQACreate {
|
|
|
1104
1111
|
/** source config of the knowledge */
|
|
1105
1112
|
source_config?: ITextSourceConfig | null;
|
|
1106
1113
|
}
|
|
1107
|
-
/**
|
|
1108
|
-
export interface
|
|
1114
|
+
/** QueryByDeepRetrieval */
|
|
1115
|
+
export interface IQueryByDeepRetrieval {
|
|
1109
1116
|
/**
|
|
1110
1117
|
* Embedding Model Name
|
|
1111
1118
|
* The name of the embedding model
|
|
@@ -1134,8 +1141,8 @@ export interface IQueryByDeepSearch {
|
|
|
1134
1141
|
metadata_filter?: Record<string, any>;
|
|
1135
1142
|
/**
|
|
1136
1143
|
* Type
|
|
1137
|
-
* The type of the request, should be '
|
|
1138
|
-
* @default "
|
|
1144
|
+
* The type of the request, should be 'deep_retrieval'.
|
|
1145
|
+
* @default "deep_retrieval"
|
|
1139
1146
|
*/
|
|
1140
1147
|
type?: string;
|
|
1141
1148
|
/**
|
|
@@ -1505,7 +1512,7 @@ export interface IRetrievalRequest {
|
|
|
1505
1512
|
* Config
|
|
1506
1513
|
* The configuration for the retrieval request
|
|
1507
1514
|
*/
|
|
1508
|
-
config: IQueryBySpaceConfig | IQueryByKnowledgeConfig |
|
|
1515
|
+
config: IQueryBySpaceConfig | IQueryByKnowledgeConfig | IQueryByDeepRetrieval | Record<string, any>;
|
|
1509
1516
|
}
|
|
1510
1517
|
/** S3SourceConfig */
|
|
1511
1518
|
export interface IS3SourceConfig {
|
|
@@ -1873,9 +1880,9 @@ export interface ITextSplitConfig {
|
|
|
1873
1880
|
/**
|
|
1874
1881
|
* Separators
|
|
1875
1882
|
* List of separators to split the text. If None, uses default separators
|
|
1876
|
-
* @default ["\n\n"]
|
|
1883
|
+
* @default ["\n","\n\n","\r"]
|
|
1877
1884
|
*/
|
|
1878
|
-
separators?: string[]
|
|
1885
|
+
separators?: string[];
|
|
1879
1886
|
/**
|
|
1880
1887
|
* Split Regex
|
|
1881
1888
|
* split_regex,if set, use it instead of separators
|
|
@@ -1908,6 +1915,35 @@ export interface IValidationError {
|
|
|
1908
1915
|
/** Error Type */
|
|
1909
1916
|
type: string;
|
|
1910
1917
|
}
|
|
1918
|
+
/** YuqueSourceConfig */
|
|
1919
|
+
export interface IYuqueSourceConfig {
|
|
1920
|
+
/**
|
|
1921
|
+
* Api Url
|
|
1922
|
+
* the yuque api url
|
|
1923
|
+
* @default "https://www.yuque.com"
|
|
1924
|
+
*/
|
|
1925
|
+
api_url?: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* Group Id
|
|
1928
|
+
* the yuque group id
|
|
1929
|
+
*/
|
|
1930
|
+
group_id: number;
|
|
1931
|
+
/**
|
|
1932
|
+
* Book Id
|
|
1933
|
+
* the yuque book id, if not set, will use the group all book
|
|
1934
|
+
*/
|
|
1935
|
+
book_id?: number | null;
|
|
1936
|
+
/**
|
|
1937
|
+
* Document Id
|
|
1938
|
+
* the yuque document id in book, if not set, will use the book id as document id
|
|
1939
|
+
*/
|
|
1940
|
+
document_id?: number | null;
|
|
1941
|
+
/**
|
|
1942
|
+
* Auth Info
|
|
1943
|
+
* authentication information
|
|
1944
|
+
*/
|
|
1945
|
+
auth_info: string;
|
|
1946
|
+
}
|
|
1911
1947
|
export type QueryParamsType = Record<string | number, any>;
|
|
1912
1948
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
1913
1949
|
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|
@@ -1968,7 +2004,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1968
2004
|
}
|
|
1969
2005
|
/**
|
|
1970
2006
|
* @title whisker rag server
|
|
1971
|
-
* @version 1.0.
|
|
2007
|
+
* @version 1.0.5
|
|
1972
2008
|
*/
|
|
1973
2009
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
1974
2010
|
/**
|
|
@@ -2155,11 +2191,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2155
2191
|
* No description
|
|
2156
2192
|
*
|
|
2157
2193
|
* @tags chunk
|
|
2158
|
-
* @name
|
|
2159
|
-
* @summary
|
|
2160
|
-
* @request POST:/api/chunk/
|
|
2194
|
+
* @name AddChunk
|
|
2195
|
+
* @summary Add Chunk
|
|
2196
|
+
* @request POST:/api/chunk/add
|
|
2197
|
+
*/
|
|
2198
|
+
addChunk: (data: IChunkSave, params?: RequestParams) => Promise<HttpResponse<IResponseModelChunk, void | IHTTPValidationError>>;
|
|
2199
|
+
/**
|
|
2200
|
+
* No description
|
|
2201
|
+
*
|
|
2202
|
+
* @tags chunk
|
|
2203
|
+
* @name UpdateChunk
|
|
2204
|
+
* @summary Update Chunk
|
|
2205
|
+
* @request POST:/api/chunk/update
|
|
2161
2206
|
*/
|
|
2162
|
-
|
|
2207
|
+
updateChunk: (data: IChunkUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelChunk, void | IHTTPValidationError>>;
|
|
2163
2208
|
};
|
|
2164
2209
|
tenant: {
|
|
2165
2210
|
/**
|
package/dist/api.js
CHANGED
|
@@ -48,7 +48,6 @@ var IKnowledgeTypeEnum;
|
|
|
48
48
|
IKnowledgeTypeEnum["Pdf"] = "pdf";
|
|
49
49
|
IKnowledgeTypeEnum["Qa"] = "qa";
|
|
50
50
|
IKnowledgeTypeEnum["Yuquedoc"] = "yuquedoc";
|
|
51
|
-
IKnowledgeTypeEnum["OpenapiApp"] = "openapi_app";
|
|
52
51
|
IKnowledgeTypeEnum["Folder"] = "folder";
|
|
53
52
|
})(IKnowledgeTypeEnum || (exports.IKnowledgeTypeEnum = IKnowledgeTypeEnum = {}));
|
|
54
53
|
/**
|
|
@@ -210,7 +209,7 @@ class HttpClient {
|
|
|
210
209
|
exports.HttpClient = HttpClient;
|
|
211
210
|
/**
|
|
212
211
|
* @title whisker rag server
|
|
213
|
-
* @version 1.0.
|
|
212
|
+
* @version 1.0.5
|
|
214
213
|
*/
|
|
215
214
|
class Api extends HttpClient {
|
|
216
215
|
constructor() {
|
|
@@ -387,11 +386,20 @@ class Api extends HttpClient {
|
|
|
387
386
|
* No description
|
|
388
387
|
*
|
|
389
388
|
* @tags chunk
|
|
390
|
-
* @name
|
|
391
|
-
* @summary
|
|
392
|
-
* @request POST:/api/chunk/
|
|
389
|
+
* @name AddChunk
|
|
390
|
+
* @summary Add Chunk
|
|
391
|
+
* @request POST:/api/chunk/add
|
|
393
392
|
*/
|
|
394
|
-
|
|
393
|
+
addChunk: (data, params = {}) => this.request(Object.assign({ path: `/api/chunk/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
394
|
+
/**
|
|
395
|
+
* No description
|
|
396
|
+
*
|
|
397
|
+
* @tags chunk
|
|
398
|
+
* @name UpdateChunk
|
|
399
|
+
* @summary Update Chunk
|
|
400
|
+
* @request POST:/api/chunk/update
|
|
401
|
+
*/
|
|
402
|
+
updateChunk: (data, params = {}) => this.request(Object.assign({ path: `/api/chunk/update`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
395
403
|
};
|
|
396
404
|
this.tenant = {
|
|
397
405
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petercatai/whisker-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.202505101149",
|
|
4
4
|
"description": "Generated API client (Production)",
|
|
5
5
|
"main": "dist/api.js",
|
|
6
6
|
"types": "dist/api.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tag": "latest"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/node": "^22.15.
|
|
19
|
+
"@types/node": "^22.15.17",
|
|
20
20
|
"axios": "^1.9.0",
|
|
21
21
|
"typescript": "^5.8.3"
|
|
22
22
|
}
|