@orq-ai/node 3.8.4 → 3.8.6
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 +104 -104
- package/bin/mcp-server.js.map +26 -26
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- 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.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/README.md +95 -83
- package/packages/orq-rc/docs/sdks/evals/README.md +213 -0
- package/packages/orq-rc/docs/sdks/knowledge/README.md +87 -77
- 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/funcs/evalsRagasContextEntitiesRecall.ts +183 -0
- package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +177 -0
- package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +180 -0
- package/packages/orq-rc/src/funcs/{knowledgeCreate.ts → knowledgeChunkText.ts} +13 -11
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +9 -3
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextEntitiesRecall.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/{knowledgeCreate.ts → evalsRagasContextRecall.ts} +7 -6
- package/packages/orq-rc/src/mcp-server/tools/evalsRagasNoiseSensitivity.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeChunkText.ts +37 -0
- package/packages/orq-rc/src/models/errors/evalsragascontextentitiesrecall.ts +167 -0
- package/packages/orq-rc/src/models/errors/evalsragascontextrecall.ts +162 -0
- package/packages/orq-rc/src/models/errors/evalsragasnoisesensitivity.ts +164 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/operations/chunktext.ts +1623 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/evalsragascontextentitiesrecall.ts +164 -0
- package/packages/orq-rc/src/models/operations/evalsragascontextrecall.ts +164 -0
- package/packages/orq-rc/src/models/operations/evalsragasnoisesensitivity.ts +166 -0
- 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/getevals.ts +29 -28
- package/packages/orq-rc/src/models/operations/index.ts +4 -1
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- 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/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- 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/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +206 -266
- package/packages/orq-rc/src/sdk/evals.ts +45 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +18 -15
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- 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/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- 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 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -846
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const RetrievalType = {
|
|
16
16
|
VectorSearch: "vector_search",
|
|
17
17
|
KeywordSearch: "keyword_search",
|
|
18
18
|
HybridSearch: "hybrid_search",
|
|
@@ -20,14 +20,12 @@ export const UpdateKnowledgeRetrievalType = {
|
|
|
20
20
|
/**
|
|
21
21
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
22
22
|
*/
|
|
23
|
-
export type
|
|
24
|
-
typeof UpdateKnowledgeRetrievalType
|
|
25
|
-
>;
|
|
23
|
+
export type RetrievalType = ClosedEnum<typeof RetrievalType>;
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
26
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
29
27
|
*/
|
|
30
|
-
export type
|
|
28
|
+
export type RerankConfig = {
|
|
31
29
|
/**
|
|
32
30
|
* The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
|
|
33
31
|
*/
|
|
@@ -41,7 +39,7 @@ export type UpdateKnowledgeRerankConfig = {
|
|
|
41
39
|
/**
|
|
42
40
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
43
41
|
*/
|
|
44
|
-
export type
|
|
42
|
+
export type AgenticRagConfig = {
|
|
45
43
|
/**
|
|
46
44
|
* The model to use for the Agentic RAG
|
|
47
45
|
*/
|
|
@@ -51,11 +49,11 @@ export type UpdateKnowledgeAgenticRagConfig = {
|
|
|
51
49
|
/**
|
|
52
50
|
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
53
51
|
*/
|
|
54
|
-
export type
|
|
52
|
+
export type RetrievalSettings = {
|
|
55
53
|
/**
|
|
56
54
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
57
55
|
*/
|
|
58
|
-
retrievalType?:
|
|
56
|
+
retrievalType?: RetrievalType | undefined;
|
|
59
57
|
/**
|
|
60
58
|
* The number of results to return from the search.
|
|
61
59
|
*/
|
|
@@ -67,11 +65,11 @@ export type UpdateKnowledgeRetrievalSettings = {
|
|
|
67
65
|
/**
|
|
68
66
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
69
67
|
*/
|
|
70
|
-
rerankConfig?:
|
|
68
|
+
rerankConfig?: RerankConfig | null | undefined;
|
|
71
69
|
/**
|
|
72
70
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
73
71
|
*/
|
|
74
|
-
agenticRagConfig?:
|
|
72
|
+
agenticRagConfig?: AgenticRagConfig | null | undefined;
|
|
75
73
|
};
|
|
76
74
|
|
|
77
75
|
export type UpdateKnowledgeRequestBody = {
|
|
@@ -90,7 +88,7 @@ export type UpdateKnowledgeRequestBody = {
|
|
|
90
88
|
/**
|
|
91
89
|
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
92
90
|
*/
|
|
93
|
-
retrievalSettings?:
|
|
91
|
+
retrievalSettings?: RetrievalSettings | undefined;
|
|
94
92
|
};
|
|
95
93
|
|
|
96
94
|
export type UpdateKnowledgeRequest = {
|
|
@@ -104,7 +102,7 @@ export type UpdateKnowledgeRequest = {
|
|
|
104
102
|
/**
|
|
105
103
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
106
104
|
*/
|
|
107
|
-
export const
|
|
105
|
+
export const UpdateKnowledgeRetrievalType = {
|
|
108
106
|
VectorSearch: "vector_search",
|
|
109
107
|
KeywordSearch: "keyword_search",
|
|
110
108
|
HybridSearch: "hybrid_search",
|
|
@@ -112,14 +110,14 @@ export const UpdateKnowledgeKnowledgeRetrievalType = {
|
|
|
112
110
|
/**
|
|
113
111
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
114
112
|
*/
|
|
115
|
-
export type
|
|
116
|
-
typeof
|
|
113
|
+
export type UpdateKnowledgeRetrievalType = ClosedEnum<
|
|
114
|
+
typeof UpdateKnowledgeRetrievalType
|
|
117
115
|
>;
|
|
118
116
|
|
|
119
117
|
/**
|
|
120
118
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
121
119
|
*/
|
|
122
|
-
export type
|
|
120
|
+
export type UpdateKnowledgeRerankConfig = {
|
|
123
121
|
/**
|
|
124
122
|
* The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
|
|
125
123
|
*/
|
|
@@ -133,7 +131,7 @@ export type UpdateKnowledgeKnowledgeRerankConfig = {
|
|
|
133
131
|
/**
|
|
134
132
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
135
133
|
*/
|
|
136
|
-
export type
|
|
134
|
+
export type UpdateKnowledgeAgenticRagConfig = {
|
|
137
135
|
/**
|
|
138
136
|
* The model to use for the Agentic RAG
|
|
139
137
|
*/
|
|
@@ -143,11 +141,11 @@ export type UpdateKnowledgeKnowledgeAgenticRagConfig = {
|
|
|
143
141
|
/**
|
|
144
142
|
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
145
143
|
*/
|
|
146
|
-
export type
|
|
144
|
+
export type UpdateKnowledgeRetrievalSettings = {
|
|
147
145
|
/**
|
|
148
146
|
* The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
|
|
149
147
|
*/
|
|
150
|
-
retrievalType?:
|
|
148
|
+
retrievalType?: UpdateKnowledgeRetrievalType | undefined;
|
|
151
149
|
/**
|
|
152
150
|
* The number of results to return from the search.
|
|
153
151
|
*/
|
|
@@ -159,14 +157,11 @@ export type UpdateKnowledgeKnowledgeRetrievalSettings = {
|
|
|
159
157
|
/**
|
|
160
158
|
* The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
|
|
161
159
|
*/
|
|
162
|
-
rerankConfig?:
|
|
160
|
+
rerankConfig?: UpdateKnowledgeRerankConfig | null | undefined;
|
|
163
161
|
/**
|
|
164
162
|
* The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
|
|
165
163
|
*/
|
|
166
|
-
agenticRagConfig?:
|
|
167
|
-
| UpdateKnowledgeKnowledgeAgenticRagConfig
|
|
168
|
-
| null
|
|
169
|
-
| undefined;
|
|
164
|
+
agenticRagConfig?: UpdateKnowledgeAgenticRagConfig | null | undefined;
|
|
170
165
|
};
|
|
171
166
|
|
|
172
167
|
/**
|
|
@@ -204,7 +199,7 @@ export type UpdateKnowledgeResponseBody = {
|
|
|
204
199
|
/**
|
|
205
200
|
* The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
|
|
206
201
|
*/
|
|
207
|
-
retrievalSettings?:
|
|
202
|
+
retrievalSettings?: UpdateKnowledgeRetrievalSettings | undefined;
|
|
208
203
|
createdById?: string | null | undefined;
|
|
209
204
|
updatedById?: string | null | undefined;
|
|
210
205
|
/**
|
|
@@ -214,29 +209,29 @@ export type UpdateKnowledgeResponseBody = {
|
|
|
214
209
|
};
|
|
215
210
|
|
|
216
211
|
/** @internal */
|
|
217
|
-
export const
|
|
218
|
-
typeof
|
|
219
|
-
> = z.nativeEnum(
|
|
212
|
+
export const RetrievalType$inboundSchema: z.ZodNativeEnum<
|
|
213
|
+
typeof RetrievalType
|
|
214
|
+
> = z.nativeEnum(RetrievalType);
|
|
220
215
|
|
|
221
216
|
/** @internal */
|
|
222
|
-
export const
|
|
223
|
-
typeof
|
|
224
|
-
> =
|
|
217
|
+
export const RetrievalType$outboundSchema: z.ZodNativeEnum<
|
|
218
|
+
typeof RetrievalType
|
|
219
|
+
> = RetrievalType$inboundSchema;
|
|
225
220
|
|
|
226
221
|
/**
|
|
227
222
|
* @internal
|
|
228
223
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
229
224
|
*/
|
|
230
|
-
export namespace
|
|
231
|
-
/** @deprecated use `
|
|
232
|
-
export const inboundSchema =
|
|
233
|
-
/** @deprecated use `
|
|
234
|
-
export const outboundSchema =
|
|
225
|
+
export namespace RetrievalType$ {
|
|
226
|
+
/** @deprecated use `RetrievalType$inboundSchema` instead. */
|
|
227
|
+
export const inboundSchema = RetrievalType$inboundSchema;
|
|
228
|
+
/** @deprecated use `RetrievalType$outboundSchema` instead. */
|
|
229
|
+
export const outboundSchema = RetrievalType$outboundSchema;
|
|
235
230
|
}
|
|
236
231
|
|
|
237
232
|
/** @internal */
|
|
238
|
-
export const
|
|
239
|
-
|
|
233
|
+
export const RerankConfig$inboundSchema: z.ZodType<
|
|
234
|
+
RerankConfig,
|
|
240
235
|
z.ZodTypeDef,
|
|
241
236
|
unknown
|
|
242
237
|
> = z.object({
|
|
@@ -250,16 +245,16 @@ export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
|
|
|
250
245
|
});
|
|
251
246
|
|
|
252
247
|
/** @internal */
|
|
253
|
-
export type
|
|
248
|
+
export type RerankConfig$Outbound = {
|
|
254
249
|
rerank_threshold: number;
|
|
255
250
|
rerank_model: string;
|
|
256
251
|
};
|
|
257
252
|
|
|
258
253
|
/** @internal */
|
|
259
|
-
export const
|
|
260
|
-
|
|
254
|
+
export const RerankConfig$outboundSchema: z.ZodType<
|
|
255
|
+
RerankConfig$Outbound,
|
|
261
256
|
z.ZodTypeDef,
|
|
262
|
-
|
|
257
|
+
RerankConfig
|
|
263
258
|
> = z.object({
|
|
264
259
|
rerankThreshold: z.number().default(0.5),
|
|
265
260
|
rerankModel: z.string(),
|
|
@@ -274,38 +269,32 @@ export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
|
|
|
274
269
|
* @internal
|
|
275
270
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
276
271
|
*/
|
|
277
|
-
export namespace
|
|
278
|
-
/** @deprecated use `
|
|
279
|
-
export const inboundSchema =
|
|
280
|
-
/** @deprecated use `
|
|
281
|
-
export const outboundSchema =
|
|
282
|
-
/** @deprecated use `
|
|
283
|
-
export type Outbound =
|
|
272
|
+
export namespace RerankConfig$ {
|
|
273
|
+
/** @deprecated use `RerankConfig$inboundSchema` instead. */
|
|
274
|
+
export const inboundSchema = RerankConfig$inboundSchema;
|
|
275
|
+
/** @deprecated use `RerankConfig$outboundSchema` instead. */
|
|
276
|
+
export const outboundSchema = RerankConfig$outboundSchema;
|
|
277
|
+
/** @deprecated use `RerankConfig$Outbound` instead. */
|
|
278
|
+
export type Outbound = RerankConfig$Outbound;
|
|
284
279
|
}
|
|
285
280
|
|
|
286
|
-
export function
|
|
287
|
-
|
|
288
|
-
): string {
|
|
289
|
-
return JSON.stringify(
|
|
290
|
-
UpdateKnowledgeRerankConfig$outboundSchema.parse(
|
|
291
|
-
updateKnowledgeRerankConfig,
|
|
292
|
-
),
|
|
293
|
-
);
|
|
281
|
+
export function rerankConfigToJSON(rerankConfig: RerankConfig): string {
|
|
282
|
+
return JSON.stringify(RerankConfig$outboundSchema.parse(rerankConfig));
|
|
294
283
|
}
|
|
295
284
|
|
|
296
|
-
export function
|
|
285
|
+
export function rerankConfigFromJSON(
|
|
297
286
|
jsonString: string,
|
|
298
|
-
): SafeParseResult<
|
|
287
|
+
): SafeParseResult<RerankConfig, SDKValidationError> {
|
|
299
288
|
return safeParse(
|
|
300
289
|
jsonString,
|
|
301
|
-
(x) =>
|
|
302
|
-
`Failed to parse '
|
|
290
|
+
(x) => RerankConfig$inboundSchema.parse(JSON.parse(x)),
|
|
291
|
+
`Failed to parse 'RerankConfig' from JSON`,
|
|
303
292
|
);
|
|
304
293
|
}
|
|
305
294
|
|
|
306
295
|
/** @internal */
|
|
307
|
-
export const
|
|
308
|
-
|
|
296
|
+
export const AgenticRagConfig$inboundSchema: z.ZodType<
|
|
297
|
+
AgenticRagConfig,
|
|
309
298
|
z.ZodTypeDef,
|
|
310
299
|
unknown
|
|
311
300
|
> = z.object({
|
|
@@ -313,15 +302,15 @@ export const UpdateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
|
|
|
313
302
|
});
|
|
314
303
|
|
|
315
304
|
/** @internal */
|
|
316
|
-
export type
|
|
305
|
+
export type AgenticRagConfig$Outbound = {
|
|
317
306
|
model: string;
|
|
318
307
|
};
|
|
319
308
|
|
|
320
309
|
/** @internal */
|
|
321
|
-
export const
|
|
322
|
-
|
|
310
|
+
export const AgenticRagConfig$outboundSchema: z.ZodType<
|
|
311
|
+
AgenticRagConfig$Outbound,
|
|
323
312
|
z.ZodTypeDef,
|
|
324
|
-
|
|
313
|
+
AgenticRagConfig
|
|
325
314
|
> = z.object({
|
|
326
315
|
model: z.string(),
|
|
327
316
|
});
|
|
@@ -330,52 +319,46 @@ export const UpdateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
|
|
|
330
319
|
* @internal
|
|
331
320
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
332
321
|
*/
|
|
333
|
-
export namespace
|
|
334
|
-
/** @deprecated use `
|
|
335
|
-
export const inboundSchema =
|
|
336
|
-
/** @deprecated use `
|
|
337
|
-
export const outboundSchema =
|
|
338
|
-
/** @deprecated use `
|
|
339
|
-
export type Outbound =
|
|
322
|
+
export namespace AgenticRagConfig$ {
|
|
323
|
+
/** @deprecated use `AgenticRagConfig$inboundSchema` instead. */
|
|
324
|
+
export const inboundSchema = AgenticRagConfig$inboundSchema;
|
|
325
|
+
/** @deprecated use `AgenticRagConfig$outboundSchema` instead. */
|
|
326
|
+
export const outboundSchema = AgenticRagConfig$outboundSchema;
|
|
327
|
+
/** @deprecated use `AgenticRagConfig$Outbound` instead. */
|
|
328
|
+
export type Outbound = AgenticRagConfig$Outbound;
|
|
340
329
|
}
|
|
341
330
|
|
|
342
|
-
export function
|
|
343
|
-
|
|
331
|
+
export function agenticRagConfigToJSON(
|
|
332
|
+
agenticRagConfig: AgenticRagConfig,
|
|
344
333
|
): string {
|
|
345
334
|
return JSON.stringify(
|
|
346
|
-
|
|
347
|
-
updateKnowledgeAgenticRagConfig,
|
|
348
|
-
),
|
|
335
|
+
AgenticRagConfig$outboundSchema.parse(agenticRagConfig),
|
|
349
336
|
);
|
|
350
337
|
}
|
|
351
338
|
|
|
352
|
-
export function
|
|
339
|
+
export function agenticRagConfigFromJSON(
|
|
353
340
|
jsonString: string,
|
|
354
|
-
): SafeParseResult<
|
|
341
|
+
): SafeParseResult<AgenticRagConfig, SDKValidationError> {
|
|
355
342
|
return safeParse(
|
|
356
343
|
jsonString,
|
|
357
|
-
(x) =>
|
|
358
|
-
`Failed to parse '
|
|
344
|
+
(x) => AgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
|
|
345
|
+
`Failed to parse 'AgenticRagConfig' from JSON`,
|
|
359
346
|
);
|
|
360
347
|
}
|
|
361
348
|
|
|
362
349
|
/** @internal */
|
|
363
|
-
export const
|
|
364
|
-
|
|
350
|
+
export const RetrievalSettings$inboundSchema: z.ZodType<
|
|
351
|
+
RetrievalSettings,
|
|
365
352
|
z.ZodTypeDef,
|
|
366
353
|
unknown
|
|
367
354
|
> = z.object({
|
|
368
|
-
retrieval_type:
|
|
369
|
-
"hybrid_search",
|
|
370
|
-
),
|
|
355
|
+
retrieval_type: RetrievalType$inboundSchema.default("hybrid_search"),
|
|
371
356
|
top_k: z.number().int().default(5),
|
|
372
357
|
threshold: z.number().default(0),
|
|
373
|
-
rerank_config: z.nullable(
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
z.lazy(() => UpdateKnowledgeAgenticRagConfig$inboundSchema),
|
|
378
|
-
).optional(),
|
|
358
|
+
rerank_config: z.nullable(z.lazy(() => RerankConfig$inboundSchema))
|
|
359
|
+
.optional(),
|
|
360
|
+
agentic_rag_config: z.nullable(z.lazy(() => AgenticRagConfig$inboundSchema))
|
|
361
|
+
.optional(),
|
|
379
362
|
}).transform((v) => {
|
|
380
363
|
return remap$(v, {
|
|
381
364
|
"retrieval_type": "retrievalType",
|
|
@@ -386,34 +369,27 @@ export const UpdateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
|
|
|
386
369
|
});
|
|
387
370
|
|
|
388
371
|
/** @internal */
|
|
389
|
-
export type
|
|
372
|
+
export type RetrievalSettings$Outbound = {
|
|
390
373
|
retrieval_type: string;
|
|
391
374
|
top_k: number;
|
|
392
375
|
threshold: number;
|
|
393
|
-
rerank_config?:
|
|
394
|
-
agentic_rag_config?:
|
|
395
|
-
| UpdateKnowledgeAgenticRagConfig$Outbound
|
|
396
|
-
| null
|
|
397
|
-
| undefined;
|
|
376
|
+
rerank_config?: RerankConfig$Outbound | null | undefined;
|
|
377
|
+
agentic_rag_config?: AgenticRagConfig$Outbound | null | undefined;
|
|
398
378
|
};
|
|
399
379
|
|
|
400
380
|
/** @internal */
|
|
401
|
-
export const
|
|
402
|
-
|
|
381
|
+
export const RetrievalSettings$outboundSchema: z.ZodType<
|
|
382
|
+
RetrievalSettings$Outbound,
|
|
403
383
|
z.ZodTypeDef,
|
|
404
|
-
|
|
384
|
+
RetrievalSettings
|
|
405
385
|
> = z.object({
|
|
406
|
-
retrievalType:
|
|
407
|
-
"hybrid_search",
|
|
408
|
-
),
|
|
386
|
+
retrievalType: RetrievalType$outboundSchema.default("hybrid_search"),
|
|
409
387
|
topK: z.number().int().default(5),
|
|
410
388
|
threshold: z.number().default(0),
|
|
411
|
-
rerankConfig: z.nullable(
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
z.lazy(() => UpdateKnowledgeAgenticRagConfig$outboundSchema),
|
|
416
|
-
).optional(),
|
|
389
|
+
rerankConfig: z.nullable(z.lazy(() => RerankConfig$outboundSchema))
|
|
390
|
+
.optional(),
|
|
391
|
+
agenticRagConfig: z.nullable(z.lazy(() => AgenticRagConfig$outboundSchema))
|
|
392
|
+
.optional(),
|
|
417
393
|
}).transform((v) => {
|
|
418
394
|
return remap$(v, {
|
|
419
395
|
retrievalType: "retrieval_type",
|
|
@@ -427,32 +403,30 @@ export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
|
|
|
427
403
|
* @internal
|
|
428
404
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
429
405
|
*/
|
|
430
|
-
export namespace
|
|
431
|
-
/** @deprecated use `
|
|
432
|
-
export const inboundSchema =
|
|
433
|
-
/** @deprecated use `
|
|
434
|
-
export const outboundSchema =
|
|
435
|
-
/** @deprecated use `
|
|
436
|
-
export type Outbound =
|
|
406
|
+
export namespace RetrievalSettings$ {
|
|
407
|
+
/** @deprecated use `RetrievalSettings$inboundSchema` instead. */
|
|
408
|
+
export const inboundSchema = RetrievalSettings$inboundSchema;
|
|
409
|
+
/** @deprecated use `RetrievalSettings$outboundSchema` instead. */
|
|
410
|
+
export const outboundSchema = RetrievalSettings$outboundSchema;
|
|
411
|
+
/** @deprecated use `RetrievalSettings$Outbound` instead. */
|
|
412
|
+
export type Outbound = RetrievalSettings$Outbound;
|
|
437
413
|
}
|
|
438
414
|
|
|
439
|
-
export function
|
|
440
|
-
|
|
415
|
+
export function retrievalSettingsToJSON(
|
|
416
|
+
retrievalSettings: RetrievalSettings,
|
|
441
417
|
): string {
|
|
442
418
|
return JSON.stringify(
|
|
443
|
-
|
|
444
|
-
updateKnowledgeRetrievalSettings,
|
|
445
|
-
),
|
|
419
|
+
RetrievalSettings$outboundSchema.parse(retrievalSettings),
|
|
446
420
|
);
|
|
447
421
|
}
|
|
448
422
|
|
|
449
|
-
export function
|
|
423
|
+
export function retrievalSettingsFromJSON(
|
|
450
424
|
jsonString: string,
|
|
451
|
-
): SafeParseResult<
|
|
425
|
+
): SafeParseResult<RetrievalSettings, SDKValidationError> {
|
|
452
426
|
return safeParse(
|
|
453
427
|
jsonString,
|
|
454
|
-
(x) =>
|
|
455
|
-
`Failed to parse '
|
|
428
|
+
(x) => RetrievalSettings$inboundSchema.parse(JSON.parse(x)),
|
|
429
|
+
`Failed to parse 'RetrievalSettings' from JSON`,
|
|
456
430
|
);
|
|
457
431
|
}
|
|
458
432
|
|
|
@@ -465,9 +439,7 @@ export const UpdateKnowledgeRequestBody$inboundSchema: z.ZodType<
|
|
|
465
439
|
description: z.nullable(z.string()).optional(),
|
|
466
440
|
embedding_model: z.string().optional(),
|
|
467
441
|
path: z.string().optional(),
|
|
468
|
-
retrieval_settings: z.lazy(() =>
|
|
469
|
-
UpdateKnowledgeRetrievalSettings$inboundSchema
|
|
470
|
-
).optional(),
|
|
442
|
+
retrieval_settings: z.lazy(() => RetrievalSettings$inboundSchema).optional(),
|
|
471
443
|
}).transform((v) => {
|
|
472
444
|
return remap$(v, {
|
|
473
445
|
"embedding_model": "embeddingModel",
|
|
@@ -480,7 +452,7 @@ export type UpdateKnowledgeRequestBody$Outbound = {
|
|
|
480
452
|
description?: string | null | undefined;
|
|
481
453
|
embedding_model?: string | undefined;
|
|
482
454
|
path?: string | undefined;
|
|
483
|
-
retrieval_settings?:
|
|
455
|
+
retrieval_settings?: RetrievalSettings$Outbound | undefined;
|
|
484
456
|
};
|
|
485
457
|
|
|
486
458
|
/** @internal */
|
|
@@ -492,9 +464,7 @@ export const UpdateKnowledgeRequestBody$outboundSchema: z.ZodType<
|
|
|
492
464
|
description: z.nullable(z.string()).optional(),
|
|
493
465
|
embeddingModel: z.string().optional(),
|
|
494
466
|
path: z.string().optional(),
|
|
495
|
-
retrievalSettings: z.lazy(() =>
|
|
496
|
-
UpdateKnowledgeRetrievalSettings$outboundSchema
|
|
497
|
-
).optional(),
|
|
467
|
+
retrievalSettings: z.lazy(() => RetrievalSettings$outboundSchema).optional(),
|
|
498
468
|
}).transform((v) => {
|
|
499
469
|
return remap$(v, {
|
|
500
470
|
embeddingModel: "embedding_model",
|
|
@@ -601,32 +571,29 @@ export function updateKnowledgeRequestFromJSON(
|
|
|
601
571
|
}
|
|
602
572
|
|
|
603
573
|
/** @internal */
|
|
604
|
-
export const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
);
|
|
574
|
+
export const UpdateKnowledgeRetrievalType$inboundSchema: z.ZodNativeEnum<
|
|
575
|
+
typeof UpdateKnowledgeRetrievalType
|
|
576
|
+
> = z.nativeEnum(UpdateKnowledgeRetrievalType);
|
|
608
577
|
|
|
609
578
|
/** @internal */
|
|
610
|
-
export const
|
|
611
|
-
|
|
612
|
-
|
|
579
|
+
export const UpdateKnowledgeRetrievalType$outboundSchema: z.ZodNativeEnum<
|
|
580
|
+
typeof UpdateKnowledgeRetrievalType
|
|
581
|
+
> = UpdateKnowledgeRetrievalType$inboundSchema;
|
|
613
582
|
|
|
614
583
|
/**
|
|
615
584
|
* @internal
|
|
616
585
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
617
586
|
*/
|
|
618
|
-
export namespace
|
|
619
|
-
/** @deprecated use `
|
|
620
|
-
export const inboundSchema =
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
export const outboundSchema =
|
|
624
|
-
UpdateKnowledgeKnowledgeRetrievalType$outboundSchema;
|
|
587
|
+
export namespace UpdateKnowledgeRetrievalType$ {
|
|
588
|
+
/** @deprecated use `UpdateKnowledgeRetrievalType$inboundSchema` instead. */
|
|
589
|
+
export const inboundSchema = UpdateKnowledgeRetrievalType$inboundSchema;
|
|
590
|
+
/** @deprecated use `UpdateKnowledgeRetrievalType$outboundSchema` instead. */
|
|
591
|
+
export const outboundSchema = UpdateKnowledgeRetrievalType$outboundSchema;
|
|
625
592
|
}
|
|
626
593
|
|
|
627
594
|
/** @internal */
|
|
628
|
-
export const
|
|
629
|
-
|
|
595
|
+
export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
|
|
596
|
+
UpdateKnowledgeRerankConfig,
|
|
630
597
|
z.ZodTypeDef,
|
|
631
598
|
unknown
|
|
632
599
|
> = z.object({
|
|
@@ -640,16 +607,16 @@ export const UpdateKnowledgeKnowledgeRerankConfig$inboundSchema: z.ZodType<
|
|
|
640
607
|
});
|
|
641
608
|
|
|
642
609
|
/** @internal */
|
|
643
|
-
export type
|
|
610
|
+
export type UpdateKnowledgeRerankConfig$Outbound = {
|
|
644
611
|
rerank_threshold: number;
|
|
645
612
|
rerank_model: string;
|
|
646
613
|
};
|
|
647
614
|
|
|
648
615
|
/** @internal */
|
|
649
|
-
export const
|
|
650
|
-
|
|
616
|
+
export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
|
|
617
|
+
UpdateKnowledgeRerankConfig$Outbound,
|
|
651
618
|
z.ZodTypeDef,
|
|
652
|
-
|
|
619
|
+
UpdateKnowledgeRerankConfig
|
|
653
620
|
> = z.object({
|
|
654
621
|
rerankThreshold: z.number().default(0.5),
|
|
655
622
|
rerankModel: z.string(),
|
|
@@ -664,41 +631,38 @@ export const UpdateKnowledgeKnowledgeRerankConfig$outboundSchema: z.ZodType<
|
|
|
664
631
|
* @internal
|
|
665
632
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
666
633
|
*/
|
|
667
|
-
export namespace
|
|
668
|
-
/** @deprecated use `
|
|
669
|
-
export const inboundSchema =
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
/** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$Outbound` instead. */
|
|
675
|
-
export type Outbound = UpdateKnowledgeKnowledgeRerankConfig$Outbound;
|
|
634
|
+
export namespace UpdateKnowledgeRerankConfig$ {
|
|
635
|
+
/** @deprecated use `UpdateKnowledgeRerankConfig$inboundSchema` instead. */
|
|
636
|
+
export const inboundSchema = UpdateKnowledgeRerankConfig$inboundSchema;
|
|
637
|
+
/** @deprecated use `UpdateKnowledgeRerankConfig$outboundSchema` instead. */
|
|
638
|
+
export const outboundSchema = UpdateKnowledgeRerankConfig$outboundSchema;
|
|
639
|
+
/** @deprecated use `UpdateKnowledgeRerankConfig$Outbound` instead. */
|
|
640
|
+
export type Outbound = UpdateKnowledgeRerankConfig$Outbound;
|
|
676
641
|
}
|
|
677
642
|
|
|
678
|
-
export function
|
|
679
|
-
|
|
643
|
+
export function updateKnowledgeRerankConfigToJSON(
|
|
644
|
+
updateKnowledgeRerankConfig: UpdateKnowledgeRerankConfig,
|
|
680
645
|
): string {
|
|
681
646
|
return JSON.stringify(
|
|
682
|
-
|
|
683
|
-
|
|
647
|
+
UpdateKnowledgeRerankConfig$outboundSchema.parse(
|
|
648
|
+
updateKnowledgeRerankConfig,
|
|
684
649
|
),
|
|
685
650
|
);
|
|
686
651
|
}
|
|
687
652
|
|
|
688
|
-
export function
|
|
653
|
+
export function updateKnowledgeRerankConfigFromJSON(
|
|
689
654
|
jsonString: string,
|
|
690
|
-
): SafeParseResult<
|
|
655
|
+
): SafeParseResult<UpdateKnowledgeRerankConfig, SDKValidationError> {
|
|
691
656
|
return safeParse(
|
|
692
657
|
jsonString,
|
|
693
|
-
(x) =>
|
|
694
|
-
|
|
695
|
-
`Failed to parse 'UpdateKnowledgeKnowledgeRerankConfig' from JSON`,
|
|
658
|
+
(x) => UpdateKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
|
|
659
|
+
`Failed to parse 'UpdateKnowledgeRerankConfig' from JSON`,
|
|
696
660
|
);
|
|
697
661
|
}
|
|
698
662
|
|
|
699
663
|
/** @internal */
|
|
700
|
-
export const
|
|
701
|
-
|
|
664
|
+
export const UpdateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
|
|
665
|
+
UpdateKnowledgeAgenticRagConfig,
|
|
702
666
|
z.ZodTypeDef,
|
|
703
667
|
unknown
|
|
704
668
|
> = z.object({
|
|
@@ -706,15 +670,15 @@ export const UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
|
|
|
706
670
|
});
|
|
707
671
|
|
|
708
672
|
/** @internal */
|
|
709
|
-
export type
|
|
673
|
+
export type UpdateKnowledgeAgenticRagConfig$Outbound = {
|
|
710
674
|
model: string;
|
|
711
675
|
};
|
|
712
676
|
|
|
713
677
|
/** @internal */
|
|
714
|
-
export const
|
|
715
|
-
|
|
678
|
+
export const UpdateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
|
|
679
|
+
UpdateKnowledgeAgenticRagConfig$Outbound,
|
|
716
680
|
z.ZodTypeDef,
|
|
717
|
-
|
|
681
|
+
UpdateKnowledgeAgenticRagConfig
|
|
718
682
|
> = z.object({
|
|
719
683
|
model: z.string(),
|
|
720
684
|
});
|
|
@@ -723,60 +687,51 @@ export const UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
|
|
|
723
687
|
* @internal
|
|
724
688
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
725
689
|
*/
|
|
726
|
-
export namespace
|
|
727
|
-
/** @deprecated use `
|
|
728
|
-
export const inboundSchema =
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
/** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound` instead. */
|
|
734
|
-
export type Outbound = UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound;
|
|
690
|
+
export namespace UpdateKnowledgeAgenticRagConfig$ {
|
|
691
|
+
/** @deprecated use `UpdateKnowledgeAgenticRagConfig$inboundSchema` instead. */
|
|
692
|
+
export const inboundSchema = UpdateKnowledgeAgenticRagConfig$inboundSchema;
|
|
693
|
+
/** @deprecated use `UpdateKnowledgeAgenticRagConfig$outboundSchema` instead. */
|
|
694
|
+
export const outboundSchema = UpdateKnowledgeAgenticRagConfig$outboundSchema;
|
|
695
|
+
/** @deprecated use `UpdateKnowledgeAgenticRagConfig$Outbound` instead. */
|
|
696
|
+
export type Outbound = UpdateKnowledgeAgenticRagConfig$Outbound;
|
|
735
697
|
}
|
|
736
698
|
|
|
737
|
-
export function
|
|
738
|
-
|
|
739
|
-
UpdateKnowledgeKnowledgeAgenticRagConfig,
|
|
699
|
+
export function updateKnowledgeAgenticRagConfigToJSON(
|
|
700
|
+
updateKnowledgeAgenticRagConfig: UpdateKnowledgeAgenticRagConfig,
|
|
740
701
|
): string {
|
|
741
702
|
return JSON.stringify(
|
|
742
|
-
|
|
743
|
-
|
|
703
|
+
UpdateKnowledgeAgenticRagConfig$outboundSchema.parse(
|
|
704
|
+
updateKnowledgeAgenticRagConfig,
|
|
744
705
|
),
|
|
745
706
|
);
|
|
746
707
|
}
|
|
747
708
|
|
|
748
|
-
export function
|
|
709
|
+
export function updateKnowledgeAgenticRagConfigFromJSON(
|
|
749
710
|
jsonString: string,
|
|
750
|
-
): SafeParseResult<
|
|
751
|
-
UpdateKnowledgeKnowledgeAgenticRagConfig,
|
|
752
|
-
SDKValidationError
|
|
753
|
-
> {
|
|
711
|
+
): SafeParseResult<UpdateKnowledgeAgenticRagConfig, SDKValidationError> {
|
|
754
712
|
return safeParse(
|
|
755
713
|
jsonString,
|
|
756
|
-
(x) =>
|
|
757
|
-
|
|
758
|
-
JSON.parse(x),
|
|
759
|
-
),
|
|
760
|
-
`Failed to parse 'UpdateKnowledgeKnowledgeAgenticRagConfig' from JSON`,
|
|
714
|
+
(x) => UpdateKnowledgeAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
|
|
715
|
+
`Failed to parse 'UpdateKnowledgeAgenticRagConfig' from JSON`,
|
|
761
716
|
);
|
|
762
717
|
}
|
|
763
718
|
|
|
764
719
|
/** @internal */
|
|
765
|
-
export const
|
|
766
|
-
|
|
720
|
+
export const UpdateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
|
|
721
|
+
UpdateKnowledgeRetrievalSettings,
|
|
767
722
|
z.ZodTypeDef,
|
|
768
723
|
unknown
|
|
769
724
|
> = z.object({
|
|
770
|
-
retrieval_type:
|
|
725
|
+
retrieval_type: UpdateKnowledgeRetrievalType$inboundSchema.default(
|
|
771
726
|
"hybrid_search",
|
|
772
727
|
),
|
|
773
728
|
top_k: z.number().int().default(5),
|
|
774
729
|
threshold: z.number().default(0),
|
|
775
730
|
rerank_config: z.nullable(
|
|
776
|
-
z.lazy(() =>
|
|
731
|
+
z.lazy(() => UpdateKnowledgeRerankConfig$inboundSchema),
|
|
777
732
|
).optional(),
|
|
778
733
|
agentic_rag_config: z.nullable(
|
|
779
|
-
z.lazy(() =>
|
|
734
|
+
z.lazy(() => UpdateKnowledgeAgenticRagConfig$inboundSchema),
|
|
780
735
|
).optional(),
|
|
781
736
|
}).transform((v) => {
|
|
782
737
|
return remap$(v, {
|
|
@@ -788,86 +743,73 @@ export const UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
|
|
|
788
743
|
});
|
|
789
744
|
|
|
790
745
|
/** @internal */
|
|
791
|
-
export type
|
|
746
|
+
export type UpdateKnowledgeRetrievalSettings$Outbound = {
|
|
792
747
|
retrieval_type: string;
|
|
793
748
|
top_k: number;
|
|
794
749
|
threshold: number;
|
|
795
|
-
rerank_config?:
|
|
796
|
-
| UpdateKnowledgeKnowledgeRerankConfig$Outbound
|
|
797
|
-
| null
|
|
798
|
-
| undefined;
|
|
750
|
+
rerank_config?: UpdateKnowledgeRerankConfig$Outbound | null | undefined;
|
|
799
751
|
agentic_rag_config?:
|
|
800
|
-
|
|
|
752
|
+
| UpdateKnowledgeAgenticRagConfig$Outbound
|
|
801
753
|
| null
|
|
802
754
|
| undefined;
|
|
803
755
|
};
|
|
804
756
|
|
|
805
757
|
/** @internal */
|
|
806
|
-
export const
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
agenticRagConfig: "agentic_rag_config",
|
|
829
|
-
});
|
|
758
|
+
export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
|
|
759
|
+
UpdateKnowledgeRetrievalSettings$Outbound,
|
|
760
|
+
z.ZodTypeDef,
|
|
761
|
+
UpdateKnowledgeRetrievalSettings
|
|
762
|
+
> = z.object({
|
|
763
|
+
retrievalType: UpdateKnowledgeRetrievalType$outboundSchema.default(
|
|
764
|
+
"hybrid_search",
|
|
765
|
+
),
|
|
766
|
+
topK: z.number().int().default(5),
|
|
767
|
+
threshold: z.number().default(0),
|
|
768
|
+
rerankConfig: z.nullable(
|
|
769
|
+
z.lazy(() => UpdateKnowledgeRerankConfig$outboundSchema),
|
|
770
|
+
).optional(),
|
|
771
|
+
agenticRagConfig: z.nullable(
|
|
772
|
+
z.lazy(() => UpdateKnowledgeAgenticRagConfig$outboundSchema),
|
|
773
|
+
).optional(),
|
|
774
|
+
}).transform((v) => {
|
|
775
|
+
return remap$(v, {
|
|
776
|
+
retrievalType: "retrieval_type",
|
|
777
|
+
topK: "top_k",
|
|
778
|
+
rerankConfig: "rerank_config",
|
|
779
|
+
agenticRagConfig: "agentic_rag_config",
|
|
830
780
|
});
|
|
781
|
+
});
|
|
831
782
|
|
|
832
783
|
/**
|
|
833
784
|
* @internal
|
|
834
785
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
835
786
|
*/
|
|
836
|
-
export namespace
|
|
837
|
-
/** @deprecated use `
|
|
838
|
-
export const inboundSchema =
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
/** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$Outbound` instead. */
|
|
844
|
-
export type Outbound = UpdateKnowledgeKnowledgeRetrievalSettings$Outbound;
|
|
787
|
+
export namespace UpdateKnowledgeRetrievalSettings$ {
|
|
788
|
+
/** @deprecated use `UpdateKnowledgeRetrievalSettings$inboundSchema` instead. */
|
|
789
|
+
export const inboundSchema = UpdateKnowledgeRetrievalSettings$inboundSchema;
|
|
790
|
+
/** @deprecated use `UpdateKnowledgeRetrievalSettings$outboundSchema` instead. */
|
|
791
|
+
export const outboundSchema = UpdateKnowledgeRetrievalSettings$outboundSchema;
|
|
792
|
+
/** @deprecated use `UpdateKnowledgeRetrievalSettings$Outbound` instead. */
|
|
793
|
+
export type Outbound = UpdateKnowledgeRetrievalSettings$Outbound;
|
|
845
794
|
}
|
|
846
795
|
|
|
847
|
-
export function
|
|
848
|
-
|
|
849
|
-
UpdateKnowledgeKnowledgeRetrievalSettings,
|
|
796
|
+
export function updateKnowledgeRetrievalSettingsToJSON(
|
|
797
|
+
updateKnowledgeRetrievalSettings: UpdateKnowledgeRetrievalSettings,
|
|
850
798
|
): string {
|
|
851
799
|
return JSON.stringify(
|
|
852
|
-
|
|
853
|
-
|
|
800
|
+
UpdateKnowledgeRetrievalSettings$outboundSchema.parse(
|
|
801
|
+
updateKnowledgeRetrievalSettings,
|
|
854
802
|
),
|
|
855
803
|
);
|
|
856
804
|
}
|
|
857
805
|
|
|
858
|
-
export function
|
|
806
|
+
export function updateKnowledgeRetrievalSettingsFromJSON(
|
|
859
807
|
jsonString: string,
|
|
860
|
-
): SafeParseResult<
|
|
861
|
-
UpdateKnowledgeKnowledgeRetrievalSettings,
|
|
862
|
-
SDKValidationError
|
|
863
|
-
> {
|
|
808
|
+
): SafeParseResult<UpdateKnowledgeRetrievalSettings, SDKValidationError> {
|
|
864
809
|
return safeParse(
|
|
865
810
|
jsonString,
|
|
866
|
-
(x) =>
|
|
867
|
-
|
|
868
|
-
JSON.parse(x),
|
|
869
|
-
),
|
|
870
|
-
`Failed to parse 'UpdateKnowledgeKnowledgeRetrievalSettings' from JSON`,
|
|
811
|
+
(x) => UpdateKnowledgeRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
|
|
812
|
+
`Failed to parse 'UpdateKnowledgeRetrievalSettings' from JSON`,
|
|
871
813
|
);
|
|
872
814
|
}
|
|
873
815
|
|
|
@@ -885,7 +827,7 @@ export const UpdateKnowledgeResponseBody$inboundSchema: z.ZodType<
|
|
|
885
827
|
domain_id: z.string(),
|
|
886
828
|
path: z.string().optional(),
|
|
887
829
|
retrieval_settings: z.lazy(() =>
|
|
888
|
-
|
|
830
|
+
UpdateKnowledgeRetrievalSettings$inboundSchema
|
|
889
831
|
).optional(),
|
|
890
832
|
created_by_id: z.nullable(z.string()).optional(),
|
|
891
833
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
@@ -909,9 +851,7 @@ export type UpdateKnowledgeResponseBody$Outbound = {
|
|
|
909
851
|
model: string;
|
|
910
852
|
domain_id: string;
|
|
911
853
|
path?: string | undefined;
|
|
912
|
-
retrieval_settings?:
|
|
913
|
-
| UpdateKnowledgeKnowledgeRetrievalSettings$Outbound
|
|
914
|
-
| undefined;
|
|
854
|
+
retrieval_settings?: UpdateKnowledgeRetrievalSettings$Outbound | undefined;
|
|
915
855
|
created_by_id?: string | null | undefined;
|
|
916
856
|
updated_by_id?: string | null | undefined;
|
|
917
857
|
updated: string;
|
|
@@ -931,7 +871,7 @@ export const UpdateKnowledgeResponseBody$outboundSchema: z.ZodType<
|
|
|
931
871
|
domainId: z.string(),
|
|
932
872
|
path: z.string().optional(),
|
|
933
873
|
retrievalSettings: z.lazy(() =>
|
|
934
|
-
|
|
874
|
+
UpdateKnowledgeRetrievalSettings$outboundSchema
|
|
935
875
|
).optional(),
|
|
936
876
|
createdById: z.nullable(z.string()).optional(),
|
|
937
877
|
updatedById: z.nullable(z.string()).optional(),
|