@orq-ai/node 4.15.0-rc.53 → 4.15.0-rc.55
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/FUNCTIONS.md +38 -3
- package/README.md +259 -72
- package/examples/deploymentsInvoke.example.ts +62 -0
- package/funcs/datasetsList.js +1 -0
- package/funcs/datasetsList.js.map +1 -1
- package/funcs/deploymentsInvoke.d.ts +18 -0
- package/funcs/deploymentsInvoke.d.ts.map +1 -0
- package/funcs/deploymentsInvoke.js +116 -0
- package/funcs/deploymentsInvoke.js.map +1 -0
- package/funcs/deploymentsStream.d.ts +18 -0
- package/funcs/deploymentsStream.d.ts.map +1 -0
- package/funcs/deploymentsStream.js +129 -0
- package/funcs/deploymentsStream.js.map +1 -0
- package/funcs/evalsAll.d.ts +2 -2
- package/funcs/evalsAll.d.ts.map +1 -1
- package/funcs/evalsAll.js +5 -2
- package/funcs/evalsAll.js.map +1 -1
- package/funcs/evalsCreate.d.ts +2 -1
- package/funcs/evalsCreate.d.ts.map +1 -1
- package/funcs/evalsCreate.js +19 -4
- package/funcs/evalsCreate.js.map +1 -1
- package/funcs/evalsDelete.d.ts +2 -2
- package/funcs/evalsDelete.d.ts.map +1 -1
- package/funcs/evalsDelete.js +6 -2
- package/funcs/evalsDelete.js.map +1 -1
- package/funcs/evalsGet.d.ts +2 -1
- package/funcs/evalsGet.d.ts.map +1 -1
- package/funcs/evalsGet.js +5 -1
- package/funcs/evalsGet.js.map +1 -1
- package/funcs/evalsUpdate.d.ts +2 -1
- package/funcs/evalsUpdate.d.ts.map +1 -1
- package/funcs/evalsUpdate.js +5 -1
- package/funcs/evalsUpdate.js.map +1 -1
- package/funcs/skillsUpdate.d.ts +1 -1
- package/funcs/skillsUpdate.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentresponserequest.d.ts +8 -8
- package/models/components/agentresponserequest.d.ts.map +1 -1
- package/models/components/agentresponserequest.js +10 -9
- package/models/components/agentresponserequest.js.map +1 -1
- package/models/components/agentthoughtstreamingevent.d.ts +12 -12
- package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
- package/models/components/agentthoughtstreamingevent.js +17 -17
- package/models/components/agentthoughtstreamingevent.js.map +1 -1
- package/models/components/chunkingconfiguration.d.ts +30 -30
- package/models/components/chunkingconfiguration.d.ts.map +1 -1
- package/models/components/chunkingconfiguration.js +36 -37
- package/models/components/chunkingconfiguration.js.map +1 -1
- package/models/components/evaluatorresponsefunction.d.ts +230 -0
- package/models/components/evaluatorresponsefunction.d.ts.map +1 -0
- package/models/components/evaluatorresponsefunction.js +420 -0
- package/models/components/evaluatorresponsefunction.js.map +1 -0
- package/models/components/evaluatorresponsehttp.d.ts +37 -0
- package/models/components/evaluatorresponsehttp.d.ts.map +1 -0
- package/models/components/evaluatorresponsehttp.js +77 -0
- package/models/components/evaluatorresponsehttp.js.map +1 -0
- package/models/components/evaluatorresponsejsonschema.d.ts +22 -0
- package/models/components/evaluatorresponsejsonschema.d.ts.map +1 -0
- package/models/components/{listevaluatorsresponse.js → evaluatorresponsejsonschema.js} +20 -16
- package/models/components/evaluatorresponsejsonschema.js.map +1 -0
- package/models/components/evaluatorresponsellm.d.ts +101 -0
- package/models/components/evaluatorresponsellm.d.ts.map +1 -0
- package/models/components/evaluatorresponsellm.js +181 -0
- package/models/components/evaluatorresponsellm.js.map +1 -0
- package/models/components/evaluatorresponsepython.d.ts +22 -0
- package/models/components/evaluatorresponsepython.d.ts.map +1 -0
- package/models/components/evaluatorresponsepython.js +67 -0
- package/models/components/evaluatorresponsepython.js.map +1 -0
- package/models/components/evaluatorresponseragas.d.ts +41 -0
- package/models/components/evaluatorresponseragas.d.ts.map +1 -0
- package/models/components/evaluatorresponseragas.js +86 -0
- package/models/components/evaluatorresponseragas.js.map +1 -0
- package/models/components/evaluatorresponsetypescript.d.ts +22 -0
- package/models/components/evaluatorresponsetypescript.d.ts.map +1 -0
- package/models/components/evaluatorresponsetypescript.js +67 -0
- package/models/components/evaluatorresponsetypescript.js.map +1 -0
- package/models/components/index.d.ts +8 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -2
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +1544 -0
- package/models/components/invokedeploymentrequest.d.ts.map +1 -0
- package/models/components/invokedeploymentrequest.js +1109 -0
- package/models/components/invokedeploymentrequest.js.map +1 -0
- package/models/components/queryreportrequest.d.ts +5 -5
- package/models/components/queryreportrequest.d.ts.map +1 -1
- package/models/components/queryreportrequest.js +6 -6
- package/models/components/queryreportrequest.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/searchknowledgerequest.d.ts +176 -176
- package/models/components/searchknowledgerequest.d.ts.map +1 -1
- package/models/components/searchknowledgerequest.js +211 -222
- package/models/components/searchknowledgerequest.js.map +1 -1
- package/models/components/updatememorystorerequest.d.ts +5 -0
- package/models/components/updatememorystorerequest.d.ts.map +1 -1
- package/models/components/updatememorystorerequest.js +6 -0
- package/models/components/updatememorystorerequest.js.map +1 -1
- package/models/components/updateskillrequest.d.ts +1 -1
- package/models/errors/createeval.d.ts +23 -0
- package/models/errors/createeval.d.ts.map +1 -0
- package/models/errors/createeval.js +68 -0
- package/models/errors/createeval.js.map +1 -0
- package/models/errors/deleteeval.d.ts +43 -0
- package/models/errors/deleteeval.d.ts.map +1 -0
- package/models/errors/deleteeval.js +94 -0
- package/models/errors/deleteeval.js.map +1 -0
- package/models/errors/geteval.d.ts +23 -0
- package/models/errors/geteval.d.ts.map +1 -0
- package/models/errors/geteval.js +68 -0
- package/models/errors/geteval.js.map +1 -0
- package/models/errors/getevals.d.ts +23 -0
- package/models/errors/getevals.d.ts.map +1 -0
- package/models/{components/deleteevaluatorresponse.js → errors/getevals.js} +28 -8
- package/models/errors/getevals.js.map +1 -0
- package/models/errors/index.d.ts +5 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +5 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/updateeval.d.ts +23 -0
- package/models/errors/updateeval.d.ts.map +1 -0
- package/models/errors/updateeval.js +68 -0
- package/models/errors/updateeval.js.map +1 -0
- package/models/operations/createchatcompletion.d.ts +58 -58
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +81 -80
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createeval.d.ts +305 -4
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +258 -3
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createprompt.d.ts +4 -4
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +5 -6
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.d.ts +4 -4
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +9 -9
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +442 -442
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +481 -485
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +367 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -0
- package/models/operations/deploymentinvoke.js +373 -0
- package/models/operations/deploymentinvoke.js.map +1 -0
- package/models/operations/deployments.d.ts +16 -16
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +16 -18
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1899 -0
- package/models/operations/deploymentstream.d.ts.map +1 -0
- package/models/operations/deploymentstream.js +1488 -0
- package/models/operations/deploymentstream.js.map +1 -0
- package/models/operations/getalltools.js +4 -4
- package/models/operations/geteval.d.ts +804 -2
- package/models/operations/geteval.d.ts.map +1 -1
- package/models/operations/geteval.js +1244 -2
- package/models/operations/geteval.js.map +1 -1
- package/models/operations/getevals.d.ts +41 -3
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +52 -3
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.d.ts +5 -0
- package/models/operations/listdatasets.d.ts.map +1 -1
- package/models/operations/listdatasets.js +3 -1
- package/models/operations/listdatasets.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updateeval.d.ts +194 -6
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +155 -4
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +7 -7
- package/sdk/deployments.d.ts +16 -0
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +20 -0
- package/sdk/deployments.js.map +1 -1
- package/sdk/evals.d.ts +3 -3
- package/sdk/evals.d.ts.map +1 -1
- package/sdk/evals.js.map +1 -1
- package/sdk/skills.d.ts +1 -1
- package/sdk/skills.js +1 -1
- package/src/funcs/datasetsList.ts +1 -0
- package/src/funcs/deploymentsInvoke.ts +170 -0
- package/src/funcs/deploymentsStream.ts +180 -0
- package/src/funcs/evalsAll.ts +14 -6
- package/src/funcs/evalsCreate.ts +31 -5
- package/src/funcs/evalsDelete.ts +19 -6
- package/src/funcs/evalsGet.ts +10 -1
- package/src/funcs/evalsUpdate.ts +10 -1
- package/src/funcs/skillsUpdate.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentresponserequest.ts +17 -12
- package/src/models/components/agentthoughtstreamingevent.ts +55 -43
- package/src/models/components/chunkingconfiguration.ts +150 -110
- package/src/models/components/evaluatorresponsefunction.ts +928 -0
- package/src/models/components/evaluatorresponsehttp.ts +77 -0
- package/src/models/components/evaluatorresponsejsonschema.ts +60 -0
- package/src/models/components/evaluatorresponsellm.ts +310 -0
- package/src/models/components/evaluatorresponsepython.ts +60 -0
- package/src/models/components/evaluatorresponseragas.ts +84 -0
- package/src/models/components/evaluatorresponsetypescript.ts +60 -0
- package/src/models/components/index.ts +8 -2
- package/src/models/components/invokedeploymentrequest.ts +3444 -0
- package/src/models/components/queryreportrequest.ts +11 -10
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/searchknowledgerequest.ts +680 -469
- package/src/models/components/updatememorystorerequest.ts +11 -0
- package/src/models/components/updateskillrequest.ts +1 -1
- package/src/models/errors/createeval.ts +51 -0
- package/src/models/errors/deleteeval.ts +96 -0
- package/src/models/errors/geteval.ts +51 -0
- package/src/models/errors/getevals.ts +51 -0
- package/src/models/errors/index.ts +5 -0
- package/src/models/errors/updateeval.ts +51 -0
- package/src/models/operations/createchatcompletion.ts +313 -248
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createeval.ts +628 -6
- package/src/models/operations/createprompt.ts +7 -6
- package/src/models/operations/createtool.ts +13 -11
- package/src/models/operations/deploymentgetconfig.ts +1631 -1141
- package/src/models/operations/deploymentinvoke.ts +732 -0
- package/src/models/operations/deployments.ts +46 -42
- package/src/models/operations/deploymentstream.ts +4102 -0
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/geteval.ts +2751 -3
- package/src/models/operations/getevals.ts +123 -5
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +8 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updateeval.ts +393 -9
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/deployments.ts +38 -0
- package/src/sdk/evals.ts +3 -3
- package/src/sdk/skills.ts +1 -1
- package/examples/deploymentsList.example.ts +0 -26
- package/models/components/deleteevaluatorresponse.d.ts +0 -8
- package/models/components/deleteevaluatorresponse.d.ts.map +0 -1
- package/models/components/deleteevaluatorresponse.js.map +0 -1
- package/models/components/listevaluatorsresponse.d.ts +0 -16
- package/models/components/listevaluatorsresponse.d.ts.map +0 -1
- package/models/components/listevaluatorsresponse.js.map +0 -1
- package/src/models/components/deleteevaluatorresponse.ts +0 -27
- package/src/models/components/listevaluatorsresponse.ts +0 -59
|
@@ -9,7 +9,7 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* Asks a model to choose the boundaries. Slowest and most expensive, best on documents with irregular structure. Makes paid model calls.
|
|
11
11
|
*/
|
|
12
|
-
export type
|
|
12
|
+
export type ChunkingConfiguration9 = {
|
|
13
13
|
type: "agentic";
|
|
14
14
|
/**
|
|
15
15
|
* Maximum number of tokens per chunk.
|
|
@@ -36,7 +36,7 @@ export type Nine = {
|
|
|
36
36
|
/**
|
|
37
37
|
* Embeds the document before splitting it recursively, so each chunk is embedded with the surrounding document in context. Makes paid embedding calls.
|
|
38
38
|
*/
|
|
39
|
-
export type
|
|
39
|
+
export type ChunkingConfiguration8 = {
|
|
40
40
|
type: "late";
|
|
41
41
|
/**
|
|
42
42
|
* Maximum number of tokens per chunk.
|
|
@@ -77,7 +77,7 @@ export type ChunkingConfigurationMode = ClosedEnum<
|
|
|
77
77
|
/**
|
|
78
78
|
* Embeds the text and breaks where meaning shifts, so related passages stay together. Makes paid embedding calls.
|
|
79
79
|
*/
|
|
80
|
-
export type
|
|
80
|
+
export type ChunkingConfiguration7 = {
|
|
81
81
|
type: "semantic";
|
|
82
82
|
/**
|
|
83
83
|
* Maximum number of tokens per chunk.
|
|
@@ -108,7 +108,7 @@ export type Seven = {
|
|
|
108
108
|
/**
|
|
109
109
|
* Splits on delimiters or a regular expression without tokenizing. Fastest option; chunk sizes vary with where delimiters fall.
|
|
110
110
|
*/
|
|
111
|
-
export type
|
|
111
|
+
export type ChunkingConfiguration6 = {
|
|
112
112
|
type: "fast";
|
|
113
113
|
/**
|
|
114
114
|
* Target chunk size in bytes.
|
|
@@ -139,7 +139,7 @@ export type Six = {
|
|
|
139
139
|
/**
|
|
140
140
|
* Splits on a separator hierarchy, falling back through paragraph, line, sentence, and word boundaries until chunks fit. Respects document structure.
|
|
141
141
|
*/
|
|
142
|
-
export type
|
|
142
|
+
export type ChunkingConfiguration5 = {
|
|
143
143
|
type: "recursive";
|
|
144
144
|
/**
|
|
145
145
|
* Maximum number of tokens per chunk.
|
|
@@ -158,7 +158,7 @@ export type Five = {
|
|
|
158
158
|
/**
|
|
159
159
|
* Groups whole sentences up to the chunk size, so chunks never cut a sentence in half.
|
|
160
160
|
*/
|
|
161
|
-
export type
|
|
161
|
+
export type ChunkingConfiguration4 = {
|
|
162
162
|
type: "sentence";
|
|
163
163
|
/**
|
|
164
164
|
* Maximum number of tokens per chunk.
|
|
@@ -177,7 +177,7 @@ export type Four = {
|
|
|
177
177
|
/**
|
|
178
178
|
* Splits text into fixed-size token windows with optional overlap. Predictable chunk sizes, no regard for sentence or paragraph boundaries.
|
|
179
179
|
*/
|
|
180
|
-
export type
|
|
180
|
+
export type ChunkingConfiguration3 = {
|
|
181
181
|
type: "token";
|
|
182
182
|
/**
|
|
183
183
|
* Maximum number of tokens per chunk.
|
|
@@ -221,16 +221,16 @@ export type ChunkingConfiguration1 = {
|
|
|
221
221
|
export type ChunkingConfiguration =
|
|
222
222
|
| ChunkingConfiguration1
|
|
223
223
|
| ChunkingConfiguration2
|
|
224
|
-
|
|
|
225
|
-
|
|
|
226
|
-
|
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
224
|
+
| ChunkingConfiguration3
|
|
225
|
+
| ChunkingConfiguration4
|
|
226
|
+
| ChunkingConfiguration5
|
|
227
|
+
| ChunkingConfiguration6
|
|
228
|
+
| ChunkingConfiguration7
|
|
229
|
+
| ChunkingConfiguration8
|
|
230
|
+
| ChunkingConfiguration9;
|
|
231
231
|
|
|
232
232
|
/** @internal */
|
|
233
|
-
export type
|
|
233
|
+
export type ChunkingConfiguration9$Outbound = {
|
|
234
234
|
type: "agentic";
|
|
235
235
|
chunk_size: number;
|
|
236
236
|
model: string;
|
|
@@ -240,29 +240,36 @@ export type Nine$Outbound = {
|
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
/** @internal */
|
|
243
|
-
export const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
243
|
+
export const ChunkingConfiguration9$outboundSchema: z.ZodType<
|
|
244
|
+
ChunkingConfiguration9$Outbound,
|
|
245
|
+
z.ZodTypeDef,
|
|
246
|
+
ChunkingConfiguration9
|
|
247
|
+
> = z.object({
|
|
248
|
+
type: z.literal("agentic"),
|
|
249
|
+
chunkSize: z.number().int().default(1024),
|
|
250
|
+
model: z.string().default("openai/gpt-4o"),
|
|
251
|
+
candidateSize: z.number().int().default(128),
|
|
252
|
+
minCharactersPerChunk: z.number().int().default(24),
|
|
253
|
+
systemPrompt: z.string().optional(),
|
|
254
|
+
}).transform((v) => {
|
|
255
|
+
return remap$(v, {
|
|
256
|
+
chunkSize: "chunk_size",
|
|
257
|
+
candidateSize: "candidate_size",
|
|
258
|
+
minCharactersPerChunk: "min_characters_per_chunk",
|
|
259
|
+
systemPrompt: "system_prompt",
|
|
258
260
|
});
|
|
261
|
+
});
|
|
259
262
|
|
|
260
|
-
export function
|
|
261
|
-
|
|
263
|
+
export function chunkingConfiguration9ToJSON(
|
|
264
|
+
chunkingConfiguration9: ChunkingConfiguration9,
|
|
265
|
+
): string {
|
|
266
|
+
return JSON.stringify(
|
|
267
|
+
ChunkingConfiguration9$outboundSchema.parse(chunkingConfiguration9),
|
|
268
|
+
);
|
|
262
269
|
}
|
|
263
270
|
|
|
264
271
|
/** @internal */
|
|
265
|
-
export type
|
|
272
|
+
export type ChunkingConfiguration8$Outbound = {
|
|
266
273
|
type: "late";
|
|
267
274
|
chunk_size: number;
|
|
268
275
|
separators?: Array<string> | undefined;
|
|
@@ -272,10 +279,10 @@ export type Eight$Outbound = {
|
|
|
272
279
|
};
|
|
273
280
|
|
|
274
281
|
/** @internal */
|
|
275
|
-
export const
|
|
276
|
-
|
|
282
|
+
export const ChunkingConfiguration8$outboundSchema: z.ZodType<
|
|
283
|
+
ChunkingConfiguration8$Outbound,
|
|
277
284
|
z.ZodTypeDef,
|
|
278
|
-
|
|
285
|
+
ChunkingConfiguration8
|
|
279
286
|
> = z.object({
|
|
280
287
|
type: z.literal("late"),
|
|
281
288
|
chunkSize: z.number().int().default(512),
|
|
@@ -291,8 +298,12 @@ export const Eight$outboundSchema: z.ZodType<
|
|
|
291
298
|
});
|
|
292
299
|
});
|
|
293
300
|
|
|
294
|
-
export function
|
|
295
|
-
|
|
301
|
+
export function chunkingConfiguration8ToJSON(
|
|
302
|
+
chunkingConfiguration8: ChunkingConfiguration8,
|
|
303
|
+
): string {
|
|
304
|
+
return JSON.stringify(
|
|
305
|
+
ChunkingConfiguration8$outboundSchema.parse(chunkingConfiguration8),
|
|
306
|
+
);
|
|
296
307
|
}
|
|
297
308
|
|
|
298
309
|
/** @internal */
|
|
@@ -301,7 +312,7 @@ export const ChunkingConfigurationMode$outboundSchema: z.ZodNativeEnum<
|
|
|
301
312
|
> = z.nativeEnum(ChunkingConfigurationMode);
|
|
302
313
|
|
|
303
314
|
/** @internal */
|
|
304
|
-
export type
|
|
315
|
+
export type ChunkingConfiguration7$Outbound = {
|
|
305
316
|
type: "semantic";
|
|
306
317
|
chunk_size: number;
|
|
307
318
|
embedding_model?: string | undefined;
|
|
@@ -312,10 +323,10 @@ export type Seven$Outbound = {
|
|
|
312
323
|
};
|
|
313
324
|
|
|
314
325
|
/** @internal */
|
|
315
|
-
export const
|
|
316
|
-
|
|
326
|
+
export const ChunkingConfiguration7$outboundSchema: z.ZodType<
|
|
327
|
+
ChunkingConfiguration7$Outbound,
|
|
317
328
|
z.ZodTypeDef,
|
|
318
|
-
|
|
329
|
+
ChunkingConfiguration7
|
|
319
330
|
> = z.object({
|
|
320
331
|
type: z.literal("semantic"),
|
|
321
332
|
chunkSize: z.number().int().default(512),
|
|
@@ -332,12 +343,16 @@ export const Seven$outboundSchema: z.ZodType<
|
|
|
332
343
|
});
|
|
333
344
|
});
|
|
334
345
|
|
|
335
|
-
export function
|
|
336
|
-
|
|
346
|
+
export function chunkingConfiguration7ToJSON(
|
|
347
|
+
chunkingConfiguration7: ChunkingConfiguration7,
|
|
348
|
+
): string {
|
|
349
|
+
return JSON.stringify(
|
|
350
|
+
ChunkingConfiguration7$outboundSchema.parse(chunkingConfiguration7),
|
|
351
|
+
);
|
|
337
352
|
}
|
|
338
353
|
|
|
339
354
|
/** @internal */
|
|
340
|
-
export type
|
|
355
|
+
export type ChunkingConfiguration6$Outbound = {
|
|
341
356
|
type: "fast";
|
|
342
357
|
target_size: number;
|
|
343
358
|
delimiters: string;
|
|
@@ -348,28 +363,35 @@ export type Six$Outbound = {
|
|
|
348
363
|
};
|
|
349
364
|
|
|
350
365
|
/** @internal */
|
|
351
|
-
export const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
366
|
+
export const ChunkingConfiguration6$outboundSchema: z.ZodType<
|
|
367
|
+
ChunkingConfiguration6$Outbound,
|
|
368
|
+
z.ZodTypeDef,
|
|
369
|
+
ChunkingConfiguration6
|
|
370
|
+
> = z.object({
|
|
371
|
+
type: z.literal("fast"),
|
|
372
|
+
targetSize: z.number().int().default(4096),
|
|
373
|
+
delimiters: z.string().default("\n.?"),
|
|
374
|
+
pattern: z.string().optional(),
|
|
375
|
+
prefix: z.boolean().default(false),
|
|
376
|
+
consecutive: z.boolean().default(false),
|
|
377
|
+
forwardFallback: z.boolean().default(false),
|
|
378
|
+
}).transform((v) => {
|
|
379
|
+
return remap$(v, {
|
|
380
|
+
targetSize: "target_size",
|
|
381
|
+
forwardFallback: "forward_fallback",
|
|
365
382
|
});
|
|
383
|
+
});
|
|
366
384
|
|
|
367
|
-
export function
|
|
368
|
-
|
|
385
|
+
export function chunkingConfiguration6ToJSON(
|
|
386
|
+
chunkingConfiguration6: ChunkingConfiguration6,
|
|
387
|
+
): string {
|
|
388
|
+
return JSON.stringify(
|
|
389
|
+
ChunkingConfiguration6$outboundSchema.parse(chunkingConfiguration6),
|
|
390
|
+
);
|
|
369
391
|
}
|
|
370
392
|
|
|
371
393
|
/** @internal */
|
|
372
|
-
export type
|
|
394
|
+
export type ChunkingConfiguration5$Outbound = {
|
|
373
395
|
type: "recursive";
|
|
374
396
|
chunk_size: number;
|
|
375
397
|
separators?: Array<string> | undefined;
|
|
@@ -377,25 +399,32 @@ export type Five$Outbound = {
|
|
|
377
399
|
};
|
|
378
400
|
|
|
379
401
|
/** @internal */
|
|
380
|
-
export const
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
402
|
+
export const ChunkingConfiguration5$outboundSchema: z.ZodType<
|
|
403
|
+
ChunkingConfiguration5$Outbound,
|
|
404
|
+
z.ZodTypeDef,
|
|
405
|
+
ChunkingConfiguration5
|
|
406
|
+
> = z.object({
|
|
407
|
+
type: z.literal("recursive"),
|
|
408
|
+
chunkSize: z.number().int().default(512),
|
|
409
|
+
separators: z.array(z.string()).optional(),
|
|
410
|
+
minCharactersPerChunk: z.number().int().default(24),
|
|
411
|
+
}).transform((v) => {
|
|
412
|
+
return remap$(v, {
|
|
413
|
+
chunkSize: "chunk_size",
|
|
414
|
+
minCharactersPerChunk: "min_characters_per_chunk",
|
|
391
415
|
});
|
|
416
|
+
});
|
|
392
417
|
|
|
393
|
-
export function
|
|
394
|
-
|
|
418
|
+
export function chunkingConfiguration5ToJSON(
|
|
419
|
+
chunkingConfiguration5: ChunkingConfiguration5,
|
|
420
|
+
): string {
|
|
421
|
+
return JSON.stringify(
|
|
422
|
+
ChunkingConfiguration5$outboundSchema.parse(chunkingConfiguration5),
|
|
423
|
+
);
|
|
395
424
|
}
|
|
396
425
|
|
|
397
426
|
/** @internal */
|
|
398
|
-
export type
|
|
427
|
+
export type ChunkingConfiguration4$Outbound = {
|
|
399
428
|
type: "sentence";
|
|
400
429
|
chunk_size: number;
|
|
401
430
|
chunk_overlap: number;
|
|
@@ -403,36 +432,43 @@ export type Four$Outbound = {
|
|
|
403
432
|
};
|
|
404
433
|
|
|
405
434
|
/** @internal */
|
|
406
|
-
export const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
435
|
+
export const ChunkingConfiguration4$outboundSchema: z.ZodType<
|
|
436
|
+
ChunkingConfiguration4$Outbound,
|
|
437
|
+
z.ZodTypeDef,
|
|
438
|
+
ChunkingConfiguration4
|
|
439
|
+
> = z.object({
|
|
440
|
+
type: z.literal("sentence"),
|
|
441
|
+
chunkSize: z.number().int().default(512),
|
|
442
|
+
chunkOverlap: z.number().int().default(0),
|
|
443
|
+
minSentencesPerChunk: z.number().int().default(1),
|
|
444
|
+
}).transform((v) => {
|
|
445
|
+
return remap$(v, {
|
|
446
|
+
chunkSize: "chunk_size",
|
|
447
|
+
chunkOverlap: "chunk_overlap",
|
|
448
|
+
minSentencesPerChunk: "min_sentences_per_chunk",
|
|
418
449
|
});
|
|
450
|
+
});
|
|
419
451
|
|
|
420
|
-
export function
|
|
421
|
-
|
|
452
|
+
export function chunkingConfiguration4ToJSON(
|
|
453
|
+
chunkingConfiguration4: ChunkingConfiguration4,
|
|
454
|
+
): string {
|
|
455
|
+
return JSON.stringify(
|
|
456
|
+
ChunkingConfiguration4$outboundSchema.parse(chunkingConfiguration4),
|
|
457
|
+
);
|
|
422
458
|
}
|
|
423
459
|
|
|
424
460
|
/** @internal */
|
|
425
|
-
export type
|
|
461
|
+
export type ChunkingConfiguration3$Outbound = {
|
|
426
462
|
type: "token";
|
|
427
463
|
chunk_size: number;
|
|
428
464
|
chunk_overlap: number;
|
|
429
465
|
};
|
|
430
466
|
|
|
431
467
|
/** @internal */
|
|
432
|
-
export const
|
|
433
|
-
|
|
468
|
+
export const ChunkingConfiguration3$outboundSchema: z.ZodType<
|
|
469
|
+
ChunkingConfiguration3$Outbound,
|
|
434
470
|
z.ZodTypeDef,
|
|
435
|
-
|
|
471
|
+
ChunkingConfiguration3
|
|
436
472
|
> = z.object({
|
|
437
473
|
type: z.literal("token"),
|
|
438
474
|
chunkSize: z.number().int().default(512),
|
|
@@ -444,8 +480,12 @@ export const Three$outboundSchema: z.ZodType<
|
|
|
444
480
|
});
|
|
445
481
|
});
|
|
446
482
|
|
|
447
|
-
export function
|
|
448
|
-
|
|
483
|
+
export function chunkingConfiguration3ToJSON(
|
|
484
|
+
chunkingConfiguration3: ChunkingConfiguration3,
|
|
485
|
+
): string {
|
|
486
|
+
return JSON.stringify(
|
|
487
|
+
ChunkingConfiguration3$outboundSchema.parse(chunkingConfiguration3),
|
|
488
|
+
);
|
|
449
489
|
}
|
|
450
490
|
|
|
451
491
|
/** @internal */
|
|
@@ -505,13 +545,13 @@ export function chunkingConfiguration1ToJSON(
|
|
|
505
545
|
export type ChunkingConfiguration$Outbound =
|
|
506
546
|
| ChunkingConfiguration1$Outbound
|
|
507
547
|
| ChunkingConfiguration2$Outbound
|
|
508
|
-
|
|
|
509
|
-
|
|
|
510
|
-
|
|
|
511
|
-
|
|
|
512
|
-
|
|
|
513
|
-
|
|
|
514
|
-
|
|
|
548
|
+
| ChunkingConfiguration3$Outbound
|
|
549
|
+
| ChunkingConfiguration4$Outbound
|
|
550
|
+
| ChunkingConfiguration5$Outbound
|
|
551
|
+
| ChunkingConfiguration6$Outbound
|
|
552
|
+
| ChunkingConfiguration7$Outbound
|
|
553
|
+
| ChunkingConfiguration8$Outbound
|
|
554
|
+
| ChunkingConfiguration9$Outbound;
|
|
515
555
|
|
|
516
556
|
/** @internal */
|
|
517
557
|
export const ChunkingConfiguration$outboundSchema: z.ZodType<
|
|
@@ -521,13 +561,13 @@ export const ChunkingConfiguration$outboundSchema: z.ZodType<
|
|
|
521
561
|
> = z.union([
|
|
522
562
|
z.lazy(() => ChunkingConfiguration1$outboundSchema),
|
|
523
563
|
z.lazy(() => ChunkingConfiguration2$outboundSchema),
|
|
524
|
-
z.lazy(() =>
|
|
525
|
-
z.lazy(() =>
|
|
526
|
-
z.lazy(() =>
|
|
527
|
-
z.lazy(() =>
|
|
528
|
-
z.lazy(() =>
|
|
529
|
-
z.lazy(() =>
|
|
530
|
-
z.lazy(() =>
|
|
564
|
+
z.lazy(() => ChunkingConfiguration3$outboundSchema),
|
|
565
|
+
z.lazy(() => ChunkingConfiguration4$outboundSchema),
|
|
566
|
+
z.lazy(() => ChunkingConfiguration5$outboundSchema),
|
|
567
|
+
z.lazy(() => ChunkingConfiguration6$outboundSchema),
|
|
568
|
+
z.lazy(() => ChunkingConfiguration7$outboundSchema),
|
|
569
|
+
z.lazy(() => ChunkingConfiguration8$outboundSchema),
|
|
570
|
+
z.lazy(() => ChunkingConfiguration9$outboundSchema),
|
|
531
571
|
]);
|
|
532
572
|
|
|
533
573
|
export function chunkingConfigurationToJSON(
|