@orq-ai/node 3.13.8 → 3.13.9
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/bin/mcp-server.js +215 -229
- package/bin/mcp-server.js.map +44 -44
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/deployments.d.ts +0 -6
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +0 -2
- package/models/components/deployments.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.d.ts +0 -6
- package/models/operations/createdatasetitem.d.ts.map +1 -1
- package/models/operations/createdatasetitem.js +2 -4
- package/models/operations/createdatasetitem.js.map +1 -1
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +14 -14
- package/models/operations/deploymentcreatemetric.d.ts +0 -6
- package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
- package/models/operations/deploymentcreatemetric.js +0 -2
- package/models/operations/deploymentcreatemetric.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +0 -6
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +0 -2
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +0 -6
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +0 -2
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/duplicatetool.js +10 -10
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagent.js +2 -2
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listagents.js +2 -2
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.d.ts +0 -3
- package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
- package/models/operations/listdatasetdatapoints.js +2 -3
- package/models/operations/listdatasetdatapoints.js.map +1 -1
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.d.ts +0 -3
- package/models/operations/retrievedatapoint.d.ts.map +1 -1
- package/models/operations/retrievedatapoint.js +2 -3
- package/models/operations/retrievedatapoint.js.map +1 -1
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +10 -10
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.d.ts +0 -6
- package/models/operations/updatedatapoint.d.ts.map +1 -1
- package/models/operations/updatedatapoint.js +2 -4
- package/models/operations/updatedatapoint.js.map +1 -1
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/docs/sdks/knowledge/README.md +6 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +1 -1
- package/packages/orq-rc/src/models/components/deployments.ts +0 -2
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +9 -3
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -10
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +236 -201
- package/packages/orq-rc/src/models/operations/createknowledge.ts +1231 -275
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +7 -1
- package/packages/orq-rc/src/models/operations/createprompt.ts +7 -1
- package/packages/orq-rc/src/models/operations/createtool.ts +192 -116
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -2
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -2
- package/packages/orq-rc/src/models/operations/duplicatetool.ts +45 -15
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getagent.ts +9 -3
- package/packages/orq-rc/src/models/operations/getalltools.ts +167 -118
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +157 -143
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +912 -166
- package/packages/orq-rc/src/models/operations/listagents.ts +9 -3
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -9
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +755 -150
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -9
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +45 -15
- package/packages/orq-rc/src/models/operations/runagent.ts +7 -1
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +49 -62
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +7 -1
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -10
- package/packages/orq-rc/src/models/operations/updatedataset.ts +9 -3
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +56 -32
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +1710 -367
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +7 -1
- package/packages/orq-rc/src/models/operations/updateprompt.ts +7 -1
- package/packages/orq-rc/src/models/operations/updatetool.ts +80 -20
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/deployments.ts +0 -2
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -4
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +14 -14
- package/src/models/operations/deploymentcreatemetric.ts +0 -2
- package/src/models/operations/deploymentgetconfig.ts +0 -2
- package/src/models/operations/deploymentstream.ts +0 -2
- package/src/models/operations/duplicatetool.ts +10 -10
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getagent.ts +2 -2
- package/src/models/operations/getalltools.ts +10 -10
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listagents.ts +2 -2
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -3
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -3
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +10 -10
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -4
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +14 -14
|
@@ -9,6 +9,40 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
export const CreateKnowledgeRequestBodyType = {
|
|
13
|
+
External: "external",
|
|
14
|
+
} as const;
|
|
15
|
+
export type CreateKnowledgeRequestBodyType = ClosedEnum<
|
|
16
|
+
typeof CreateKnowledgeRequestBodyType
|
|
17
|
+
>;
|
|
18
|
+
|
|
19
|
+
export type ExternalConfig = {
|
|
20
|
+
/**
|
|
21
|
+
* The name of the external knowledge base.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* The API URL of the external knowledge base.
|
|
26
|
+
*/
|
|
27
|
+
apiUrl: string;
|
|
28
|
+
/**
|
|
29
|
+
* The API key to access the external knowledge base.
|
|
30
|
+
*/
|
|
31
|
+
apiKey: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type RequestBody2 = {
|
|
35
|
+
type?: CreateKnowledgeRequestBodyType | undefined;
|
|
36
|
+
key: string;
|
|
37
|
+
description?: string | undefined;
|
|
38
|
+
externalConfig: ExternalConfig;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const RequestBodyType = {
|
|
42
|
+
Internal: "internal",
|
|
43
|
+
} as const;
|
|
44
|
+
export type RequestBodyType = ClosedEnum<typeof RequestBodyType>;
|
|
45
|
+
|
|
12
46
|
/**
|
|
13
47
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
14
48
|
*/
|
|
@@ -25,7 +59,7 @@ export type RetrievalType = ClosedEnum<typeof RetrievalType>;
|
|
|
25
59
|
/**
|
|
26
60
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
27
61
|
*/
|
|
28
|
-
export type
|
|
62
|
+
export type CreateKnowledgeRequestBodyRerankConfig = {
|
|
29
63
|
/**
|
|
30
64
|
* The number of results to return by the reranking model
|
|
31
65
|
*/
|
|
@@ -43,7 +77,7 @@ export type RerankConfig = {
|
|
|
43
77
|
/**
|
|
44
78
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
45
79
|
*/
|
|
46
|
-
export type
|
|
80
|
+
export type CreateKnowledgeRequestBodyAgenticRagConfig = {
|
|
47
81
|
/**
|
|
48
82
|
* The model to use for the Agentic RAG
|
|
49
83
|
*/
|
|
@@ -69,34 +103,168 @@ export type RetrievalSettings = {
|
|
|
69
103
|
/**
|
|
70
104
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
71
105
|
*/
|
|
72
|
-
rerankConfig?:
|
|
106
|
+
rerankConfig?: CreateKnowledgeRequestBodyRerankConfig | null | undefined;
|
|
73
107
|
/**
|
|
74
108
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
75
109
|
*/
|
|
76
|
-
agenticRagConfig?:
|
|
110
|
+
agenticRagConfig?:
|
|
111
|
+
| CreateKnowledgeRequestBodyAgenticRagConfig
|
|
112
|
+
| null
|
|
113
|
+
| undefined;
|
|
77
114
|
};
|
|
78
115
|
|
|
79
|
-
export type
|
|
116
|
+
export type RequestBody1 = {
|
|
117
|
+
type?: RequestBodyType | undefined;
|
|
80
118
|
key: string;
|
|
81
119
|
description?: string | undefined;
|
|
82
120
|
/**
|
|
83
121
|
* The embeddings model to use for the knowledge base. This model will be used to embed the chunks when they are added to the knowledge base.
|
|
84
122
|
*/
|
|
85
123
|
embeddingModel: string;
|
|
124
|
+
isPrivateModel?: boolean | undefined;
|
|
86
125
|
/**
|
|
87
126
|
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
88
127
|
*/
|
|
89
128
|
retrievalSettings?: RetrievalSettings | undefined;
|
|
90
129
|
/**
|
|
91
|
-
*
|
|
130
|
+
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
*
|
|
134
|
+
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
135
|
+
*
|
|
136
|
+
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
92
137
|
*/
|
|
93
138
|
path: string;
|
|
94
139
|
};
|
|
95
140
|
|
|
141
|
+
export type CreateKnowledgeRequestBody = RequestBody1 | RequestBody2;
|
|
142
|
+
|
|
143
|
+
export const CreateKnowledgeResponseBodyType = {
|
|
144
|
+
External: "external",
|
|
145
|
+
} as const;
|
|
146
|
+
export type CreateKnowledgeResponseBodyType = ClosedEnum<
|
|
147
|
+
typeof CreateKnowledgeResponseBodyType
|
|
148
|
+
>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
152
|
+
*/
|
|
153
|
+
export type CreateKnowledgeResponseBodyRerankConfig = {
|
|
154
|
+
/**
|
|
155
|
+
* The number of results to return by the reranking model
|
|
156
|
+
*/
|
|
157
|
+
topK?: number | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
|
|
160
|
+
*/
|
|
161
|
+
rerankThreshold?: number | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* The rerank model to use for the knowledge base.
|
|
164
|
+
*/
|
|
165
|
+
rerankModel: string;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
170
|
+
*/
|
|
171
|
+
export type CreateKnowledgeResponseBodyAgenticRagConfig = {
|
|
172
|
+
/**
|
|
173
|
+
* The model to use for the Agentic RAG
|
|
174
|
+
*/
|
|
175
|
+
model: string;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The retrieval settings for the knowledge base.
|
|
180
|
+
*/
|
|
181
|
+
export type CreateKnowledgeResponseBodyRetrievalSettings = {
|
|
182
|
+
/**
|
|
183
|
+
* The number of results to return from the search.
|
|
184
|
+
*/
|
|
185
|
+
topK?: number | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
|
|
188
|
+
*/
|
|
189
|
+
threshold?: number | undefined;
|
|
190
|
+
/**
|
|
191
|
+
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
192
|
+
*/
|
|
193
|
+
rerankConfig?: CreateKnowledgeResponseBodyRerankConfig | null | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
196
|
+
*/
|
|
197
|
+
agenticRagConfig?:
|
|
198
|
+
| CreateKnowledgeResponseBodyAgenticRagConfig
|
|
199
|
+
| null
|
|
200
|
+
| undefined;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export type ResponseBodyExternalConfig = {
|
|
204
|
+
/**
|
|
205
|
+
* The name of the external knowledge base.
|
|
206
|
+
*/
|
|
207
|
+
name: string;
|
|
208
|
+
/**
|
|
209
|
+
* The API URL of the external knowledge base.
|
|
210
|
+
*/
|
|
211
|
+
apiUrl: string;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export type ResponseBody2 = {
|
|
215
|
+
/**
|
|
216
|
+
* The unique identifier of the knowledge base.
|
|
217
|
+
*/
|
|
218
|
+
id: string;
|
|
219
|
+
/**
|
|
220
|
+
* The creation date of the knowledge base.
|
|
221
|
+
*/
|
|
222
|
+
created: string;
|
|
223
|
+
/**
|
|
224
|
+
* The description of the knowledge base.
|
|
225
|
+
*/
|
|
226
|
+
description?: string | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* The unique key of the knowledge base.
|
|
229
|
+
*/
|
|
230
|
+
key: string;
|
|
231
|
+
/**
|
|
232
|
+
* The project/domain ID of the knowledge base.
|
|
233
|
+
*/
|
|
234
|
+
domainId: string;
|
|
235
|
+
/**
|
|
236
|
+
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
237
|
+
*
|
|
238
|
+
* @remarks
|
|
239
|
+
*
|
|
240
|
+
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
241
|
+
*
|
|
242
|
+
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
243
|
+
*/
|
|
244
|
+
path?: string | undefined;
|
|
245
|
+
createdById?: string | null | undefined;
|
|
246
|
+
updatedById?: string | null | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* The last update date of the knowledge base.
|
|
249
|
+
*/
|
|
250
|
+
updated: string;
|
|
251
|
+
type?: CreateKnowledgeResponseBodyType | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* The retrieval settings for the knowledge base.
|
|
254
|
+
*/
|
|
255
|
+
retrievalSettings?: CreateKnowledgeResponseBodyRetrievalSettings | undefined;
|
|
256
|
+
externalConfig: ResponseBodyExternalConfig;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const ResponseBodyType = {
|
|
260
|
+
Internal: "internal",
|
|
261
|
+
} as const;
|
|
262
|
+
export type ResponseBodyType = ClosedEnum<typeof ResponseBodyType>;
|
|
263
|
+
|
|
96
264
|
/**
|
|
97
265
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
98
266
|
*/
|
|
99
|
-
export const
|
|
267
|
+
export const ResponseBodyRetrievalType = {
|
|
100
268
|
VectorSearch: "vector_search",
|
|
101
269
|
KeywordSearch: "keyword_search",
|
|
102
270
|
HybridSearch: "hybrid_search",
|
|
@@ -104,14 +272,14 @@ export const CreateKnowledgeRetrievalType = {
|
|
|
104
272
|
/**
|
|
105
273
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
106
274
|
*/
|
|
107
|
-
export type
|
|
108
|
-
typeof
|
|
275
|
+
export type ResponseBodyRetrievalType = ClosedEnum<
|
|
276
|
+
typeof ResponseBodyRetrievalType
|
|
109
277
|
>;
|
|
110
278
|
|
|
111
279
|
/**
|
|
112
280
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
113
281
|
*/
|
|
114
|
-
export type
|
|
282
|
+
export type ResponseBodyRerankConfig = {
|
|
115
283
|
/**
|
|
116
284
|
* The number of results to return by the reranking model
|
|
117
285
|
*/
|
|
@@ -129,7 +297,7 @@ export type CreateKnowledgeRerankConfig = {
|
|
|
129
297
|
/**
|
|
130
298
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
131
299
|
*/
|
|
132
|
-
export type
|
|
300
|
+
export type ResponseBodyAgenticRagConfig = {
|
|
133
301
|
/**
|
|
134
302
|
* The model to use for the Agentic RAG
|
|
135
303
|
*/
|
|
@@ -139,11 +307,11 @@ export type CreateKnowledgeAgenticRagConfig = {
|
|
|
139
307
|
/**
|
|
140
308
|
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
141
309
|
*/
|
|
142
|
-
export type
|
|
310
|
+
export type ResponseBodyRetrievalSettings = {
|
|
143
311
|
/**
|
|
144
312
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
145
313
|
*/
|
|
146
|
-
retrievalType?:
|
|
314
|
+
retrievalType?: ResponseBodyRetrievalType | undefined;
|
|
147
315
|
/**
|
|
148
316
|
* The number of results to return from the search.
|
|
149
317
|
*/
|
|
@@ -155,17 +323,14 @@ export type CreateKnowledgeRetrievalSettings = {
|
|
|
155
323
|
/**
|
|
156
324
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
157
325
|
*/
|
|
158
|
-
rerankConfig?:
|
|
326
|
+
rerankConfig?: ResponseBodyRerankConfig | null | undefined;
|
|
159
327
|
/**
|
|
160
328
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
161
329
|
*/
|
|
162
|
-
agenticRagConfig?:
|
|
330
|
+
agenticRagConfig?: ResponseBodyAgenticRagConfig | null | undefined;
|
|
163
331
|
};
|
|
164
332
|
|
|
165
|
-
|
|
166
|
-
* Knowledge Base object
|
|
167
|
-
*/
|
|
168
|
-
export type CreateKnowledgeResponseBody = {
|
|
333
|
+
export type ResponseBody1 = {
|
|
169
334
|
/**
|
|
170
335
|
* The unique identifier of the knowledge base.
|
|
171
336
|
*/
|
|
@@ -182,54 +347,634 @@ export type CreateKnowledgeResponseBody = {
|
|
|
182
347
|
* The unique key of the knowledge base.
|
|
183
348
|
*/
|
|
184
349
|
key: string;
|
|
185
|
-
/**
|
|
186
|
-
* The embeddings model used for the knowledge base.
|
|
187
|
-
*/
|
|
188
|
-
model: string;
|
|
189
350
|
/**
|
|
190
351
|
* The project/domain ID of the knowledge base.
|
|
191
352
|
*/
|
|
192
353
|
domainId: string;
|
|
193
354
|
/**
|
|
194
|
-
*
|
|
355
|
+
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
356
|
+
*
|
|
357
|
+
* @remarks
|
|
358
|
+
*
|
|
359
|
+
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
360
|
+
*
|
|
361
|
+
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
195
362
|
*/
|
|
196
363
|
path?: string | undefined;
|
|
197
|
-
/**
|
|
198
|
-
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
199
|
-
*/
|
|
200
|
-
retrievalSettings?: CreateKnowledgeRetrievalSettings | undefined;
|
|
201
364
|
createdById?: string | null | undefined;
|
|
202
365
|
updatedById?: string | null | undefined;
|
|
203
366
|
/**
|
|
204
367
|
* The last update date of the knowledge base.
|
|
205
368
|
*/
|
|
206
369
|
updated: string;
|
|
370
|
+
type?: ResponseBodyType | undefined;
|
|
371
|
+
/**
|
|
372
|
+
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
373
|
+
*/
|
|
374
|
+
retrievalSettings?: ResponseBodyRetrievalSettings | undefined;
|
|
375
|
+
/**
|
|
376
|
+
* The embeddings model used for the knowledge base.
|
|
377
|
+
*/
|
|
378
|
+
model: string;
|
|
207
379
|
};
|
|
208
380
|
|
|
381
|
+
/**
|
|
382
|
+
* Knowledge successfully created
|
|
383
|
+
*/
|
|
384
|
+
export type CreateKnowledgeResponseBody = ResponseBody1 | ResponseBody2;
|
|
385
|
+
|
|
386
|
+
/** @internal */
|
|
387
|
+
export const CreateKnowledgeRequestBodyType$inboundSchema: z.ZodNativeEnum<
|
|
388
|
+
typeof CreateKnowledgeRequestBodyType
|
|
389
|
+
> = z.nativeEnum(CreateKnowledgeRequestBodyType);
|
|
390
|
+
|
|
391
|
+
/** @internal */
|
|
392
|
+
export const CreateKnowledgeRequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
393
|
+
typeof CreateKnowledgeRequestBodyType
|
|
394
|
+
> = CreateKnowledgeRequestBodyType$inboundSchema;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @internal
|
|
398
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
399
|
+
*/
|
|
400
|
+
export namespace CreateKnowledgeRequestBodyType$ {
|
|
401
|
+
/** @deprecated use `CreateKnowledgeRequestBodyType$inboundSchema` instead. */
|
|
402
|
+
export const inboundSchema = CreateKnowledgeRequestBodyType$inboundSchema;
|
|
403
|
+
/** @deprecated use `CreateKnowledgeRequestBodyType$outboundSchema` instead. */
|
|
404
|
+
export const outboundSchema = CreateKnowledgeRequestBodyType$outboundSchema;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/** @internal */
|
|
408
|
+
export const ExternalConfig$inboundSchema: z.ZodType<
|
|
409
|
+
ExternalConfig,
|
|
410
|
+
z.ZodTypeDef,
|
|
411
|
+
unknown
|
|
412
|
+
> = z.object({
|
|
413
|
+
name: z.string(),
|
|
414
|
+
api_url: z.string(),
|
|
415
|
+
api_key: z.string(),
|
|
416
|
+
}).transform((v) => {
|
|
417
|
+
return remap$(v, {
|
|
418
|
+
"api_url": "apiUrl",
|
|
419
|
+
"api_key": "apiKey",
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
/** @internal */
|
|
424
|
+
export type ExternalConfig$Outbound = {
|
|
425
|
+
name: string;
|
|
426
|
+
api_url: string;
|
|
427
|
+
api_key: string;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/** @internal */
|
|
431
|
+
export const ExternalConfig$outboundSchema: z.ZodType<
|
|
432
|
+
ExternalConfig$Outbound,
|
|
433
|
+
z.ZodTypeDef,
|
|
434
|
+
ExternalConfig
|
|
435
|
+
> = z.object({
|
|
436
|
+
name: z.string(),
|
|
437
|
+
apiUrl: z.string(),
|
|
438
|
+
apiKey: z.string(),
|
|
439
|
+
}).transform((v) => {
|
|
440
|
+
return remap$(v, {
|
|
441
|
+
apiUrl: "api_url",
|
|
442
|
+
apiKey: "api_key",
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* @internal
|
|
448
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
449
|
+
*/
|
|
450
|
+
export namespace ExternalConfig$ {
|
|
451
|
+
/** @deprecated use `ExternalConfig$inboundSchema` instead. */
|
|
452
|
+
export const inboundSchema = ExternalConfig$inboundSchema;
|
|
453
|
+
/** @deprecated use `ExternalConfig$outboundSchema` instead. */
|
|
454
|
+
export const outboundSchema = ExternalConfig$outboundSchema;
|
|
455
|
+
/** @deprecated use `ExternalConfig$Outbound` instead. */
|
|
456
|
+
export type Outbound = ExternalConfig$Outbound;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export function externalConfigToJSON(externalConfig: ExternalConfig): string {
|
|
460
|
+
return JSON.stringify(ExternalConfig$outboundSchema.parse(externalConfig));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export function externalConfigFromJSON(
|
|
464
|
+
jsonString: string,
|
|
465
|
+
): SafeParseResult<ExternalConfig, SDKValidationError> {
|
|
466
|
+
return safeParse(
|
|
467
|
+
jsonString,
|
|
468
|
+
(x) => ExternalConfig$inboundSchema.parse(JSON.parse(x)),
|
|
469
|
+
`Failed to parse 'ExternalConfig' from JSON`,
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/** @internal */
|
|
474
|
+
export const RequestBody2$inboundSchema: z.ZodType<
|
|
475
|
+
RequestBody2,
|
|
476
|
+
z.ZodTypeDef,
|
|
477
|
+
unknown
|
|
478
|
+
> = z.object({
|
|
479
|
+
type: CreateKnowledgeRequestBodyType$inboundSchema.default("external"),
|
|
480
|
+
key: z.string(),
|
|
481
|
+
description: z.string().optional(),
|
|
482
|
+
external_config: z.lazy(() => ExternalConfig$inboundSchema),
|
|
483
|
+
}).transform((v) => {
|
|
484
|
+
return remap$(v, {
|
|
485
|
+
"external_config": "externalConfig",
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
/** @internal */
|
|
490
|
+
export type RequestBody2$Outbound = {
|
|
491
|
+
type: string;
|
|
492
|
+
key: string;
|
|
493
|
+
description?: string | undefined;
|
|
494
|
+
external_config: ExternalConfig$Outbound;
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
/** @internal */
|
|
498
|
+
export const RequestBody2$outboundSchema: z.ZodType<
|
|
499
|
+
RequestBody2$Outbound,
|
|
500
|
+
z.ZodTypeDef,
|
|
501
|
+
RequestBody2
|
|
502
|
+
> = z.object({
|
|
503
|
+
type: CreateKnowledgeRequestBodyType$outboundSchema.default("external"),
|
|
504
|
+
key: z.string(),
|
|
505
|
+
description: z.string().optional(),
|
|
506
|
+
externalConfig: z.lazy(() => ExternalConfig$outboundSchema),
|
|
507
|
+
}).transform((v) => {
|
|
508
|
+
return remap$(v, {
|
|
509
|
+
externalConfig: "external_config",
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @internal
|
|
515
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
516
|
+
*/
|
|
517
|
+
export namespace RequestBody2$ {
|
|
518
|
+
/** @deprecated use `RequestBody2$inboundSchema` instead. */
|
|
519
|
+
export const inboundSchema = RequestBody2$inboundSchema;
|
|
520
|
+
/** @deprecated use `RequestBody2$outboundSchema` instead. */
|
|
521
|
+
export const outboundSchema = RequestBody2$outboundSchema;
|
|
522
|
+
/** @deprecated use `RequestBody2$Outbound` instead. */
|
|
523
|
+
export type Outbound = RequestBody2$Outbound;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export function requestBody2ToJSON(requestBody2: RequestBody2): string {
|
|
527
|
+
return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export function requestBody2FromJSON(
|
|
531
|
+
jsonString: string,
|
|
532
|
+
): SafeParseResult<RequestBody2, SDKValidationError> {
|
|
533
|
+
return safeParse(
|
|
534
|
+
jsonString,
|
|
535
|
+
(x) => RequestBody2$inboundSchema.parse(JSON.parse(x)),
|
|
536
|
+
`Failed to parse 'RequestBody2' from JSON`,
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** @internal */
|
|
541
|
+
export const RequestBodyType$inboundSchema: z.ZodNativeEnum<
|
|
542
|
+
typeof RequestBodyType
|
|
543
|
+
> = z.nativeEnum(RequestBodyType);
|
|
544
|
+
|
|
545
|
+
/** @internal */
|
|
546
|
+
export const RequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
547
|
+
typeof RequestBodyType
|
|
548
|
+
> = RequestBodyType$inboundSchema;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* @internal
|
|
552
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
553
|
+
*/
|
|
554
|
+
export namespace RequestBodyType$ {
|
|
555
|
+
/** @deprecated use `RequestBodyType$inboundSchema` instead. */
|
|
556
|
+
export const inboundSchema = RequestBodyType$inboundSchema;
|
|
557
|
+
/** @deprecated use `RequestBodyType$outboundSchema` instead. */
|
|
558
|
+
export const outboundSchema = RequestBodyType$outboundSchema;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/** @internal */
|
|
562
|
+
export const RetrievalType$inboundSchema: z.ZodNativeEnum<
|
|
563
|
+
typeof RetrievalType
|
|
564
|
+
> = z.nativeEnum(RetrievalType);
|
|
565
|
+
|
|
566
|
+
/** @internal */
|
|
567
|
+
export const RetrievalType$outboundSchema: z.ZodNativeEnum<
|
|
568
|
+
typeof RetrievalType
|
|
569
|
+
> = RetrievalType$inboundSchema;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* @internal
|
|
573
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
574
|
+
*/
|
|
575
|
+
export namespace RetrievalType$ {
|
|
576
|
+
/** @deprecated use `RetrievalType$inboundSchema` instead. */
|
|
577
|
+
export const inboundSchema = RetrievalType$inboundSchema;
|
|
578
|
+
/** @deprecated use `RetrievalType$outboundSchema` instead. */
|
|
579
|
+
export const outboundSchema = RetrievalType$outboundSchema;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/** @internal */
|
|
583
|
+
export const CreateKnowledgeRequestBodyRerankConfig$inboundSchema: z.ZodType<
|
|
584
|
+
CreateKnowledgeRequestBodyRerankConfig,
|
|
585
|
+
z.ZodTypeDef,
|
|
586
|
+
unknown
|
|
587
|
+
> = z.object({
|
|
588
|
+
top_k: z.number().int().default(5),
|
|
589
|
+
rerank_threshold: z.number().default(0.5),
|
|
590
|
+
rerank_model: z.string(),
|
|
591
|
+
}).transform((v) => {
|
|
592
|
+
return remap$(v, {
|
|
593
|
+
"top_k": "topK",
|
|
594
|
+
"rerank_threshold": "rerankThreshold",
|
|
595
|
+
"rerank_model": "rerankModel",
|
|
596
|
+
});
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
/** @internal */
|
|
600
|
+
export type CreateKnowledgeRequestBodyRerankConfig$Outbound = {
|
|
601
|
+
top_k: number;
|
|
602
|
+
rerank_threshold: number;
|
|
603
|
+
rerank_model: string;
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/** @internal */
|
|
607
|
+
export const CreateKnowledgeRequestBodyRerankConfig$outboundSchema: z.ZodType<
|
|
608
|
+
CreateKnowledgeRequestBodyRerankConfig$Outbound,
|
|
609
|
+
z.ZodTypeDef,
|
|
610
|
+
CreateKnowledgeRequestBodyRerankConfig
|
|
611
|
+
> = z.object({
|
|
612
|
+
topK: z.number().int().default(5),
|
|
613
|
+
rerankThreshold: z.number().default(0.5),
|
|
614
|
+
rerankModel: z.string(),
|
|
615
|
+
}).transform((v) => {
|
|
616
|
+
return remap$(v, {
|
|
617
|
+
topK: "top_k",
|
|
618
|
+
rerankThreshold: "rerank_threshold",
|
|
619
|
+
rerankModel: "rerank_model",
|
|
620
|
+
});
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* @internal
|
|
625
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
626
|
+
*/
|
|
627
|
+
export namespace CreateKnowledgeRequestBodyRerankConfig$ {
|
|
628
|
+
/** @deprecated use `CreateKnowledgeRequestBodyRerankConfig$inboundSchema` instead. */
|
|
629
|
+
export const inboundSchema =
|
|
630
|
+
CreateKnowledgeRequestBodyRerankConfig$inboundSchema;
|
|
631
|
+
/** @deprecated use `CreateKnowledgeRequestBodyRerankConfig$outboundSchema` instead. */
|
|
632
|
+
export const outboundSchema =
|
|
633
|
+
CreateKnowledgeRequestBodyRerankConfig$outboundSchema;
|
|
634
|
+
/** @deprecated use `CreateKnowledgeRequestBodyRerankConfig$Outbound` instead. */
|
|
635
|
+
export type Outbound = CreateKnowledgeRequestBodyRerankConfig$Outbound;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export function createKnowledgeRequestBodyRerankConfigToJSON(
|
|
639
|
+
createKnowledgeRequestBodyRerankConfig:
|
|
640
|
+
CreateKnowledgeRequestBodyRerankConfig,
|
|
641
|
+
): string {
|
|
642
|
+
return JSON.stringify(
|
|
643
|
+
CreateKnowledgeRequestBodyRerankConfig$outboundSchema.parse(
|
|
644
|
+
createKnowledgeRequestBodyRerankConfig,
|
|
645
|
+
),
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export function createKnowledgeRequestBodyRerankConfigFromJSON(
|
|
650
|
+
jsonString: string,
|
|
651
|
+
): SafeParseResult<CreateKnowledgeRequestBodyRerankConfig, SDKValidationError> {
|
|
652
|
+
return safeParse(
|
|
653
|
+
jsonString,
|
|
654
|
+
(x) =>
|
|
655
|
+
CreateKnowledgeRequestBodyRerankConfig$inboundSchema.parse(JSON.parse(x)),
|
|
656
|
+
`Failed to parse 'CreateKnowledgeRequestBodyRerankConfig' from JSON`,
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/** @internal */
|
|
661
|
+
export const CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema:
|
|
662
|
+
z.ZodType<CreateKnowledgeRequestBodyAgenticRagConfig, z.ZodTypeDef, unknown> =
|
|
663
|
+
z.object({
|
|
664
|
+
model: z.string(),
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
/** @internal */
|
|
668
|
+
export type CreateKnowledgeRequestBodyAgenticRagConfig$Outbound = {
|
|
669
|
+
model: string;
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
/** @internal */
|
|
673
|
+
export const CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema:
|
|
674
|
+
z.ZodType<
|
|
675
|
+
CreateKnowledgeRequestBodyAgenticRagConfig$Outbound,
|
|
676
|
+
z.ZodTypeDef,
|
|
677
|
+
CreateKnowledgeRequestBodyAgenticRagConfig
|
|
678
|
+
> = z.object({
|
|
679
|
+
model: z.string(),
|
|
680
|
+
});
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* @internal
|
|
684
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
685
|
+
*/
|
|
686
|
+
export namespace CreateKnowledgeRequestBodyAgenticRagConfig$ {
|
|
687
|
+
/** @deprecated use `CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema` instead. */
|
|
688
|
+
export const inboundSchema =
|
|
689
|
+
CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema;
|
|
690
|
+
/** @deprecated use `CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema` instead. */
|
|
691
|
+
export const outboundSchema =
|
|
692
|
+
CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema;
|
|
693
|
+
/** @deprecated use `CreateKnowledgeRequestBodyAgenticRagConfig$Outbound` instead. */
|
|
694
|
+
export type Outbound = CreateKnowledgeRequestBodyAgenticRagConfig$Outbound;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export function createKnowledgeRequestBodyAgenticRagConfigToJSON(
|
|
698
|
+
createKnowledgeRequestBodyAgenticRagConfig:
|
|
699
|
+
CreateKnowledgeRequestBodyAgenticRagConfig,
|
|
700
|
+
): string {
|
|
701
|
+
return JSON.stringify(
|
|
702
|
+
CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema.parse(
|
|
703
|
+
createKnowledgeRequestBodyAgenticRagConfig,
|
|
704
|
+
),
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export function createKnowledgeRequestBodyAgenticRagConfigFromJSON(
|
|
709
|
+
jsonString: string,
|
|
710
|
+
): SafeParseResult<
|
|
711
|
+
CreateKnowledgeRequestBodyAgenticRagConfig,
|
|
712
|
+
SDKValidationError
|
|
713
|
+
> {
|
|
714
|
+
return safeParse(
|
|
715
|
+
jsonString,
|
|
716
|
+
(x) =>
|
|
717
|
+
CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema.parse(
|
|
718
|
+
JSON.parse(x),
|
|
719
|
+
),
|
|
720
|
+
`Failed to parse 'CreateKnowledgeRequestBodyAgenticRagConfig' from JSON`,
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** @internal */
|
|
725
|
+
export const RetrievalSettings$inboundSchema: z.ZodType<
|
|
726
|
+
RetrievalSettings,
|
|
727
|
+
z.ZodTypeDef,
|
|
728
|
+
unknown
|
|
729
|
+
> = z.object({
|
|
730
|
+
retrieval_type: RetrievalType$inboundSchema.default("hybrid_search"),
|
|
731
|
+
top_k: z.number().int().default(5),
|
|
732
|
+
threshold: z.number().default(0),
|
|
733
|
+
rerank_config: z.nullable(
|
|
734
|
+
z.lazy(() => CreateKnowledgeRequestBodyRerankConfig$inboundSchema),
|
|
735
|
+
).optional(),
|
|
736
|
+
agentic_rag_config: z.nullable(
|
|
737
|
+
z.lazy(() => CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema),
|
|
738
|
+
).optional(),
|
|
739
|
+
}).transform((v) => {
|
|
740
|
+
return remap$(v, {
|
|
741
|
+
"retrieval_type": "retrievalType",
|
|
742
|
+
"top_k": "topK",
|
|
743
|
+
"rerank_config": "rerankConfig",
|
|
744
|
+
"agentic_rag_config": "agenticRagConfig",
|
|
745
|
+
});
|
|
746
|
+
});
|
|
747
|
+
|
|
748
|
+
/** @internal */
|
|
749
|
+
export type RetrievalSettings$Outbound = {
|
|
750
|
+
retrieval_type: string;
|
|
751
|
+
top_k: number;
|
|
752
|
+
threshold: number;
|
|
753
|
+
rerank_config?:
|
|
754
|
+
| CreateKnowledgeRequestBodyRerankConfig$Outbound
|
|
755
|
+
| null
|
|
756
|
+
| undefined;
|
|
757
|
+
agentic_rag_config?:
|
|
758
|
+
| CreateKnowledgeRequestBodyAgenticRagConfig$Outbound
|
|
759
|
+
| null
|
|
760
|
+
| undefined;
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
/** @internal */
|
|
764
|
+
export const RetrievalSettings$outboundSchema: z.ZodType<
|
|
765
|
+
RetrievalSettings$Outbound,
|
|
766
|
+
z.ZodTypeDef,
|
|
767
|
+
RetrievalSettings
|
|
768
|
+
> = z.object({
|
|
769
|
+
retrievalType: RetrievalType$outboundSchema.default("hybrid_search"),
|
|
770
|
+
topK: z.number().int().default(5),
|
|
771
|
+
threshold: z.number().default(0),
|
|
772
|
+
rerankConfig: z.nullable(
|
|
773
|
+
z.lazy(() => CreateKnowledgeRequestBodyRerankConfig$outboundSchema),
|
|
774
|
+
).optional(),
|
|
775
|
+
agenticRagConfig: z.nullable(
|
|
776
|
+
z.lazy(() => CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema),
|
|
777
|
+
).optional(),
|
|
778
|
+
}).transform((v) => {
|
|
779
|
+
return remap$(v, {
|
|
780
|
+
retrievalType: "retrieval_type",
|
|
781
|
+
topK: "top_k",
|
|
782
|
+
rerankConfig: "rerank_config",
|
|
783
|
+
agenticRagConfig: "agentic_rag_config",
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* @internal
|
|
789
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
790
|
+
*/
|
|
791
|
+
export namespace RetrievalSettings$ {
|
|
792
|
+
/** @deprecated use `RetrievalSettings$inboundSchema` instead. */
|
|
793
|
+
export const inboundSchema = RetrievalSettings$inboundSchema;
|
|
794
|
+
/** @deprecated use `RetrievalSettings$outboundSchema` instead. */
|
|
795
|
+
export const outboundSchema = RetrievalSettings$outboundSchema;
|
|
796
|
+
/** @deprecated use `RetrievalSettings$Outbound` instead. */
|
|
797
|
+
export type Outbound = RetrievalSettings$Outbound;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export function retrievalSettingsToJSON(
|
|
801
|
+
retrievalSettings: RetrievalSettings,
|
|
802
|
+
): string {
|
|
803
|
+
return JSON.stringify(
|
|
804
|
+
RetrievalSettings$outboundSchema.parse(retrievalSettings),
|
|
805
|
+
);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export function retrievalSettingsFromJSON(
|
|
809
|
+
jsonString: string,
|
|
810
|
+
): SafeParseResult<RetrievalSettings, SDKValidationError> {
|
|
811
|
+
return safeParse(
|
|
812
|
+
jsonString,
|
|
813
|
+
(x) => RetrievalSettings$inboundSchema.parse(JSON.parse(x)),
|
|
814
|
+
`Failed to parse 'RetrievalSettings' from JSON`,
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/** @internal */
|
|
819
|
+
export const RequestBody1$inboundSchema: z.ZodType<
|
|
820
|
+
RequestBody1,
|
|
821
|
+
z.ZodTypeDef,
|
|
822
|
+
unknown
|
|
823
|
+
> = z.object({
|
|
824
|
+
type: RequestBodyType$inboundSchema.default("internal"),
|
|
825
|
+
key: z.string(),
|
|
826
|
+
description: z.string().optional(),
|
|
827
|
+
embedding_model: z.string(),
|
|
828
|
+
is_private_model: z.boolean().default(false),
|
|
829
|
+
retrieval_settings: z.lazy(() => RetrievalSettings$inboundSchema).optional(),
|
|
830
|
+
path: z.string(),
|
|
831
|
+
}).transform((v) => {
|
|
832
|
+
return remap$(v, {
|
|
833
|
+
"embedding_model": "embeddingModel",
|
|
834
|
+
"is_private_model": "isPrivateModel",
|
|
835
|
+
"retrieval_settings": "retrievalSettings",
|
|
836
|
+
});
|
|
837
|
+
});
|
|
838
|
+
|
|
839
|
+
/** @internal */
|
|
840
|
+
export type RequestBody1$Outbound = {
|
|
841
|
+
type: string;
|
|
842
|
+
key: string;
|
|
843
|
+
description?: string | undefined;
|
|
844
|
+
embedding_model: string;
|
|
845
|
+
is_private_model: boolean;
|
|
846
|
+
retrieval_settings?: RetrievalSettings$Outbound | undefined;
|
|
847
|
+
path: string;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
/** @internal */
|
|
851
|
+
export const RequestBody1$outboundSchema: z.ZodType<
|
|
852
|
+
RequestBody1$Outbound,
|
|
853
|
+
z.ZodTypeDef,
|
|
854
|
+
RequestBody1
|
|
855
|
+
> = z.object({
|
|
856
|
+
type: RequestBodyType$outboundSchema.default("internal"),
|
|
857
|
+
key: z.string(),
|
|
858
|
+
description: z.string().optional(),
|
|
859
|
+
embeddingModel: z.string(),
|
|
860
|
+
isPrivateModel: z.boolean().default(false),
|
|
861
|
+
retrievalSettings: z.lazy(() => RetrievalSettings$outboundSchema).optional(),
|
|
862
|
+
path: z.string(),
|
|
863
|
+
}).transform((v) => {
|
|
864
|
+
return remap$(v, {
|
|
865
|
+
embeddingModel: "embedding_model",
|
|
866
|
+
isPrivateModel: "is_private_model",
|
|
867
|
+
retrievalSettings: "retrieval_settings",
|
|
868
|
+
});
|
|
869
|
+
});
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* @internal
|
|
873
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
874
|
+
*/
|
|
875
|
+
export namespace RequestBody1$ {
|
|
876
|
+
/** @deprecated use `RequestBody1$inboundSchema` instead. */
|
|
877
|
+
export const inboundSchema = RequestBody1$inboundSchema;
|
|
878
|
+
/** @deprecated use `RequestBody1$outboundSchema` instead. */
|
|
879
|
+
export const outboundSchema = RequestBody1$outboundSchema;
|
|
880
|
+
/** @deprecated use `RequestBody1$Outbound` instead. */
|
|
881
|
+
export type Outbound = RequestBody1$Outbound;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export function requestBody1ToJSON(requestBody1: RequestBody1): string {
|
|
885
|
+
return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export function requestBody1FromJSON(
|
|
889
|
+
jsonString: string,
|
|
890
|
+
): SafeParseResult<RequestBody1, SDKValidationError> {
|
|
891
|
+
return safeParse(
|
|
892
|
+
jsonString,
|
|
893
|
+
(x) => RequestBody1$inboundSchema.parse(JSON.parse(x)),
|
|
894
|
+
`Failed to parse 'RequestBody1' from JSON`,
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/** @internal */
|
|
899
|
+
export const CreateKnowledgeRequestBody$inboundSchema: z.ZodType<
|
|
900
|
+
CreateKnowledgeRequestBody,
|
|
901
|
+
z.ZodTypeDef,
|
|
902
|
+
unknown
|
|
903
|
+
> = z.union([
|
|
904
|
+
z.lazy(() => RequestBody1$inboundSchema),
|
|
905
|
+
z.lazy(() => RequestBody2$inboundSchema),
|
|
906
|
+
]);
|
|
907
|
+
|
|
908
|
+
/** @internal */
|
|
909
|
+
export type CreateKnowledgeRequestBody$Outbound =
|
|
910
|
+
| RequestBody1$Outbound
|
|
911
|
+
| RequestBody2$Outbound;
|
|
912
|
+
|
|
913
|
+
/** @internal */
|
|
914
|
+
export const CreateKnowledgeRequestBody$outboundSchema: z.ZodType<
|
|
915
|
+
CreateKnowledgeRequestBody$Outbound,
|
|
916
|
+
z.ZodTypeDef,
|
|
917
|
+
CreateKnowledgeRequestBody
|
|
918
|
+
> = z.union([
|
|
919
|
+
z.lazy(() => RequestBody1$outboundSchema),
|
|
920
|
+
z.lazy(() => RequestBody2$outboundSchema),
|
|
921
|
+
]);
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* @internal
|
|
925
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
926
|
+
*/
|
|
927
|
+
export namespace CreateKnowledgeRequestBody$ {
|
|
928
|
+
/** @deprecated use `CreateKnowledgeRequestBody$inboundSchema` instead. */
|
|
929
|
+
export const inboundSchema = CreateKnowledgeRequestBody$inboundSchema;
|
|
930
|
+
/** @deprecated use `CreateKnowledgeRequestBody$outboundSchema` instead. */
|
|
931
|
+
export const outboundSchema = CreateKnowledgeRequestBody$outboundSchema;
|
|
932
|
+
/** @deprecated use `CreateKnowledgeRequestBody$Outbound` instead. */
|
|
933
|
+
export type Outbound = CreateKnowledgeRequestBody$Outbound;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
export function createKnowledgeRequestBodyToJSON(
|
|
937
|
+
createKnowledgeRequestBody: CreateKnowledgeRequestBody,
|
|
938
|
+
): string {
|
|
939
|
+
return JSON.stringify(
|
|
940
|
+
CreateKnowledgeRequestBody$outboundSchema.parse(createKnowledgeRequestBody),
|
|
941
|
+
);
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
export function createKnowledgeRequestBodyFromJSON(
|
|
945
|
+
jsonString: string,
|
|
946
|
+
): SafeParseResult<CreateKnowledgeRequestBody, SDKValidationError> {
|
|
947
|
+
return safeParse(
|
|
948
|
+
jsonString,
|
|
949
|
+
(x) => CreateKnowledgeRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
950
|
+
`Failed to parse 'CreateKnowledgeRequestBody' from JSON`,
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
|
|
209
954
|
/** @internal */
|
|
210
|
-
export const
|
|
211
|
-
typeof
|
|
212
|
-
> = z.nativeEnum(
|
|
955
|
+
export const CreateKnowledgeResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
956
|
+
typeof CreateKnowledgeResponseBodyType
|
|
957
|
+
> = z.nativeEnum(CreateKnowledgeResponseBodyType);
|
|
213
958
|
|
|
214
959
|
/** @internal */
|
|
215
|
-
export const
|
|
216
|
-
typeof
|
|
217
|
-
> =
|
|
960
|
+
export const CreateKnowledgeResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
961
|
+
typeof CreateKnowledgeResponseBodyType
|
|
962
|
+
> = CreateKnowledgeResponseBodyType$inboundSchema;
|
|
218
963
|
|
|
219
964
|
/**
|
|
220
965
|
* @internal
|
|
221
966
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
222
967
|
*/
|
|
223
|
-
export namespace
|
|
224
|
-
/** @deprecated use `
|
|
225
|
-
export const inboundSchema =
|
|
226
|
-
/** @deprecated use `
|
|
227
|
-
export const outboundSchema =
|
|
968
|
+
export namespace CreateKnowledgeResponseBodyType$ {
|
|
969
|
+
/** @deprecated use `CreateKnowledgeResponseBodyType$inboundSchema` instead. */
|
|
970
|
+
export const inboundSchema = CreateKnowledgeResponseBodyType$inboundSchema;
|
|
971
|
+
/** @deprecated use `CreateKnowledgeResponseBodyType$outboundSchema` instead. */
|
|
972
|
+
export const outboundSchema = CreateKnowledgeResponseBodyType$outboundSchema;
|
|
228
973
|
}
|
|
229
974
|
|
|
230
975
|
/** @internal */
|
|
231
|
-
export const
|
|
232
|
-
|
|
976
|
+
export const CreateKnowledgeResponseBodyRerankConfig$inboundSchema: z.ZodType<
|
|
977
|
+
CreateKnowledgeResponseBodyRerankConfig,
|
|
233
978
|
z.ZodTypeDef,
|
|
234
979
|
unknown
|
|
235
980
|
> = z.object({
|
|
@@ -245,17 +990,17 @@ export const RerankConfig$inboundSchema: z.ZodType<
|
|
|
245
990
|
});
|
|
246
991
|
|
|
247
992
|
/** @internal */
|
|
248
|
-
export type
|
|
993
|
+
export type CreateKnowledgeResponseBodyRerankConfig$Outbound = {
|
|
249
994
|
top_k: number;
|
|
250
995
|
rerank_threshold: number;
|
|
251
996
|
rerank_model: string;
|
|
252
997
|
};
|
|
253
998
|
|
|
254
999
|
/** @internal */
|
|
255
|
-
export const
|
|
256
|
-
|
|
1000
|
+
export const CreateKnowledgeResponseBodyRerankConfig$outboundSchema: z.ZodType<
|
|
1001
|
+
CreateKnowledgeResponseBodyRerankConfig$Outbound,
|
|
257
1002
|
z.ZodTypeDef,
|
|
258
|
-
|
|
1003
|
+
CreateKnowledgeResponseBodyRerankConfig
|
|
259
1004
|
> = z.object({
|
|
260
1005
|
topK: z.number().int().default(5),
|
|
261
1006
|
rerankThreshold: z.number().default(0.5),
|
|
@@ -272,133 +1017,244 @@ export const RerankConfig$outboundSchema: z.ZodType<
|
|
|
272
1017
|
* @internal
|
|
273
1018
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
274
1019
|
*/
|
|
275
|
-
export namespace
|
|
276
|
-
/** @deprecated use `
|
|
277
|
-
export const inboundSchema =
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
1020
|
+
export namespace CreateKnowledgeResponseBodyRerankConfig$ {
|
|
1021
|
+
/** @deprecated use `CreateKnowledgeResponseBodyRerankConfig$inboundSchema` instead. */
|
|
1022
|
+
export const inboundSchema =
|
|
1023
|
+
CreateKnowledgeResponseBodyRerankConfig$inboundSchema;
|
|
1024
|
+
/** @deprecated use `CreateKnowledgeResponseBodyRerankConfig$outboundSchema` instead. */
|
|
1025
|
+
export const outboundSchema =
|
|
1026
|
+
CreateKnowledgeResponseBodyRerankConfig$outboundSchema;
|
|
1027
|
+
/** @deprecated use `CreateKnowledgeResponseBodyRerankConfig$Outbound` instead. */
|
|
1028
|
+
export type Outbound = CreateKnowledgeResponseBodyRerankConfig$Outbound;
|
|
282
1029
|
}
|
|
283
1030
|
|
|
284
|
-
export function
|
|
285
|
-
|
|
1031
|
+
export function createKnowledgeResponseBodyRerankConfigToJSON(
|
|
1032
|
+
createKnowledgeResponseBodyRerankConfig:
|
|
1033
|
+
CreateKnowledgeResponseBodyRerankConfig,
|
|
1034
|
+
): string {
|
|
1035
|
+
return JSON.stringify(
|
|
1036
|
+
CreateKnowledgeResponseBodyRerankConfig$outboundSchema.parse(
|
|
1037
|
+
createKnowledgeResponseBodyRerankConfig,
|
|
1038
|
+
),
|
|
1039
|
+
);
|
|
286
1040
|
}
|
|
287
1041
|
|
|
288
|
-
export function
|
|
1042
|
+
export function createKnowledgeResponseBodyRerankConfigFromJSON(
|
|
289
1043
|
jsonString: string,
|
|
290
|
-
): SafeParseResult<
|
|
1044
|
+
): SafeParseResult<
|
|
1045
|
+
CreateKnowledgeResponseBodyRerankConfig,
|
|
1046
|
+
SDKValidationError
|
|
1047
|
+
> {
|
|
291
1048
|
return safeParse(
|
|
292
1049
|
jsonString,
|
|
293
|
-
(x) =>
|
|
294
|
-
|
|
1050
|
+
(x) =>
|
|
1051
|
+
CreateKnowledgeResponseBodyRerankConfig$inboundSchema.parse(
|
|
1052
|
+
JSON.parse(x),
|
|
1053
|
+
),
|
|
1054
|
+
`Failed to parse 'CreateKnowledgeResponseBodyRerankConfig' from JSON`,
|
|
295
1055
|
);
|
|
296
1056
|
}
|
|
297
1057
|
|
|
298
1058
|
/** @internal */
|
|
299
|
-
export const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
1059
|
+
export const CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema:
|
|
1060
|
+
z.ZodType<
|
|
1061
|
+
CreateKnowledgeResponseBodyAgenticRagConfig,
|
|
1062
|
+
z.ZodTypeDef,
|
|
1063
|
+
unknown
|
|
1064
|
+
> = z.object({
|
|
1065
|
+
model: z.string(),
|
|
1066
|
+
});
|
|
306
1067
|
|
|
307
1068
|
/** @internal */
|
|
308
|
-
export type
|
|
1069
|
+
export type CreateKnowledgeResponseBodyAgenticRagConfig$Outbound = {
|
|
309
1070
|
model: string;
|
|
310
1071
|
};
|
|
311
1072
|
|
|
312
1073
|
/** @internal */
|
|
313
|
-
export const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
1074
|
+
export const CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema:
|
|
1075
|
+
z.ZodType<
|
|
1076
|
+
CreateKnowledgeResponseBodyAgenticRagConfig$Outbound,
|
|
1077
|
+
z.ZodTypeDef,
|
|
1078
|
+
CreateKnowledgeResponseBodyAgenticRagConfig
|
|
1079
|
+
> = z.object({
|
|
1080
|
+
model: z.string(),
|
|
1081
|
+
});
|
|
320
1082
|
|
|
321
1083
|
/**
|
|
322
1084
|
* @internal
|
|
323
1085
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
324
1086
|
*/
|
|
325
|
-
export namespace
|
|
326
|
-
/** @deprecated use `
|
|
327
|
-
export const inboundSchema =
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
1087
|
+
export namespace CreateKnowledgeResponseBodyAgenticRagConfig$ {
|
|
1088
|
+
/** @deprecated use `CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema` instead. */
|
|
1089
|
+
export const inboundSchema =
|
|
1090
|
+
CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema;
|
|
1091
|
+
/** @deprecated use `CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema` instead. */
|
|
1092
|
+
export const outboundSchema =
|
|
1093
|
+
CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema;
|
|
1094
|
+
/** @deprecated use `CreateKnowledgeResponseBodyAgenticRagConfig$Outbound` instead. */
|
|
1095
|
+
export type Outbound = CreateKnowledgeResponseBodyAgenticRagConfig$Outbound;
|
|
332
1096
|
}
|
|
333
1097
|
|
|
334
|
-
export function
|
|
335
|
-
|
|
1098
|
+
export function createKnowledgeResponseBodyAgenticRagConfigToJSON(
|
|
1099
|
+
createKnowledgeResponseBodyAgenticRagConfig:
|
|
1100
|
+
CreateKnowledgeResponseBodyAgenticRagConfig,
|
|
336
1101
|
): string {
|
|
337
1102
|
return JSON.stringify(
|
|
338
|
-
|
|
1103
|
+
CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema.parse(
|
|
1104
|
+
createKnowledgeResponseBodyAgenticRagConfig,
|
|
1105
|
+
),
|
|
339
1106
|
);
|
|
340
1107
|
}
|
|
341
1108
|
|
|
342
|
-
export function
|
|
1109
|
+
export function createKnowledgeResponseBodyAgenticRagConfigFromJSON(
|
|
343
1110
|
jsonString: string,
|
|
344
|
-
): SafeParseResult<
|
|
1111
|
+
): SafeParseResult<
|
|
1112
|
+
CreateKnowledgeResponseBodyAgenticRagConfig,
|
|
1113
|
+
SDKValidationError
|
|
1114
|
+
> {
|
|
345
1115
|
return safeParse(
|
|
346
1116
|
jsonString,
|
|
347
|
-
(x) =>
|
|
348
|
-
|
|
1117
|
+
(x) =>
|
|
1118
|
+
CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema.parse(
|
|
1119
|
+
JSON.parse(x),
|
|
1120
|
+
),
|
|
1121
|
+
`Failed to parse 'CreateKnowledgeResponseBodyAgenticRagConfig' from JSON`,
|
|
349
1122
|
);
|
|
350
1123
|
}
|
|
351
1124
|
|
|
352
1125
|
/** @internal */
|
|
353
|
-
export const
|
|
354
|
-
|
|
1126
|
+
export const CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema:
|
|
1127
|
+
z.ZodType<
|
|
1128
|
+
CreateKnowledgeResponseBodyRetrievalSettings,
|
|
1129
|
+
z.ZodTypeDef,
|
|
1130
|
+
unknown
|
|
1131
|
+
> = z.object({
|
|
1132
|
+
top_k: z.number().int().default(5),
|
|
1133
|
+
threshold: z.number().default(0),
|
|
1134
|
+
rerank_config: z.nullable(
|
|
1135
|
+
z.lazy(() => CreateKnowledgeResponseBodyRerankConfig$inboundSchema),
|
|
1136
|
+
).optional(),
|
|
1137
|
+
agentic_rag_config: z.nullable(
|
|
1138
|
+
z.lazy(() => CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema),
|
|
1139
|
+
).optional(),
|
|
1140
|
+
}).transform((v) => {
|
|
1141
|
+
return remap$(v, {
|
|
1142
|
+
"top_k": "topK",
|
|
1143
|
+
"rerank_config": "rerankConfig",
|
|
1144
|
+
"agentic_rag_config": "agenticRagConfig",
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1148
|
+
/** @internal */
|
|
1149
|
+
export type CreateKnowledgeResponseBodyRetrievalSettings$Outbound = {
|
|
1150
|
+
top_k: number;
|
|
1151
|
+
threshold: number;
|
|
1152
|
+
rerank_config?:
|
|
1153
|
+
| CreateKnowledgeResponseBodyRerankConfig$Outbound
|
|
1154
|
+
| null
|
|
1155
|
+
| undefined;
|
|
1156
|
+
agentic_rag_config?:
|
|
1157
|
+
| CreateKnowledgeResponseBodyAgenticRagConfig$Outbound
|
|
1158
|
+
| null
|
|
1159
|
+
| undefined;
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
/** @internal */
|
|
1163
|
+
export const CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema:
|
|
1164
|
+
z.ZodType<
|
|
1165
|
+
CreateKnowledgeResponseBodyRetrievalSettings$Outbound,
|
|
1166
|
+
z.ZodTypeDef,
|
|
1167
|
+
CreateKnowledgeResponseBodyRetrievalSettings
|
|
1168
|
+
> = z.object({
|
|
1169
|
+
topK: z.number().int().default(5),
|
|
1170
|
+
threshold: z.number().default(0),
|
|
1171
|
+
rerankConfig: z.nullable(
|
|
1172
|
+
z.lazy(() => CreateKnowledgeResponseBodyRerankConfig$outboundSchema),
|
|
1173
|
+
).optional(),
|
|
1174
|
+
agenticRagConfig: z.nullable(
|
|
1175
|
+
z.lazy(() => CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema),
|
|
1176
|
+
).optional(),
|
|
1177
|
+
}).transform((v) => {
|
|
1178
|
+
return remap$(v, {
|
|
1179
|
+
topK: "top_k",
|
|
1180
|
+
rerankConfig: "rerank_config",
|
|
1181
|
+
agenticRagConfig: "agentic_rag_config",
|
|
1182
|
+
});
|
|
1183
|
+
});
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* @internal
|
|
1187
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1188
|
+
*/
|
|
1189
|
+
export namespace CreateKnowledgeResponseBodyRetrievalSettings$ {
|
|
1190
|
+
/** @deprecated use `CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema` instead. */
|
|
1191
|
+
export const inboundSchema =
|
|
1192
|
+
CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema;
|
|
1193
|
+
/** @deprecated use `CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema` instead. */
|
|
1194
|
+
export const outboundSchema =
|
|
1195
|
+
CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema;
|
|
1196
|
+
/** @deprecated use `CreateKnowledgeResponseBodyRetrievalSettings$Outbound` instead. */
|
|
1197
|
+
export type Outbound = CreateKnowledgeResponseBodyRetrievalSettings$Outbound;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
export function createKnowledgeResponseBodyRetrievalSettingsToJSON(
|
|
1201
|
+
createKnowledgeResponseBodyRetrievalSettings:
|
|
1202
|
+
CreateKnowledgeResponseBodyRetrievalSettings,
|
|
1203
|
+
): string {
|
|
1204
|
+
return JSON.stringify(
|
|
1205
|
+
CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema.parse(
|
|
1206
|
+
createKnowledgeResponseBodyRetrievalSettings,
|
|
1207
|
+
),
|
|
1208
|
+
);
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
export function createKnowledgeResponseBodyRetrievalSettingsFromJSON(
|
|
1212
|
+
jsonString: string,
|
|
1213
|
+
): SafeParseResult<
|
|
1214
|
+
CreateKnowledgeResponseBodyRetrievalSettings,
|
|
1215
|
+
SDKValidationError
|
|
1216
|
+
> {
|
|
1217
|
+
return safeParse(
|
|
1218
|
+
jsonString,
|
|
1219
|
+
(x) =>
|
|
1220
|
+
CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema.parse(
|
|
1221
|
+
JSON.parse(x),
|
|
1222
|
+
),
|
|
1223
|
+
`Failed to parse 'CreateKnowledgeResponseBodyRetrievalSettings' from JSON`,
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/** @internal */
|
|
1228
|
+
export const ResponseBodyExternalConfig$inboundSchema: z.ZodType<
|
|
1229
|
+
ResponseBodyExternalConfig,
|
|
355
1230
|
z.ZodTypeDef,
|
|
356
1231
|
unknown
|
|
357
1232
|
> = z.object({
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
threshold: z.number().default(0),
|
|
361
|
-
rerank_config: z.nullable(z.lazy(() => RerankConfig$inboundSchema))
|
|
362
|
-
.optional(),
|
|
363
|
-
agentic_rag_config: z.nullable(z.lazy(() => AgenticRagConfig$inboundSchema))
|
|
364
|
-
.optional(),
|
|
1233
|
+
name: z.string(),
|
|
1234
|
+
api_url: z.string(),
|
|
365
1235
|
}).transform((v) => {
|
|
366
1236
|
return remap$(v, {
|
|
367
|
-
"
|
|
368
|
-
"top_k": "topK",
|
|
369
|
-
"rerank_config": "rerankConfig",
|
|
370
|
-
"agentic_rag_config": "agenticRagConfig",
|
|
1237
|
+
"api_url": "apiUrl",
|
|
371
1238
|
});
|
|
372
1239
|
});
|
|
373
1240
|
|
|
374
1241
|
/** @internal */
|
|
375
|
-
export type
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
threshold: number;
|
|
379
|
-
rerank_config?: RerankConfig$Outbound | null | undefined;
|
|
380
|
-
agentic_rag_config?: AgenticRagConfig$Outbound | null | undefined;
|
|
1242
|
+
export type ResponseBodyExternalConfig$Outbound = {
|
|
1243
|
+
name: string;
|
|
1244
|
+
api_url: string;
|
|
381
1245
|
};
|
|
382
1246
|
|
|
383
1247
|
/** @internal */
|
|
384
|
-
export const
|
|
385
|
-
|
|
1248
|
+
export const ResponseBodyExternalConfig$outboundSchema: z.ZodType<
|
|
1249
|
+
ResponseBodyExternalConfig$Outbound,
|
|
386
1250
|
z.ZodTypeDef,
|
|
387
|
-
|
|
1251
|
+
ResponseBodyExternalConfig
|
|
388
1252
|
> = z.object({
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
threshold: z.number().default(0),
|
|
392
|
-
rerankConfig: z.nullable(z.lazy(() => RerankConfig$outboundSchema))
|
|
393
|
-
.optional(),
|
|
394
|
-
agenticRagConfig: z.nullable(z.lazy(() => AgenticRagConfig$outboundSchema))
|
|
395
|
-
.optional(),
|
|
1253
|
+
name: z.string(),
|
|
1254
|
+
apiUrl: z.string(),
|
|
396
1255
|
}).transform((v) => {
|
|
397
1256
|
return remap$(v, {
|
|
398
|
-
|
|
399
|
-
topK: "top_k",
|
|
400
|
-
rerankConfig: "rerank_config",
|
|
401
|
-
agenticRagConfig: "agentic_rag_config",
|
|
1257
|
+
apiUrl: "api_url",
|
|
402
1258
|
});
|
|
403
1259
|
});
|
|
404
1260
|
|
|
@@ -406,75 +1262,110 @@ export const RetrievalSettings$outboundSchema: z.ZodType<
|
|
|
406
1262
|
* @internal
|
|
407
1263
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
408
1264
|
*/
|
|
409
|
-
export namespace
|
|
410
|
-
/** @deprecated use `
|
|
411
|
-
export const inboundSchema =
|
|
412
|
-
/** @deprecated use `
|
|
413
|
-
export const outboundSchema =
|
|
414
|
-
/** @deprecated use `
|
|
415
|
-
export type Outbound =
|
|
1265
|
+
export namespace ResponseBodyExternalConfig$ {
|
|
1266
|
+
/** @deprecated use `ResponseBodyExternalConfig$inboundSchema` instead. */
|
|
1267
|
+
export const inboundSchema = ResponseBodyExternalConfig$inboundSchema;
|
|
1268
|
+
/** @deprecated use `ResponseBodyExternalConfig$outboundSchema` instead. */
|
|
1269
|
+
export const outboundSchema = ResponseBodyExternalConfig$outboundSchema;
|
|
1270
|
+
/** @deprecated use `ResponseBodyExternalConfig$Outbound` instead. */
|
|
1271
|
+
export type Outbound = ResponseBodyExternalConfig$Outbound;
|
|
416
1272
|
}
|
|
417
1273
|
|
|
418
|
-
export function
|
|
419
|
-
|
|
1274
|
+
export function responseBodyExternalConfigToJSON(
|
|
1275
|
+
responseBodyExternalConfig: ResponseBodyExternalConfig,
|
|
420
1276
|
): string {
|
|
421
1277
|
return JSON.stringify(
|
|
422
|
-
|
|
1278
|
+
ResponseBodyExternalConfig$outboundSchema.parse(responseBodyExternalConfig),
|
|
423
1279
|
);
|
|
424
1280
|
}
|
|
425
1281
|
|
|
426
|
-
export function
|
|
1282
|
+
export function responseBodyExternalConfigFromJSON(
|
|
427
1283
|
jsonString: string,
|
|
428
|
-
): SafeParseResult<
|
|
1284
|
+
): SafeParseResult<ResponseBodyExternalConfig, SDKValidationError> {
|
|
429
1285
|
return safeParse(
|
|
430
1286
|
jsonString,
|
|
431
|
-
(x) =>
|
|
432
|
-
`Failed to parse '
|
|
1287
|
+
(x) => ResponseBodyExternalConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1288
|
+
`Failed to parse 'ResponseBodyExternalConfig' from JSON`,
|
|
433
1289
|
);
|
|
434
1290
|
}
|
|
435
1291
|
|
|
436
1292
|
/** @internal */
|
|
437
|
-
export const
|
|
438
|
-
|
|
1293
|
+
export const ResponseBody2$inboundSchema: z.ZodType<
|
|
1294
|
+
ResponseBody2,
|
|
439
1295
|
z.ZodTypeDef,
|
|
440
1296
|
unknown
|
|
441
1297
|
> = z.object({
|
|
442
|
-
|
|
1298
|
+
_id: z.string(),
|
|
1299
|
+
created: z.string(),
|
|
443
1300
|
description: z.string().optional(),
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
path: z.string(),
|
|
1301
|
+
key: z.string(),
|
|
1302
|
+
domain_id: z.string(),
|
|
1303
|
+
path: z.string().optional(),
|
|
1304
|
+
created_by_id: z.nullable(z.string()).optional(),
|
|
1305
|
+
updated_by_id: z.nullable(z.string()).optional(),
|
|
1306
|
+
updated: z.string(),
|
|
1307
|
+
type: CreateKnowledgeResponseBodyType$inboundSchema.default("external"),
|
|
1308
|
+
retrieval_settings: z.lazy(() =>
|
|
1309
|
+
CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema
|
|
1310
|
+
).optional(),
|
|
1311
|
+
external_config: z.lazy(() => ResponseBodyExternalConfig$inboundSchema),
|
|
447
1312
|
}).transform((v) => {
|
|
448
1313
|
return remap$(v, {
|
|
449
|
-
"
|
|
1314
|
+
"_id": "id",
|
|
1315
|
+
"domain_id": "domainId",
|
|
1316
|
+
"created_by_id": "createdById",
|
|
1317
|
+
"updated_by_id": "updatedById",
|
|
450
1318
|
"retrieval_settings": "retrievalSettings",
|
|
1319
|
+
"external_config": "externalConfig",
|
|
451
1320
|
});
|
|
452
1321
|
});
|
|
453
1322
|
|
|
454
1323
|
/** @internal */
|
|
455
|
-
export type
|
|
456
|
-
|
|
1324
|
+
export type ResponseBody2$Outbound = {
|
|
1325
|
+
_id: string;
|
|
1326
|
+
created: string;
|
|
457
1327
|
description?: string | undefined;
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
path
|
|
1328
|
+
key: string;
|
|
1329
|
+
domain_id: string;
|
|
1330
|
+
path?: string | undefined;
|
|
1331
|
+
created_by_id?: string | null | undefined;
|
|
1332
|
+
updated_by_id?: string | null | undefined;
|
|
1333
|
+
updated: string;
|
|
1334
|
+
type: string;
|
|
1335
|
+
retrieval_settings?:
|
|
1336
|
+
| CreateKnowledgeResponseBodyRetrievalSettings$Outbound
|
|
1337
|
+
| undefined;
|
|
1338
|
+
external_config: ResponseBodyExternalConfig$Outbound;
|
|
461
1339
|
};
|
|
462
1340
|
|
|
463
1341
|
/** @internal */
|
|
464
|
-
export const
|
|
465
|
-
|
|
1342
|
+
export const ResponseBody2$outboundSchema: z.ZodType<
|
|
1343
|
+
ResponseBody2$Outbound,
|
|
466
1344
|
z.ZodTypeDef,
|
|
467
|
-
|
|
1345
|
+
ResponseBody2
|
|
468
1346
|
> = z.object({
|
|
469
|
-
|
|
1347
|
+
id: z.string(),
|
|
1348
|
+
created: z.string(),
|
|
470
1349
|
description: z.string().optional(),
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
path: z.string(),
|
|
1350
|
+
key: z.string(),
|
|
1351
|
+
domainId: z.string(),
|
|
1352
|
+
path: z.string().optional(),
|
|
1353
|
+
createdById: z.nullable(z.string()).optional(),
|
|
1354
|
+
updatedById: z.nullable(z.string()).optional(),
|
|
1355
|
+
updated: z.string(),
|
|
1356
|
+
type: CreateKnowledgeResponseBodyType$outboundSchema.default("external"),
|
|
1357
|
+
retrievalSettings: z.lazy(() =>
|
|
1358
|
+
CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema
|
|
1359
|
+
).optional(),
|
|
1360
|
+
externalConfig: z.lazy(() => ResponseBodyExternalConfig$outboundSchema),
|
|
474
1361
|
}).transform((v) => {
|
|
475
1362
|
return remap$(v, {
|
|
476
|
-
|
|
1363
|
+
id: "_id",
|
|
1364
|
+
domainId: "domain_id",
|
|
1365
|
+
createdById: "created_by_id",
|
|
1366
|
+
updatedById: "updated_by_id",
|
|
477
1367
|
retrievalSettings: "retrieval_settings",
|
|
1368
|
+
externalConfig: "external_config",
|
|
478
1369
|
});
|
|
479
1370
|
});
|
|
480
1371
|
|
|
@@ -482,57 +1373,74 @@ export const CreateKnowledgeRequestBody$outboundSchema: z.ZodType<
|
|
|
482
1373
|
* @internal
|
|
483
1374
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
484
1375
|
*/
|
|
485
|
-
export namespace
|
|
486
|
-
/** @deprecated use `
|
|
487
|
-
export const inboundSchema =
|
|
488
|
-
/** @deprecated use `
|
|
489
|
-
export const outboundSchema =
|
|
490
|
-
/** @deprecated use `
|
|
491
|
-
export type Outbound =
|
|
1376
|
+
export namespace ResponseBody2$ {
|
|
1377
|
+
/** @deprecated use `ResponseBody2$inboundSchema` instead. */
|
|
1378
|
+
export const inboundSchema = ResponseBody2$inboundSchema;
|
|
1379
|
+
/** @deprecated use `ResponseBody2$outboundSchema` instead. */
|
|
1380
|
+
export const outboundSchema = ResponseBody2$outboundSchema;
|
|
1381
|
+
/** @deprecated use `ResponseBody2$Outbound` instead. */
|
|
1382
|
+
export type Outbound = ResponseBody2$Outbound;
|
|
492
1383
|
}
|
|
493
1384
|
|
|
494
|
-
export function
|
|
495
|
-
|
|
496
|
-
): string {
|
|
497
|
-
return JSON.stringify(
|
|
498
|
-
CreateKnowledgeRequestBody$outboundSchema.parse(createKnowledgeRequestBody),
|
|
499
|
-
);
|
|
1385
|
+
export function responseBody2ToJSON(responseBody2: ResponseBody2): string {
|
|
1386
|
+
return JSON.stringify(ResponseBody2$outboundSchema.parse(responseBody2));
|
|
500
1387
|
}
|
|
501
1388
|
|
|
502
|
-
export function
|
|
1389
|
+
export function responseBody2FromJSON(
|
|
503
1390
|
jsonString: string,
|
|
504
|
-
): SafeParseResult<
|
|
1391
|
+
): SafeParseResult<ResponseBody2, SDKValidationError> {
|
|
505
1392
|
return safeParse(
|
|
506
1393
|
jsonString,
|
|
507
|
-
(x) =>
|
|
508
|
-
`Failed to parse '
|
|
1394
|
+
(x) => ResponseBody2$inboundSchema.parse(JSON.parse(x)),
|
|
1395
|
+
`Failed to parse 'ResponseBody2' from JSON`,
|
|
509
1396
|
);
|
|
510
1397
|
}
|
|
511
1398
|
|
|
512
1399
|
/** @internal */
|
|
513
|
-
export const
|
|
514
|
-
typeof
|
|
515
|
-
> = z.nativeEnum(
|
|
1400
|
+
export const ResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
1401
|
+
typeof ResponseBodyType
|
|
1402
|
+
> = z.nativeEnum(ResponseBodyType);
|
|
1403
|
+
|
|
1404
|
+
/** @internal */
|
|
1405
|
+
export const ResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1406
|
+
typeof ResponseBodyType
|
|
1407
|
+
> = ResponseBodyType$inboundSchema;
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @internal
|
|
1411
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1412
|
+
*/
|
|
1413
|
+
export namespace ResponseBodyType$ {
|
|
1414
|
+
/** @deprecated use `ResponseBodyType$inboundSchema` instead. */
|
|
1415
|
+
export const inboundSchema = ResponseBodyType$inboundSchema;
|
|
1416
|
+
/** @deprecated use `ResponseBodyType$outboundSchema` instead. */
|
|
1417
|
+
export const outboundSchema = ResponseBodyType$outboundSchema;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/** @internal */
|
|
1421
|
+
export const ResponseBodyRetrievalType$inboundSchema: z.ZodNativeEnum<
|
|
1422
|
+
typeof ResponseBodyRetrievalType
|
|
1423
|
+
> = z.nativeEnum(ResponseBodyRetrievalType);
|
|
516
1424
|
|
|
517
1425
|
/** @internal */
|
|
518
|
-
export const
|
|
519
|
-
typeof
|
|
520
|
-
> =
|
|
1426
|
+
export const ResponseBodyRetrievalType$outboundSchema: z.ZodNativeEnum<
|
|
1427
|
+
typeof ResponseBodyRetrievalType
|
|
1428
|
+
> = ResponseBodyRetrievalType$inboundSchema;
|
|
521
1429
|
|
|
522
1430
|
/**
|
|
523
1431
|
* @internal
|
|
524
1432
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
525
1433
|
*/
|
|
526
|
-
export namespace
|
|
527
|
-
/** @deprecated use `
|
|
528
|
-
export const inboundSchema =
|
|
529
|
-
/** @deprecated use `
|
|
530
|
-
export const outboundSchema =
|
|
1434
|
+
export namespace ResponseBodyRetrievalType$ {
|
|
1435
|
+
/** @deprecated use `ResponseBodyRetrievalType$inboundSchema` instead. */
|
|
1436
|
+
export const inboundSchema = ResponseBodyRetrievalType$inboundSchema;
|
|
1437
|
+
/** @deprecated use `ResponseBodyRetrievalType$outboundSchema` instead. */
|
|
1438
|
+
export const outboundSchema = ResponseBodyRetrievalType$outboundSchema;
|
|
531
1439
|
}
|
|
532
1440
|
|
|
533
1441
|
/** @internal */
|
|
534
|
-
export const
|
|
535
|
-
|
|
1442
|
+
export const ResponseBodyRerankConfig$inboundSchema: z.ZodType<
|
|
1443
|
+
ResponseBodyRerankConfig,
|
|
536
1444
|
z.ZodTypeDef,
|
|
537
1445
|
unknown
|
|
538
1446
|
> = z.object({
|
|
@@ -548,17 +1456,17 @@ export const CreateKnowledgeRerankConfig$inboundSchema: z.ZodType<
|
|
|
548
1456
|
});
|
|
549
1457
|
|
|
550
1458
|
/** @internal */
|
|
551
|
-
export type
|
|
1459
|
+
export type ResponseBodyRerankConfig$Outbound = {
|
|
552
1460
|
top_k: number;
|
|
553
1461
|
rerank_threshold: number;
|
|
554
1462
|
rerank_model: string;
|
|
555
1463
|
};
|
|
556
1464
|
|
|
557
1465
|
/** @internal */
|
|
558
|
-
export const
|
|
559
|
-
|
|
1466
|
+
export const ResponseBodyRerankConfig$outboundSchema: z.ZodType<
|
|
1467
|
+
ResponseBodyRerankConfig$Outbound,
|
|
560
1468
|
z.ZodTypeDef,
|
|
561
|
-
|
|
1469
|
+
ResponseBodyRerankConfig
|
|
562
1470
|
> = z.object({
|
|
563
1471
|
topK: z.number().int().default(5),
|
|
564
1472
|
rerankThreshold: z.number().default(0.5),
|
|
@@ -575,38 +1483,36 @@ export const CreateKnowledgeRerankConfig$outboundSchema: z.ZodType<
|
|
|
575
1483
|
* @internal
|
|
576
1484
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
577
1485
|
*/
|
|
578
|
-
export namespace
|
|
579
|
-
/** @deprecated use `
|
|
580
|
-
export const inboundSchema =
|
|
581
|
-
/** @deprecated use `
|
|
582
|
-
export const outboundSchema =
|
|
583
|
-
/** @deprecated use `
|
|
584
|
-
export type Outbound =
|
|
1486
|
+
export namespace ResponseBodyRerankConfig$ {
|
|
1487
|
+
/** @deprecated use `ResponseBodyRerankConfig$inboundSchema` instead. */
|
|
1488
|
+
export const inboundSchema = ResponseBodyRerankConfig$inboundSchema;
|
|
1489
|
+
/** @deprecated use `ResponseBodyRerankConfig$outboundSchema` instead. */
|
|
1490
|
+
export const outboundSchema = ResponseBodyRerankConfig$outboundSchema;
|
|
1491
|
+
/** @deprecated use `ResponseBodyRerankConfig$Outbound` instead. */
|
|
1492
|
+
export type Outbound = ResponseBodyRerankConfig$Outbound;
|
|
585
1493
|
}
|
|
586
1494
|
|
|
587
|
-
export function
|
|
588
|
-
|
|
1495
|
+
export function responseBodyRerankConfigToJSON(
|
|
1496
|
+
responseBodyRerankConfig: ResponseBodyRerankConfig,
|
|
589
1497
|
): string {
|
|
590
1498
|
return JSON.stringify(
|
|
591
|
-
|
|
592
|
-
createKnowledgeRerankConfig,
|
|
593
|
-
),
|
|
1499
|
+
ResponseBodyRerankConfig$outboundSchema.parse(responseBodyRerankConfig),
|
|
594
1500
|
);
|
|
595
1501
|
}
|
|
596
1502
|
|
|
597
|
-
export function
|
|
1503
|
+
export function responseBodyRerankConfigFromJSON(
|
|
598
1504
|
jsonString: string,
|
|
599
|
-
): SafeParseResult<
|
|
1505
|
+
): SafeParseResult<ResponseBodyRerankConfig, SDKValidationError> {
|
|
600
1506
|
return safeParse(
|
|
601
1507
|
jsonString,
|
|
602
|
-
(x) =>
|
|
603
|
-
`Failed to parse '
|
|
1508
|
+
(x) => ResponseBodyRerankConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1509
|
+
`Failed to parse 'ResponseBodyRerankConfig' from JSON`,
|
|
604
1510
|
);
|
|
605
1511
|
}
|
|
606
1512
|
|
|
607
1513
|
/** @internal */
|
|
608
|
-
export const
|
|
609
|
-
|
|
1514
|
+
export const ResponseBodyAgenticRagConfig$inboundSchema: z.ZodType<
|
|
1515
|
+
ResponseBodyAgenticRagConfig,
|
|
610
1516
|
z.ZodTypeDef,
|
|
611
1517
|
unknown
|
|
612
1518
|
> = z.object({
|
|
@@ -614,15 +1520,15 @@ export const CreateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
|
|
|
614
1520
|
});
|
|
615
1521
|
|
|
616
1522
|
/** @internal */
|
|
617
|
-
export type
|
|
1523
|
+
export type ResponseBodyAgenticRagConfig$Outbound = {
|
|
618
1524
|
model: string;
|
|
619
1525
|
};
|
|
620
1526
|
|
|
621
1527
|
/** @internal */
|
|
622
|
-
export const
|
|
623
|
-
|
|
1528
|
+
export const ResponseBodyAgenticRagConfig$outboundSchema: z.ZodType<
|
|
1529
|
+
ResponseBodyAgenticRagConfig$Outbound,
|
|
624
1530
|
z.ZodTypeDef,
|
|
625
|
-
|
|
1531
|
+
ResponseBodyAgenticRagConfig
|
|
626
1532
|
> = z.object({
|
|
627
1533
|
model: z.string(),
|
|
628
1534
|
});
|
|
@@ -631,51 +1537,51 @@ export const CreateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
|
|
|
631
1537
|
* @internal
|
|
632
1538
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
633
1539
|
*/
|
|
634
|
-
export namespace
|
|
635
|
-
/** @deprecated use `
|
|
636
|
-
export const inboundSchema =
|
|
637
|
-
/** @deprecated use `
|
|
638
|
-
export const outboundSchema =
|
|
639
|
-
/** @deprecated use `
|
|
640
|
-
export type Outbound =
|
|
1540
|
+
export namespace ResponseBodyAgenticRagConfig$ {
|
|
1541
|
+
/** @deprecated use `ResponseBodyAgenticRagConfig$inboundSchema` instead. */
|
|
1542
|
+
export const inboundSchema = ResponseBodyAgenticRagConfig$inboundSchema;
|
|
1543
|
+
/** @deprecated use `ResponseBodyAgenticRagConfig$outboundSchema` instead. */
|
|
1544
|
+
export const outboundSchema = ResponseBodyAgenticRagConfig$outboundSchema;
|
|
1545
|
+
/** @deprecated use `ResponseBodyAgenticRagConfig$Outbound` instead. */
|
|
1546
|
+
export type Outbound = ResponseBodyAgenticRagConfig$Outbound;
|
|
641
1547
|
}
|
|
642
1548
|
|
|
643
|
-
export function
|
|
644
|
-
|
|
1549
|
+
export function responseBodyAgenticRagConfigToJSON(
|
|
1550
|
+
responseBodyAgenticRagConfig: ResponseBodyAgenticRagConfig,
|
|
645
1551
|
): string {
|
|
646
1552
|
return JSON.stringify(
|
|
647
|
-
|
|
648
|
-
|
|
1553
|
+
ResponseBodyAgenticRagConfig$outboundSchema.parse(
|
|
1554
|
+
responseBodyAgenticRagConfig,
|
|
649
1555
|
),
|
|
650
1556
|
);
|
|
651
1557
|
}
|
|
652
1558
|
|
|
653
|
-
export function
|
|
1559
|
+
export function responseBodyAgenticRagConfigFromJSON(
|
|
654
1560
|
jsonString: string,
|
|
655
|
-
): SafeParseResult<
|
|
1561
|
+
): SafeParseResult<ResponseBodyAgenticRagConfig, SDKValidationError> {
|
|
656
1562
|
return safeParse(
|
|
657
1563
|
jsonString,
|
|
658
|
-
(x) =>
|
|
659
|
-
`Failed to parse '
|
|
1564
|
+
(x) => ResponseBodyAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
|
|
1565
|
+
`Failed to parse 'ResponseBodyAgenticRagConfig' from JSON`,
|
|
660
1566
|
);
|
|
661
1567
|
}
|
|
662
1568
|
|
|
663
1569
|
/** @internal */
|
|
664
|
-
export const
|
|
665
|
-
|
|
1570
|
+
export const ResponseBodyRetrievalSettings$inboundSchema: z.ZodType<
|
|
1571
|
+
ResponseBodyRetrievalSettings,
|
|
666
1572
|
z.ZodTypeDef,
|
|
667
1573
|
unknown
|
|
668
1574
|
> = z.object({
|
|
669
|
-
retrieval_type:
|
|
1575
|
+
retrieval_type: ResponseBodyRetrievalType$inboundSchema.default(
|
|
670
1576
|
"hybrid_search",
|
|
671
1577
|
),
|
|
672
1578
|
top_k: z.number().int().default(5),
|
|
673
1579
|
threshold: z.number().default(0),
|
|
674
1580
|
rerank_config: z.nullable(
|
|
675
|
-
z.lazy(() =>
|
|
1581
|
+
z.lazy(() => ResponseBodyRerankConfig$inboundSchema),
|
|
676
1582
|
).optional(),
|
|
677
1583
|
agentic_rag_config: z.nullable(
|
|
678
|
-
z.lazy(() =>
|
|
1584
|
+
z.lazy(() => ResponseBodyAgenticRagConfig$inboundSchema),
|
|
679
1585
|
).optional(),
|
|
680
1586
|
}).transform((v) => {
|
|
681
1587
|
return remap$(v, {
|
|
@@ -687,33 +1593,30 @@ export const CreateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
|
|
|
687
1593
|
});
|
|
688
1594
|
|
|
689
1595
|
/** @internal */
|
|
690
|
-
export type
|
|
1596
|
+
export type ResponseBodyRetrievalSettings$Outbound = {
|
|
691
1597
|
retrieval_type: string;
|
|
692
1598
|
top_k: number;
|
|
693
1599
|
threshold: number;
|
|
694
|
-
rerank_config?:
|
|
695
|
-
agentic_rag_config?:
|
|
696
|
-
| CreateKnowledgeAgenticRagConfig$Outbound
|
|
697
|
-
| null
|
|
698
|
-
| undefined;
|
|
1600
|
+
rerank_config?: ResponseBodyRerankConfig$Outbound | null | undefined;
|
|
1601
|
+
agentic_rag_config?: ResponseBodyAgenticRagConfig$Outbound | null | undefined;
|
|
699
1602
|
};
|
|
700
1603
|
|
|
701
1604
|
/** @internal */
|
|
702
|
-
export const
|
|
703
|
-
|
|
1605
|
+
export const ResponseBodyRetrievalSettings$outboundSchema: z.ZodType<
|
|
1606
|
+
ResponseBodyRetrievalSettings$Outbound,
|
|
704
1607
|
z.ZodTypeDef,
|
|
705
|
-
|
|
1608
|
+
ResponseBodyRetrievalSettings
|
|
706
1609
|
> = z.object({
|
|
707
|
-
retrievalType:
|
|
1610
|
+
retrievalType: ResponseBodyRetrievalType$outboundSchema.default(
|
|
708
1611
|
"hybrid_search",
|
|
709
1612
|
),
|
|
710
1613
|
topK: z.number().int().default(5),
|
|
711
1614
|
threshold: z.number().default(0),
|
|
712
1615
|
rerankConfig: z.nullable(
|
|
713
|
-
z.lazy(() =>
|
|
1616
|
+
z.lazy(() => ResponseBodyRerankConfig$outboundSchema),
|
|
714
1617
|
).optional(),
|
|
715
1618
|
agenticRagConfig: z.nullable(
|
|
716
|
-
z.lazy(() =>
|
|
1619
|
+
z.lazy(() => ResponseBodyAgenticRagConfig$outboundSchema),
|
|
717
1620
|
).optional(),
|
|
718
1621
|
}).transform((v) => {
|
|
719
1622
|
return remap$(v, {
|
|
@@ -728,38 +1631,38 @@ export const CreateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
|
|
|
728
1631
|
* @internal
|
|
729
1632
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
730
1633
|
*/
|
|
731
|
-
export namespace
|
|
732
|
-
/** @deprecated use `
|
|
733
|
-
export const inboundSchema =
|
|
734
|
-
/** @deprecated use `
|
|
735
|
-
export const outboundSchema =
|
|
736
|
-
/** @deprecated use `
|
|
737
|
-
export type Outbound =
|
|
1634
|
+
export namespace ResponseBodyRetrievalSettings$ {
|
|
1635
|
+
/** @deprecated use `ResponseBodyRetrievalSettings$inboundSchema` instead. */
|
|
1636
|
+
export const inboundSchema = ResponseBodyRetrievalSettings$inboundSchema;
|
|
1637
|
+
/** @deprecated use `ResponseBodyRetrievalSettings$outboundSchema` instead. */
|
|
1638
|
+
export const outboundSchema = ResponseBodyRetrievalSettings$outboundSchema;
|
|
1639
|
+
/** @deprecated use `ResponseBodyRetrievalSettings$Outbound` instead. */
|
|
1640
|
+
export type Outbound = ResponseBodyRetrievalSettings$Outbound;
|
|
738
1641
|
}
|
|
739
1642
|
|
|
740
|
-
export function
|
|
741
|
-
|
|
1643
|
+
export function responseBodyRetrievalSettingsToJSON(
|
|
1644
|
+
responseBodyRetrievalSettings: ResponseBodyRetrievalSettings,
|
|
742
1645
|
): string {
|
|
743
1646
|
return JSON.stringify(
|
|
744
|
-
|
|
745
|
-
|
|
1647
|
+
ResponseBodyRetrievalSettings$outboundSchema.parse(
|
|
1648
|
+
responseBodyRetrievalSettings,
|
|
746
1649
|
),
|
|
747
1650
|
);
|
|
748
1651
|
}
|
|
749
1652
|
|
|
750
|
-
export function
|
|
1653
|
+
export function responseBodyRetrievalSettingsFromJSON(
|
|
751
1654
|
jsonString: string,
|
|
752
|
-
): SafeParseResult<
|
|
1655
|
+
): SafeParseResult<ResponseBodyRetrievalSettings, SDKValidationError> {
|
|
753
1656
|
return safeParse(
|
|
754
1657
|
jsonString,
|
|
755
|
-
(x) =>
|
|
756
|
-
`Failed to parse '
|
|
1658
|
+
(x) => ResponseBodyRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
|
|
1659
|
+
`Failed to parse 'ResponseBodyRetrievalSettings' from JSON`,
|
|
757
1660
|
);
|
|
758
1661
|
}
|
|
759
1662
|
|
|
760
1663
|
/** @internal */
|
|
761
|
-
export const
|
|
762
|
-
|
|
1664
|
+
export const ResponseBody1$inboundSchema: z.ZodType<
|
|
1665
|
+
ResponseBody1,
|
|
763
1666
|
z.ZodTypeDef,
|
|
764
1667
|
unknown
|
|
765
1668
|
> = z.object({
|
|
@@ -767,69 +1670,122 @@ export const CreateKnowledgeResponseBody$inboundSchema: z.ZodType<
|
|
|
767
1670
|
created: z.string(),
|
|
768
1671
|
description: z.string().optional(),
|
|
769
1672
|
key: z.string(),
|
|
770
|
-
model: z.string(),
|
|
771
1673
|
domain_id: z.string(),
|
|
772
1674
|
path: z.string().optional(),
|
|
773
|
-
retrieval_settings: z.lazy(() =>
|
|
774
|
-
CreateKnowledgeRetrievalSettings$inboundSchema
|
|
775
|
-
).optional(),
|
|
776
1675
|
created_by_id: z.nullable(z.string()).optional(),
|
|
777
1676
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
778
1677
|
updated: z.string(),
|
|
1678
|
+
type: ResponseBodyType$inboundSchema.default("internal"),
|
|
1679
|
+
retrieval_settings: z.lazy(() => ResponseBodyRetrievalSettings$inboundSchema)
|
|
1680
|
+
.optional(),
|
|
1681
|
+
model: z.string(),
|
|
779
1682
|
}).transform((v) => {
|
|
780
1683
|
return remap$(v, {
|
|
781
1684
|
"_id": "id",
|
|
782
1685
|
"domain_id": "domainId",
|
|
783
|
-
"retrieval_settings": "retrievalSettings",
|
|
784
1686
|
"created_by_id": "createdById",
|
|
785
1687
|
"updated_by_id": "updatedById",
|
|
1688
|
+
"retrieval_settings": "retrievalSettings",
|
|
786
1689
|
});
|
|
787
1690
|
});
|
|
788
1691
|
|
|
789
1692
|
/** @internal */
|
|
790
|
-
export type
|
|
1693
|
+
export type ResponseBody1$Outbound = {
|
|
791
1694
|
_id: string;
|
|
792
1695
|
created: string;
|
|
793
1696
|
description?: string | undefined;
|
|
794
1697
|
key: string;
|
|
795
|
-
model: string;
|
|
796
1698
|
domain_id: string;
|
|
797
1699
|
path?: string | undefined;
|
|
798
|
-
retrieval_settings?: CreateKnowledgeRetrievalSettings$Outbound | undefined;
|
|
799
1700
|
created_by_id?: string | null | undefined;
|
|
800
1701
|
updated_by_id?: string | null | undefined;
|
|
801
1702
|
updated: string;
|
|
1703
|
+
type: string;
|
|
1704
|
+
retrieval_settings?: ResponseBodyRetrievalSettings$Outbound | undefined;
|
|
1705
|
+
model: string;
|
|
802
1706
|
};
|
|
803
1707
|
|
|
804
1708
|
/** @internal */
|
|
805
|
-
export const
|
|
806
|
-
|
|
1709
|
+
export const ResponseBody1$outboundSchema: z.ZodType<
|
|
1710
|
+
ResponseBody1$Outbound,
|
|
807
1711
|
z.ZodTypeDef,
|
|
808
|
-
|
|
1712
|
+
ResponseBody1
|
|
809
1713
|
> = z.object({
|
|
810
1714
|
id: z.string(),
|
|
811
1715
|
created: z.string(),
|
|
812
1716
|
description: z.string().optional(),
|
|
813
1717
|
key: z.string(),
|
|
814
|
-
model: z.string(),
|
|
815
1718
|
domainId: z.string(),
|
|
816
1719
|
path: z.string().optional(),
|
|
817
|
-
retrievalSettings: z.lazy(() =>
|
|
818
|
-
CreateKnowledgeRetrievalSettings$outboundSchema
|
|
819
|
-
).optional(),
|
|
820
1720
|
createdById: z.nullable(z.string()).optional(),
|
|
821
1721
|
updatedById: z.nullable(z.string()).optional(),
|
|
822
1722
|
updated: z.string(),
|
|
1723
|
+
type: ResponseBodyType$outboundSchema.default("internal"),
|
|
1724
|
+
retrievalSettings: z.lazy(() => ResponseBodyRetrievalSettings$outboundSchema)
|
|
1725
|
+
.optional(),
|
|
1726
|
+
model: z.string(),
|
|
823
1727
|
}).transform((v) => {
|
|
824
1728
|
return remap$(v, {
|
|
825
1729
|
id: "_id",
|
|
826
1730
|
domainId: "domain_id",
|
|
827
|
-
retrievalSettings: "retrieval_settings",
|
|
828
1731
|
createdById: "created_by_id",
|
|
829
1732
|
updatedById: "updated_by_id",
|
|
1733
|
+
retrievalSettings: "retrieval_settings",
|
|
830
1734
|
});
|
|
831
1735
|
});
|
|
832
1736
|
|
|
1737
|
+
/**
|
|
1738
|
+
* @internal
|
|
1739
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1740
|
+
*/
|
|
1741
|
+
export namespace ResponseBody1$ {
|
|
1742
|
+
/** @deprecated use `ResponseBody1$inboundSchema` instead. */
|
|
1743
|
+
export const inboundSchema = ResponseBody1$inboundSchema;
|
|
1744
|
+
/** @deprecated use `ResponseBody1$outboundSchema` instead. */
|
|
1745
|
+
export const outboundSchema = ResponseBody1$outboundSchema;
|
|
1746
|
+
/** @deprecated use `ResponseBody1$Outbound` instead. */
|
|
1747
|
+
export type Outbound = ResponseBody1$Outbound;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
export function responseBody1ToJSON(responseBody1: ResponseBody1): string {
|
|
1751
|
+
return JSON.stringify(ResponseBody1$outboundSchema.parse(responseBody1));
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
export function responseBody1FromJSON(
|
|
1755
|
+
jsonString: string,
|
|
1756
|
+
): SafeParseResult<ResponseBody1, SDKValidationError> {
|
|
1757
|
+
return safeParse(
|
|
1758
|
+
jsonString,
|
|
1759
|
+
(x) => ResponseBody1$inboundSchema.parse(JSON.parse(x)),
|
|
1760
|
+
`Failed to parse 'ResponseBody1' from JSON`,
|
|
1761
|
+
);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
/** @internal */
|
|
1765
|
+
export const CreateKnowledgeResponseBody$inboundSchema: z.ZodType<
|
|
1766
|
+
CreateKnowledgeResponseBody,
|
|
1767
|
+
z.ZodTypeDef,
|
|
1768
|
+
unknown
|
|
1769
|
+
> = z.union([
|
|
1770
|
+
z.lazy(() => ResponseBody1$inboundSchema),
|
|
1771
|
+
z.lazy(() => ResponseBody2$inboundSchema),
|
|
1772
|
+
]);
|
|
1773
|
+
|
|
1774
|
+
/** @internal */
|
|
1775
|
+
export type CreateKnowledgeResponseBody$Outbound =
|
|
1776
|
+
| ResponseBody1$Outbound
|
|
1777
|
+
| ResponseBody2$Outbound;
|
|
1778
|
+
|
|
1779
|
+
/** @internal */
|
|
1780
|
+
export const CreateKnowledgeResponseBody$outboundSchema: z.ZodType<
|
|
1781
|
+
CreateKnowledgeResponseBody$Outbound,
|
|
1782
|
+
z.ZodTypeDef,
|
|
1783
|
+
CreateKnowledgeResponseBody
|
|
1784
|
+
> = z.union([
|
|
1785
|
+
z.lazy(() => ResponseBody1$outboundSchema),
|
|
1786
|
+
z.lazy(() => ResponseBody2$outboundSchema),
|
|
1787
|
+
]);
|
|
1788
|
+
|
|
833
1789
|
/**
|
|
834
1790
|
* @internal
|
|
835
1791
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|