@orq-ai/node 3.9.4 → 3.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +2 -5
  2. package/bin/mcp-server.js +560 -866
  3. package/bin/mcp-server.js.map +36 -36
  4. package/docs/sdks/knowledge/README.md +77 -0
  5. package/examples/README.md +26 -0
  6. package/examples/contactsCreate.example.ts +40 -0
  7. package/examples/package-lock.json +626 -0
  8. package/examples/package.json +18 -0
  9. package/funcs/deploymentsStream.js +7 -7
  10. package/funcs/deploymentsStream.js.map +1 -1
  11. package/funcs/{knowledgeBasesChunkText.d.ts → knowledgeCreate.d.ts} +3 -6
  12. package/funcs/knowledgeCreate.d.ts.map +1 -0
  13. package/funcs/{knowledgeBasesChunkText.js → knowledgeCreate.js} +7 -10
  14. package/funcs/knowledgeCreate.js.map +1 -0
  15. package/jsr.json +1 -1
  16. package/lib/config.d.ts +3 -3
  17. package/lib/config.js +3 -3
  18. package/lib/event-streams.d.ts +4 -10
  19. package/lib/event-streams.d.ts.map +1 -1
  20. package/lib/event-streams.js +110 -194
  21. package/lib/event-streams.js.map +1 -1
  22. package/lib/matchers.d.ts.map +1 -1
  23. package/lib/matchers.js +1 -4
  24. package/lib/matchers.js.map +1 -1
  25. package/mcp-server/mcp-server.js +1 -1
  26. package/mcp-server/server.js +3 -3
  27. package/mcp-server/server.js.map +1 -1
  28. package/mcp-server/tools/knowledgeCreate.d.ts +8 -0
  29. package/mcp-server/tools/knowledgeCreate.d.ts.map +1 -0
  30. package/mcp-server/tools/{knowledgeBasesChunkText.js → knowledgeCreate.js} +8 -10
  31. package/mcp-server/tools/knowledgeCreate.js.map +1 -0
  32. package/models/operations/createcontact.js +2 -2
  33. package/models/operations/createdataset.js +2 -2
  34. package/models/operations/createdatasetitem.js +2 -2
  35. package/models/operations/createdatasource.js +2 -2
  36. package/models/operations/createeval.js +16 -16
  37. package/models/operations/createknowledge.d.ts +426 -0
  38. package/models/operations/createknowledge.d.ts.map +1 -0
  39. package/models/operations/createknowledge.js +431 -0
  40. package/models/operations/createknowledge.js.map +1 -0
  41. package/models/operations/fileget.js +2 -2
  42. package/models/operations/filelist.js +2 -2
  43. package/models/operations/fileupload.js +2 -2
  44. package/models/operations/getevals.js +28 -28
  45. package/models/operations/index.d.ts +1 -1
  46. package/models/operations/index.d.ts.map +1 -1
  47. package/models/operations/index.js +1 -1
  48. package/models/operations/index.js.map +1 -1
  49. package/models/operations/listcontacts.js +2 -2
  50. package/models/operations/listdatasetdatapoints.js +2 -2
  51. package/models/operations/listdatasets.js +2 -2
  52. package/models/operations/listdatasources.js +2 -2
  53. package/models/operations/retrievecontact.js +2 -2
  54. package/models/operations/retrievedatapoint.js +2 -2
  55. package/models/operations/retrievedataset.js +2 -2
  56. package/models/operations/retrievedatasource.js +2 -2
  57. package/models/operations/updatecontact.js +2 -2
  58. package/models/operations/updatedatapoint.js +2 -2
  59. package/models/operations/updatedataset.js +2 -2
  60. package/models/operations/updatedatasource.js +2 -2
  61. package/models/operations/updateeval.js +16 -16
  62. package/models/operations/updateknowledge.d.ts +106 -106
  63. package/models/operations/updateknowledge.d.ts.map +1 -1
  64. package/models/operations/updateknowledge.js +125 -129
  65. package/models/operations/updateknowledge.js.map +1 -1
  66. package/package.json +1 -1
  67. package/packages/orq-rc/examples/README.md +26 -0
  68. package/packages/orq-rc/examples/contactsCreate.example.ts +40 -0
  69. package/packages/orq-rc/examples/package-lock.json +626 -0
  70. package/packages/orq-rc/examples/package.json +18 -0
  71. package/packages/orq-rc/jsr.json +1 -1
  72. package/packages/orq-rc/package-lock.json +2 -2
  73. package/packages/orq-rc/package.json +1 -1
  74. package/packages/orq-rc/src/funcs/deploymentsStream.ts +7 -8
  75. package/packages/orq-rc/src/lib/config.ts +3 -3
  76. package/packages/orq-rc/src/lib/event-streams.ts +114 -231
  77. package/packages/orq-rc/src/lib/matchers.ts +1 -4
  78. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  79. package/packages/orq-rc/src/mcp-server/server.ts +1 -1
  80. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  85. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  86. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  87. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  88. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  89. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  91. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  95. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
  102. package/sdk/knowledge.d.ts +4 -0
  103. package/sdk/knowledge.d.ts.map +1 -1
  104. package/sdk/knowledge.js +7 -0
  105. package/sdk/knowledge.js.map +1 -1
  106. package/sdk/sdk.d.ts +0 -3
  107. package/sdk/sdk.d.ts.map +1 -1
  108. package/sdk/sdk.js +0 -4
  109. package/sdk/sdk.js.map +1 -1
  110. package/src/funcs/deploymentsStream.ts +7 -8
  111. package/src/funcs/{knowledgeBasesChunkText.ts → knowledgeCreate.ts} +11 -13
  112. package/src/lib/config.ts +3 -3
  113. package/src/lib/event-streams.ts +114 -231
  114. package/src/lib/matchers.ts +1 -4
  115. package/src/mcp-server/mcp-server.ts +1 -1
  116. package/src/mcp-server/server.ts +3 -3
  117. package/src/mcp-server/tools/knowledgeCreate.ts +35 -0
  118. package/src/models/operations/createcontact.ts +2 -2
  119. package/src/models/operations/createdataset.ts +2 -2
  120. package/src/models/operations/createdatasetitem.ts +2 -2
  121. package/src/models/operations/createdatasource.ts +2 -2
  122. package/src/models/operations/createeval.ts +16 -16
  123. package/src/models/operations/createknowledge.ts +846 -0
  124. package/src/models/operations/fileget.ts +2 -2
  125. package/src/models/operations/filelist.ts +2 -2
  126. package/src/models/operations/fileupload.ts +2 -2
  127. package/src/models/operations/getevals.ts +28 -28
  128. package/src/models/operations/index.ts +1 -1
  129. package/src/models/operations/listcontacts.ts +2 -2
  130. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  131. package/src/models/operations/listdatasets.ts +2 -2
  132. package/src/models/operations/listdatasources.ts +2 -2
  133. package/src/models/operations/retrievecontact.ts +2 -2
  134. package/src/models/operations/retrievedatapoint.ts +2 -2
  135. package/src/models/operations/retrievedataset.ts +2 -2
  136. package/src/models/operations/retrievedatasource.ts +2 -2
  137. package/src/models/operations/updatecontact.ts +2 -2
  138. package/src/models/operations/updatedatapoint.ts +2 -2
  139. package/src/models/operations/updatedataset.ts +2 -2
  140. package/src/models/operations/updatedatasource.ts +2 -2
  141. package/src/models/operations/updateeval.ts +16 -16
  142. package/src/models/operations/updateknowledge.ts +266 -206
  143. package/src/sdk/knowledge.ts +15 -0
  144. package/src/sdk/sdk.ts +0 -6
  145. package/docs/sdks/knowledgebases/README.md +0 -94
  146. package/funcs/knowledgeBasesChunkText.d.ts.map +0 -1
  147. package/funcs/knowledgeBasesChunkText.js.map +0 -1
  148. package/mcp-server/tools/knowledgeBasesChunkText.d.ts +0 -8
  149. package/mcp-server/tools/knowledgeBasesChunkText.d.ts.map +0 -1
  150. package/mcp-server/tools/knowledgeBasesChunkText.js.map +0 -1
  151. package/models/operations/chunktext.d.ts +0 -961
  152. package/models/operations/chunktext.d.ts.map +0 -1
  153. package/models/operations/chunktext.js +0 -883
  154. package/models/operations/chunktext.js.map +0 -1
  155. package/sdk/knowledgebases.d.ts +0 -12
  156. package/sdk/knowledgebases.d.ts.map +0 -1
  157. package/sdk/knowledgebases.js +0 -22
  158. package/sdk/knowledgebases.js.map +0 -1
  159. package/src/mcp-server/tools/knowledgeBasesChunkText.ts +0 -37
  160. package/src/models/operations/chunktext.ts +0 -1629
  161. package/src/sdk/knowledgebases.ts +0 -27
@@ -1,883 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Threshold2$inboundSchema = exports.SemanticChunker$ = exports.SemanticChunker$outboundSchema = exports.SemanticChunker$inboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$ = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$inboundSchema = exports.SDPMChunkerStrategy$ = exports.SDPMChunkerStrategy$outboundSchema = exports.SDPMChunkerStrategy$inboundSchema = exports.ChunkingRequestMode$ = exports.ChunkingRequestMode$outboundSchema = exports.ChunkingRequestMode$inboundSchema = exports.ChunkingRequestThreshold$ = exports.ChunkingRequestThreshold$outboundSchema = exports.ChunkingRequestThreshold$inboundSchema = exports.ChunkTextThreshold2$ = exports.ChunkTextThreshold2$outboundSchema = exports.ChunkTextThreshold2$inboundSchema = exports.SDPMChunker$ = exports.SDPMChunker$outboundSchema = exports.SDPMChunker$inboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$ = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema = exports.AgenticChunkerStrategy$ = exports.AgenticChunkerStrategy$outboundSchema = exports.AgenticChunkerStrategy$inboundSchema = exports.AgenticChunker$ = exports.AgenticChunker$outboundSchema = exports.AgenticChunker$inboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$ = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema = exports.TokenChunker = exports.ReturnTypeT = exports.SentenceChunker = exports.ChunkingRequestReturnType = exports.RecursiveChunker = exports.ChunkTextChunkingRequestReturnType = exports.Mode = exports.Threshold2 = exports.SemanticChunker = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType = exports.ChunkingRequestMode = exports.ChunkTextThreshold2 = exports.SDPMChunker = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType = exports.AgenticChunker = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType = void 0;
40
- exports.ChunkTextResponseBody$ = exports.ChunkTextResponseBody$outboundSchema = exports.ChunkTextResponseBody$inboundSchema = exports.Chunks$ = exports.Chunks$outboundSchema = exports.Chunks$inboundSchema = exports.ChunkTextMetadata$ = exports.ChunkTextMetadata$outboundSchema = exports.ChunkTextMetadata$inboundSchema = exports.ChunkTextChunkingRequest$ = exports.ChunkTextChunkingRequest$outboundSchema = exports.ChunkTextChunkingRequest$inboundSchema = exports.TokenChunkerStrategy$ = exports.TokenChunkerStrategy$outboundSchema = exports.TokenChunkerStrategy$inboundSchema = exports.TokenChunker$ = exports.TokenChunker$outboundSchema = exports.TokenChunker$inboundSchema = exports.ReturnTypeT$ = exports.ReturnTypeT$outboundSchema = exports.ReturnTypeT$inboundSchema = exports.SentenceChunkerStrategy$ = exports.SentenceChunkerStrategy$outboundSchema = exports.SentenceChunkerStrategy$inboundSchema = exports.SentenceChunker$ = exports.SentenceChunker$outboundSchema = exports.SentenceChunker$inboundSchema = exports.ChunkingRequestReturnType$ = exports.ChunkingRequestReturnType$outboundSchema = exports.ChunkingRequestReturnType$inboundSchema = exports.RecursiveChunkerStrategy$ = exports.RecursiveChunkerStrategy$outboundSchema = exports.RecursiveChunkerStrategy$inboundSchema = exports.RecursiveChunker$ = exports.RecursiveChunker$outboundSchema = exports.RecursiveChunker$inboundSchema = exports.ChunkTextChunkingRequestReturnType$ = exports.ChunkTextChunkingRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestReturnType$inboundSchema = exports.SemanticChunkerStrategy$ = exports.SemanticChunkerStrategy$outboundSchema = exports.SemanticChunkerStrategy$inboundSchema = exports.Mode$ = exports.Mode$outboundSchema = exports.Mode$inboundSchema = exports.Threshold$ = exports.Threshold$outboundSchema = exports.Threshold$inboundSchema = exports.Threshold2$ = exports.Threshold2$outboundSchema = void 0;
41
- exports.agenticChunkerStrategyToJSON = agenticChunkerStrategyToJSON;
42
- exports.agenticChunkerStrategyFromJSON = agenticChunkerStrategyFromJSON;
43
- exports.chunkingRequestThresholdToJSON = chunkingRequestThresholdToJSON;
44
- exports.chunkingRequestThresholdFromJSON = chunkingRequestThresholdFromJSON;
45
- exports.sdpmChunkerStrategyToJSON = sdpmChunkerStrategyToJSON;
46
- exports.sdpmChunkerStrategyFromJSON = sdpmChunkerStrategyFromJSON;
47
- exports.thresholdToJSON = thresholdToJSON;
48
- exports.thresholdFromJSON = thresholdFromJSON;
49
- exports.semanticChunkerStrategyToJSON = semanticChunkerStrategyToJSON;
50
- exports.semanticChunkerStrategyFromJSON = semanticChunkerStrategyFromJSON;
51
- exports.recursiveChunkerStrategyToJSON = recursiveChunkerStrategyToJSON;
52
- exports.recursiveChunkerStrategyFromJSON = recursiveChunkerStrategyFromJSON;
53
- exports.sentenceChunkerStrategyToJSON = sentenceChunkerStrategyToJSON;
54
- exports.sentenceChunkerStrategyFromJSON = sentenceChunkerStrategyFromJSON;
55
- exports.tokenChunkerStrategyToJSON = tokenChunkerStrategyToJSON;
56
- exports.tokenChunkerStrategyFromJSON = tokenChunkerStrategyFromJSON;
57
- exports.chunkTextChunkingRequestToJSON = chunkTextChunkingRequestToJSON;
58
- exports.chunkTextChunkingRequestFromJSON = chunkTextChunkingRequestFromJSON;
59
- exports.chunkTextMetadataToJSON = chunkTextMetadataToJSON;
60
- exports.chunkTextMetadataFromJSON = chunkTextMetadataFromJSON;
61
- exports.chunksToJSON = chunksToJSON;
62
- exports.chunksFromJSON = chunksFromJSON;
63
- exports.chunkTextResponseBodyToJSON = chunkTextResponseBodyToJSON;
64
- exports.chunkTextResponseBodyFromJSON = chunkTextResponseBodyFromJSON;
65
- const z = __importStar(require("zod"));
66
- const primitives_js_1 = require("../../lib/primitives.js");
67
- const schemas_js_1 = require("../../lib/schemas.js");
68
- /**
69
- * Return format: chunks (with metadata) or texts (plain strings)
70
- */
71
- exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType = {
72
- Chunks: "chunks",
73
- Texts: "texts",
74
- };
75
- exports.AgenticChunker = {
76
- Agentic: "agentic",
77
- };
78
- /**
79
- * Return format: chunks (with metadata) or texts (plain strings)
80
- */
81
- exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType = {
82
- Chunks: "chunks",
83
- Texts: "texts",
84
- };
85
- exports.SDPMChunker = {
86
- Sdpm: "sdpm",
87
- };
88
- exports.ChunkTextThreshold2 = {
89
- Auto: "auto",
90
- };
91
- /**
92
- * Chunking mode: window-based or sentence-based similarity
93
- */
94
- exports.ChunkingRequestMode = {
95
- Window: "window",
96
- Sentence: "sentence",
97
- };
98
- /**
99
- * Return format: chunks (with metadata) or texts (plain strings)
100
- */
101
- exports.ChunkTextChunkingRequestKnowledgeBasesReturnType = {
102
- Chunks: "chunks",
103
- Texts: "texts",
104
- };
105
- exports.SemanticChunker = {
106
- Semantic: "semantic",
107
- };
108
- exports.Threshold2 = {
109
- Auto: "auto",
110
- };
111
- /**
112
- * Chunking mode: window-based or sentence-based similarity
113
- */
114
- exports.Mode = {
115
- Window: "window",
116
- Sentence: "sentence",
117
- };
118
- /**
119
- * Return format: chunks (with metadata) or texts (plain strings)
120
- */
121
- exports.ChunkTextChunkingRequestReturnType = {
122
- Chunks: "chunks",
123
- Texts: "texts",
124
- };
125
- exports.RecursiveChunker = {
126
- Recursive: "recursive",
127
- };
128
- /**
129
- * Return format: chunks (with metadata) or texts (plain strings)
130
- */
131
- exports.ChunkingRequestReturnType = {
132
- Chunks: "chunks",
133
- Texts: "texts",
134
- };
135
- exports.SentenceChunker = {
136
- Sentence: "sentence",
137
- };
138
- /**
139
- * Return format: chunks (with metadata) or texts (plain strings)
140
- */
141
- exports.ReturnTypeT = {
142
- Chunks: "chunks",
143
- Texts: "texts",
144
- };
145
- exports.TokenChunker = {
146
- Token: "token",
147
- };
148
- /** @internal */
149
- exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema = z.nativeEnum(exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType);
150
- /** @internal */
151
- exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema;
152
- /**
153
- * @internal
154
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
155
- */
156
- var ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$;
157
- (function (ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$) {
158
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema` instead. */
159
- ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$.inboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema;
160
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$outboundSchema` instead. */
161
- ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$.outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$outboundSchema;
162
- })(ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$ || (exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$ = ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$ = {}));
163
- /** @internal */
164
- exports.AgenticChunker$inboundSchema = z.nativeEnum(exports.AgenticChunker);
165
- /** @internal */
166
- exports.AgenticChunker$outboundSchema = exports.AgenticChunker$inboundSchema;
167
- /**
168
- * @internal
169
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
170
- */
171
- var AgenticChunker$;
172
- (function (AgenticChunker$) {
173
- /** @deprecated use `AgenticChunker$inboundSchema` instead. */
174
- AgenticChunker$.inboundSchema = exports.AgenticChunker$inboundSchema;
175
- /** @deprecated use `AgenticChunker$outboundSchema` instead. */
176
- AgenticChunker$.outboundSchema = exports.AgenticChunker$outboundSchema;
177
- })(AgenticChunker$ || (exports.AgenticChunker$ = AgenticChunker$ = {}));
178
- /** @internal */
179
- exports.AgenticChunkerStrategy$inboundSchema = z.object({
180
- text: z.string(),
181
- metadata: z.boolean().default(true),
182
- return_type: exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema
183
- .default("chunks"),
184
- strategy: exports.AgenticChunker$inboundSchema,
185
- model: z.string(),
186
- chunk_size: z.number().int().default(1024),
187
- candidate_size: z.number().int().default(128),
188
- min_characters_per_chunk: z.number().int().default(24),
189
- }).transform((v) => {
190
- return (0, primitives_js_1.remap)(v, {
191
- "return_type": "returnType",
192
- "chunk_size": "chunkSize",
193
- "candidate_size": "candidateSize",
194
- "min_characters_per_chunk": "minCharactersPerChunk",
195
- });
196
- });
197
- /** @internal */
198
- exports.AgenticChunkerStrategy$outboundSchema = z.object({
199
- text: z.string(),
200
- metadata: z.boolean().default(true),
201
- returnType: exports.ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$outboundSchema
202
- .default("chunks"),
203
- strategy: exports.AgenticChunker$outboundSchema,
204
- model: z.string(),
205
- chunkSize: z.number().int().default(1024),
206
- candidateSize: z.number().int().default(128),
207
- minCharactersPerChunk: z.number().int().default(24),
208
- }).transform((v) => {
209
- return (0, primitives_js_1.remap)(v, {
210
- returnType: "return_type",
211
- chunkSize: "chunk_size",
212
- candidateSize: "candidate_size",
213
- minCharactersPerChunk: "min_characters_per_chunk",
214
- });
215
- });
216
- /**
217
- * @internal
218
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
219
- */
220
- var AgenticChunkerStrategy$;
221
- (function (AgenticChunkerStrategy$) {
222
- /** @deprecated use `AgenticChunkerStrategy$inboundSchema` instead. */
223
- AgenticChunkerStrategy$.inboundSchema = exports.AgenticChunkerStrategy$inboundSchema;
224
- /** @deprecated use `AgenticChunkerStrategy$outboundSchema` instead. */
225
- AgenticChunkerStrategy$.outboundSchema = exports.AgenticChunkerStrategy$outboundSchema;
226
- })(AgenticChunkerStrategy$ || (exports.AgenticChunkerStrategy$ = AgenticChunkerStrategy$ = {}));
227
- function agenticChunkerStrategyToJSON(agenticChunkerStrategy) {
228
- return JSON.stringify(exports.AgenticChunkerStrategy$outboundSchema.parse(agenticChunkerStrategy));
229
- }
230
- function agenticChunkerStrategyFromJSON(jsonString) {
231
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AgenticChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgenticChunkerStrategy' from JSON`);
232
- }
233
- /** @internal */
234
- exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema = z.nativeEnum(exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType);
235
- /** @internal */
236
- exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema;
237
- /**
238
- * @internal
239
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
240
- */
241
- var ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$;
242
- (function (ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$) {
243
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema` instead. */
244
- ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$.inboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema;
245
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$outboundSchema` instead. */
246
- ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$.outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$outboundSchema;
247
- })(ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$ || (exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$ = ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$ = {}));
248
- /** @internal */
249
- exports.SDPMChunker$inboundSchema = z
250
- .nativeEnum(exports.SDPMChunker);
251
- /** @internal */
252
- exports.SDPMChunker$outboundSchema = exports.SDPMChunker$inboundSchema;
253
- /**
254
- * @internal
255
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
256
- */
257
- var SDPMChunker$;
258
- (function (SDPMChunker$) {
259
- /** @deprecated use `SDPMChunker$inboundSchema` instead. */
260
- SDPMChunker$.inboundSchema = exports.SDPMChunker$inboundSchema;
261
- /** @deprecated use `SDPMChunker$outboundSchema` instead. */
262
- SDPMChunker$.outboundSchema = exports.SDPMChunker$outboundSchema;
263
- })(SDPMChunker$ || (exports.SDPMChunker$ = SDPMChunker$ = {}));
264
- /** @internal */
265
- exports.ChunkTextThreshold2$inboundSchema = z.nativeEnum(exports.ChunkTextThreshold2);
266
- /** @internal */
267
- exports.ChunkTextThreshold2$outboundSchema = exports.ChunkTextThreshold2$inboundSchema;
268
- /**
269
- * @internal
270
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
271
- */
272
- var ChunkTextThreshold2$;
273
- (function (ChunkTextThreshold2$) {
274
- /** @deprecated use `ChunkTextThreshold2$inboundSchema` instead. */
275
- ChunkTextThreshold2$.inboundSchema = exports.ChunkTextThreshold2$inboundSchema;
276
- /** @deprecated use `ChunkTextThreshold2$outboundSchema` instead. */
277
- ChunkTextThreshold2$.outboundSchema = exports.ChunkTextThreshold2$outboundSchema;
278
- })(ChunkTextThreshold2$ || (exports.ChunkTextThreshold2$ = ChunkTextThreshold2$ = {}));
279
- /** @internal */
280
- exports.ChunkingRequestThreshold$inboundSchema = z.union([z.number(), exports.ChunkTextThreshold2$inboundSchema]);
281
- /** @internal */
282
- exports.ChunkingRequestThreshold$outboundSchema = z.union([z.number(), exports.ChunkTextThreshold2$outboundSchema]);
283
- /**
284
- * @internal
285
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
286
- */
287
- var ChunkingRequestThreshold$;
288
- (function (ChunkingRequestThreshold$) {
289
- /** @deprecated use `ChunkingRequestThreshold$inboundSchema` instead. */
290
- ChunkingRequestThreshold$.inboundSchema = exports.ChunkingRequestThreshold$inboundSchema;
291
- /** @deprecated use `ChunkingRequestThreshold$outboundSchema` instead. */
292
- ChunkingRequestThreshold$.outboundSchema = exports.ChunkingRequestThreshold$outboundSchema;
293
- })(ChunkingRequestThreshold$ || (exports.ChunkingRequestThreshold$ = ChunkingRequestThreshold$ = {}));
294
- function chunkingRequestThresholdToJSON(chunkingRequestThreshold) {
295
- return JSON.stringify(exports.ChunkingRequestThreshold$outboundSchema.parse(chunkingRequestThreshold));
296
- }
297
- function chunkingRequestThresholdFromJSON(jsonString) {
298
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkingRequestThreshold$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkingRequestThreshold' from JSON`);
299
- }
300
- /** @internal */
301
- exports.ChunkingRequestMode$inboundSchema = z.nativeEnum(exports.ChunkingRequestMode);
302
- /** @internal */
303
- exports.ChunkingRequestMode$outboundSchema = exports.ChunkingRequestMode$inboundSchema;
304
- /**
305
- * @internal
306
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
307
- */
308
- var ChunkingRequestMode$;
309
- (function (ChunkingRequestMode$) {
310
- /** @deprecated use `ChunkingRequestMode$inboundSchema` instead. */
311
- ChunkingRequestMode$.inboundSchema = exports.ChunkingRequestMode$inboundSchema;
312
- /** @deprecated use `ChunkingRequestMode$outboundSchema` instead. */
313
- ChunkingRequestMode$.outboundSchema = exports.ChunkingRequestMode$outboundSchema;
314
- })(ChunkingRequestMode$ || (exports.ChunkingRequestMode$ = ChunkingRequestMode$ = {}));
315
- /** @internal */
316
- exports.SDPMChunkerStrategy$inboundSchema = z.object({
317
- text: z.string(),
318
- metadata: z.boolean().default(true),
319
- return_type: exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema
320
- .default("chunks"),
321
- strategy: exports.SDPMChunker$inboundSchema,
322
- chunk_size: z.number().int().default(512),
323
- skip_window: z.number().int().default(1),
324
- threshold: z.union([z.number(), exports.ChunkTextThreshold2$inboundSchema])
325
- .optional(),
326
- embedding_model: z.string(),
327
- mode: exports.ChunkingRequestMode$inboundSchema.default("window"),
328
- }).transform((v) => {
329
- return (0, primitives_js_1.remap)(v, {
330
- "return_type": "returnType",
331
- "chunk_size": "chunkSize",
332
- "skip_window": "skipWindow",
333
- "embedding_model": "embeddingModel",
334
- });
335
- });
336
- /** @internal */
337
- exports.SDPMChunkerStrategy$outboundSchema = z.object({
338
- text: z.string(),
339
- metadata: z.boolean().default(true),
340
- returnType: exports.ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$outboundSchema
341
- .default("chunks"),
342
- strategy: exports.SDPMChunker$outboundSchema,
343
- chunkSize: z.number().int().default(512),
344
- skipWindow: z.number().int().default(1),
345
- threshold: z.union([z.number(), exports.ChunkTextThreshold2$outboundSchema])
346
- .optional(),
347
- embeddingModel: z.string(),
348
- mode: exports.ChunkingRequestMode$outboundSchema.default("window"),
349
- }).transform((v) => {
350
- return (0, primitives_js_1.remap)(v, {
351
- returnType: "return_type",
352
- chunkSize: "chunk_size",
353
- skipWindow: "skip_window",
354
- embeddingModel: "embedding_model",
355
- });
356
- });
357
- /**
358
- * @internal
359
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
360
- */
361
- var SDPMChunkerStrategy$;
362
- (function (SDPMChunkerStrategy$) {
363
- /** @deprecated use `SDPMChunkerStrategy$inboundSchema` instead. */
364
- SDPMChunkerStrategy$.inboundSchema = exports.SDPMChunkerStrategy$inboundSchema;
365
- /** @deprecated use `SDPMChunkerStrategy$outboundSchema` instead. */
366
- SDPMChunkerStrategy$.outboundSchema = exports.SDPMChunkerStrategy$outboundSchema;
367
- })(SDPMChunkerStrategy$ || (exports.SDPMChunkerStrategy$ = SDPMChunkerStrategy$ = {}));
368
- function sdpmChunkerStrategyToJSON(sdpmChunkerStrategy) {
369
- return JSON.stringify(exports.SDPMChunkerStrategy$outboundSchema.parse(sdpmChunkerStrategy));
370
- }
371
- function sdpmChunkerStrategyFromJSON(jsonString) {
372
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SDPMChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SDPMChunkerStrategy' from JSON`);
373
- }
374
- /** @internal */
375
- exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$inboundSchema = z
376
- .nativeEnum(exports.ChunkTextChunkingRequestKnowledgeBasesReturnType);
377
- /** @internal */
378
- exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$inboundSchema;
379
- /**
380
- * @internal
381
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
382
- */
383
- var ChunkTextChunkingRequestKnowledgeBasesReturnType$;
384
- (function (ChunkTextChunkingRequestKnowledgeBasesReturnType$) {
385
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeBasesReturnType$inboundSchema` instead. */
386
- ChunkTextChunkingRequestKnowledgeBasesReturnType$.inboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$inboundSchema;
387
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeBasesReturnType$outboundSchema` instead. */
388
- ChunkTextChunkingRequestKnowledgeBasesReturnType$.outboundSchema = exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$outboundSchema;
389
- })(ChunkTextChunkingRequestKnowledgeBasesReturnType$ || (exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$ = ChunkTextChunkingRequestKnowledgeBasesReturnType$ = {}));
390
- /** @internal */
391
- exports.SemanticChunker$inboundSchema = z.nativeEnum(exports.SemanticChunker);
392
- /** @internal */
393
- exports.SemanticChunker$outboundSchema = exports.SemanticChunker$inboundSchema;
394
- /**
395
- * @internal
396
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
397
- */
398
- var SemanticChunker$;
399
- (function (SemanticChunker$) {
400
- /** @deprecated use `SemanticChunker$inboundSchema` instead. */
401
- SemanticChunker$.inboundSchema = exports.SemanticChunker$inboundSchema;
402
- /** @deprecated use `SemanticChunker$outboundSchema` instead. */
403
- SemanticChunker$.outboundSchema = exports.SemanticChunker$outboundSchema;
404
- })(SemanticChunker$ || (exports.SemanticChunker$ = SemanticChunker$ = {}));
405
- /** @internal */
406
- exports.Threshold2$inboundSchema = z
407
- .nativeEnum(exports.Threshold2);
408
- /** @internal */
409
- exports.Threshold2$outboundSchema = exports.Threshold2$inboundSchema;
410
- /**
411
- * @internal
412
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
413
- */
414
- var Threshold2$;
415
- (function (Threshold2$) {
416
- /** @deprecated use `Threshold2$inboundSchema` instead. */
417
- Threshold2$.inboundSchema = exports.Threshold2$inboundSchema;
418
- /** @deprecated use `Threshold2$outboundSchema` instead. */
419
- Threshold2$.outboundSchema = exports.Threshold2$outboundSchema;
420
- })(Threshold2$ || (exports.Threshold2$ = Threshold2$ = {}));
421
- /** @internal */
422
- exports.Threshold$inboundSchema = z.union([z.number(), exports.Threshold2$inboundSchema]);
423
- /** @internal */
424
- exports.Threshold$outboundSchema = z.union([z.number(), exports.Threshold2$outboundSchema]);
425
- /**
426
- * @internal
427
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
428
- */
429
- var Threshold$;
430
- (function (Threshold$) {
431
- /** @deprecated use `Threshold$inboundSchema` instead. */
432
- Threshold$.inboundSchema = exports.Threshold$inboundSchema;
433
- /** @deprecated use `Threshold$outboundSchema` instead. */
434
- Threshold$.outboundSchema = exports.Threshold$outboundSchema;
435
- })(Threshold$ || (exports.Threshold$ = Threshold$ = {}));
436
- function thresholdToJSON(threshold) {
437
- return JSON.stringify(exports.Threshold$outboundSchema.parse(threshold));
438
- }
439
- function thresholdFromJSON(jsonString) {
440
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Threshold$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Threshold' from JSON`);
441
- }
442
- /** @internal */
443
- exports.Mode$inboundSchema = z.nativeEnum(exports.Mode);
444
- /** @internal */
445
- exports.Mode$outboundSchema = exports.Mode$inboundSchema;
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
- var Mode$;
451
- (function (Mode$) {
452
- /** @deprecated use `Mode$inboundSchema` instead. */
453
- Mode$.inboundSchema = exports.Mode$inboundSchema;
454
- /** @deprecated use `Mode$outboundSchema` instead. */
455
- Mode$.outboundSchema = exports.Mode$outboundSchema;
456
- })(Mode$ || (exports.Mode$ = Mode$ = {}));
457
- /** @internal */
458
- exports.SemanticChunkerStrategy$inboundSchema = z.object({
459
- text: z.string(),
460
- metadata: z.boolean().default(true),
461
- return_type: exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$inboundSchema
462
- .default("chunks"),
463
- strategy: exports.SemanticChunker$inboundSchema,
464
- chunk_size: z.number().int().default(512),
465
- threshold: z.union([z.number(), exports.Threshold2$inboundSchema]).optional(),
466
- embedding_model: z.string(),
467
- mode: exports.Mode$inboundSchema.default("window"),
468
- similarity_window: z.number().int().default(1),
469
- }).transform((v) => {
470
- return (0, primitives_js_1.remap)(v, {
471
- "return_type": "returnType",
472
- "chunk_size": "chunkSize",
473
- "embedding_model": "embeddingModel",
474
- "similarity_window": "similarityWindow",
475
- });
476
- });
477
- /** @internal */
478
- exports.SemanticChunkerStrategy$outboundSchema = z.object({
479
- text: z.string(),
480
- metadata: z.boolean().default(true),
481
- returnType: exports.ChunkTextChunkingRequestKnowledgeBasesReturnType$outboundSchema
482
- .default("chunks"),
483
- strategy: exports.SemanticChunker$outboundSchema,
484
- chunkSize: z.number().int().default(512),
485
- threshold: z.union([z.number(), exports.Threshold2$outboundSchema]).optional(),
486
- embeddingModel: z.string(),
487
- mode: exports.Mode$outboundSchema.default("window"),
488
- similarityWindow: z.number().int().default(1),
489
- }).transform((v) => {
490
- return (0, primitives_js_1.remap)(v, {
491
- returnType: "return_type",
492
- chunkSize: "chunk_size",
493
- embeddingModel: "embedding_model",
494
- similarityWindow: "similarity_window",
495
- });
496
- });
497
- /**
498
- * @internal
499
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
500
- */
501
- var SemanticChunkerStrategy$;
502
- (function (SemanticChunkerStrategy$) {
503
- /** @deprecated use `SemanticChunkerStrategy$inboundSchema` instead. */
504
- SemanticChunkerStrategy$.inboundSchema = exports.SemanticChunkerStrategy$inboundSchema;
505
- /** @deprecated use `SemanticChunkerStrategy$outboundSchema` instead. */
506
- SemanticChunkerStrategy$.outboundSchema = exports.SemanticChunkerStrategy$outboundSchema;
507
- })(SemanticChunkerStrategy$ || (exports.SemanticChunkerStrategy$ = SemanticChunkerStrategy$ = {}));
508
- function semanticChunkerStrategyToJSON(semanticChunkerStrategy) {
509
- return JSON.stringify(exports.SemanticChunkerStrategy$outboundSchema.parse(semanticChunkerStrategy));
510
- }
511
- function semanticChunkerStrategyFromJSON(jsonString) {
512
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SemanticChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticChunkerStrategy' from JSON`);
513
- }
514
- /** @internal */
515
- exports.ChunkTextChunkingRequestReturnType$inboundSchema = z.nativeEnum(exports.ChunkTextChunkingRequestReturnType);
516
- /** @internal */
517
- exports.ChunkTextChunkingRequestReturnType$outboundSchema = exports.ChunkTextChunkingRequestReturnType$inboundSchema;
518
- /**
519
- * @internal
520
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
521
- */
522
- var ChunkTextChunkingRequestReturnType$;
523
- (function (ChunkTextChunkingRequestReturnType$) {
524
- /** @deprecated use `ChunkTextChunkingRequestReturnType$inboundSchema` instead. */
525
- ChunkTextChunkingRequestReturnType$.inboundSchema = exports.ChunkTextChunkingRequestReturnType$inboundSchema;
526
- /** @deprecated use `ChunkTextChunkingRequestReturnType$outboundSchema` instead. */
527
- ChunkTextChunkingRequestReturnType$.outboundSchema = exports.ChunkTextChunkingRequestReturnType$outboundSchema;
528
- })(ChunkTextChunkingRequestReturnType$ || (exports.ChunkTextChunkingRequestReturnType$ = ChunkTextChunkingRequestReturnType$ = {}));
529
- /** @internal */
530
- exports.RecursiveChunker$inboundSchema = z.nativeEnum(exports.RecursiveChunker);
531
- /** @internal */
532
- exports.RecursiveChunker$outboundSchema = exports.RecursiveChunker$inboundSchema;
533
- /**
534
- * @internal
535
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
536
- */
537
- var RecursiveChunker$;
538
- (function (RecursiveChunker$) {
539
- /** @deprecated use `RecursiveChunker$inboundSchema` instead. */
540
- RecursiveChunker$.inboundSchema = exports.RecursiveChunker$inboundSchema;
541
- /** @deprecated use `RecursiveChunker$outboundSchema` instead. */
542
- RecursiveChunker$.outboundSchema = exports.RecursiveChunker$outboundSchema;
543
- })(RecursiveChunker$ || (exports.RecursiveChunker$ = RecursiveChunker$ = {}));
544
- /** @internal */
545
- exports.RecursiveChunkerStrategy$inboundSchema = z.object({
546
- text: z.string(),
547
- metadata: z.boolean().default(true),
548
- return_type: exports.ChunkTextChunkingRequestReturnType$inboundSchema.default("chunks"),
549
- strategy: exports.RecursiveChunker$inboundSchema,
550
- chunk_size: z.number().int().default(512),
551
- separators: z.array(z.string()).optional(),
552
- min_characters_per_chunk: z.number().int().default(24),
553
- }).transform((v) => {
554
- return (0, primitives_js_1.remap)(v, {
555
- "return_type": "returnType",
556
- "chunk_size": "chunkSize",
557
- "min_characters_per_chunk": "minCharactersPerChunk",
558
- });
559
- });
560
- /** @internal */
561
- exports.RecursiveChunkerStrategy$outboundSchema = z.object({
562
- text: z.string(),
563
- metadata: z.boolean().default(true),
564
- returnType: exports.ChunkTextChunkingRequestReturnType$outboundSchema.default("chunks"),
565
- strategy: exports.RecursiveChunker$outboundSchema,
566
- chunkSize: z.number().int().default(512),
567
- separators: z.array(z.string()).optional(),
568
- minCharactersPerChunk: z.number().int().default(24),
569
- }).transform((v) => {
570
- return (0, primitives_js_1.remap)(v, {
571
- returnType: "return_type",
572
- chunkSize: "chunk_size",
573
- minCharactersPerChunk: "min_characters_per_chunk",
574
- });
575
- });
576
- /**
577
- * @internal
578
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
579
- */
580
- var RecursiveChunkerStrategy$;
581
- (function (RecursiveChunkerStrategy$) {
582
- /** @deprecated use `RecursiveChunkerStrategy$inboundSchema` instead. */
583
- RecursiveChunkerStrategy$.inboundSchema = exports.RecursiveChunkerStrategy$inboundSchema;
584
- /** @deprecated use `RecursiveChunkerStrategy$outboundSchema` instead. */
585
- RecursiveChunkerStrategy$.outboundSchema = exports.RecursiveChunkerStrategy$outboundSchema;
586
- })(RecursiveChunkerStrategy$ || (exports.RecursiveChunkerStrategy$ = RecursiveChunkerStrategy$ = {}));
587
- function recursiveChunkerStrategyToJSON(recursiveChunkerStrategy) {
588
- return JSON.stringify(exports.RecursiveChunkerStrategy$outboundSchema.parse(recursiveChunkerStrategy));
589
- }
590
- function recursiveChunkerStrategyFromJSON(jsonString) {
591
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RecursiveChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecursiveChunkerStrategy' from JSON`);
592
- }
593
- /** @internal */
594
- exports.ChunkingRequestReturnType$inboundSchema = z.nativeEnum(exports.ChunkingRequestReturnType);
595
- /** @internal */
596
- exports.ChunkingRequestReturnType$outboundSchema = exports.ChunkingRequestReturnType$inboundSchema;
597
- /**
598
- * @internal
599
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
600
- */
601
- var ChunkingRequestReturnType$;
602
- (function (ChunkingRequestReturnType$) {
603
- /** @deprecated use `ChunkingRequestReturnType$inboundSchema` instead. */
604
- ChunkingRequestReturnType$.inboundSchema = exports.ChunkingRequestReturnType$inboundSchema;
605
- /** @deprecated use `ChunkingRequestReturnType$outboundSchema` instead. */
606
- ChunkingRequestReturnType$.outboundSchema = exports.ChunkingRequestReturnType$outboundSchema;
607
- })(ChunkingRequestReturnType$ || (exports.ChunkingRequestReturnType$ = ChunkingRequestReturnType$ = {}));
608
- /** @internal */
609
- exports.SentenceChunker$inboundSchema = z.nativeEnum(exports.SentenceChunker);
610
- /** @internal */
611
- exports.SentenceChunker$outboundSchema = exports.SentenceChunker$inboundSchema;
612
- /**
613
- * @internal
614
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
615
- */
616
- var SentenceChunker$;
617
- (function (SentenceChunker$) {
618
- /** @deprecated use `SentenceChunker$inboundSchema` instead. */
619
- SentenceChunker$.inboundSchema = exports.SentenceChunker$inboundSchema;
620
- /** @deprecated use `SentenceChunker$outboundSchema` instead. */
621
- SentenceChunker$.outboundSchema = exports.SentenceChunker$outboundSchema;
622
- })(SentenceChunker$ || (exports.SentenceChunker$ = SentenceChunker$ = {}));
623
- /** @internal */
624
- exports.SentenceChunkerStrategy$inboundSchema = z.object({
625
- text: z.string(),
626
- metadata: z.boolean().default(true),
627
- return_type: exports.ChunkingRequestReturnType$inboundSchema.default("chunks"),
628
- strategy: exports.SentenceChunker$inboundSchema,
629
- chunk_size: z.number().int().default(512),
630
- chunk_overlap: z.number().int().default(0),
631
- min_sentences_per_chunk: z.number().int().default(1),
632
- }).transform((v) => {
633
- return (0, primitives_js_1.remap)(v, {
634
- "return_type": "returnType",
635
- "chunk_size": "chunkSize",
636
- "chunk_overlap": "chunkOverlap",
637
- "min_sentences_per_chunk": "minSentencesPerChunk",
638
- });
639
- });
640
- /** @internal */
641
- exports.SentenceChunkerStrategy$outboundSchema = z.object({
642
- text: z.string(),
643
- metadata: z.boolean().default(true),
644
- returnType: exports.ChunkingRequestReturnType$outboundSchema.default("chunks"),
645
- strategy: exports.SentenceChunker$outboundSchema,
646
- chunkSize: z.number().int().default(512),
647
- chunkOverlap: z.number().int().default(0),
648
- minSentencesPerChunk: z.number().int().default(1),
649
- }).transform((v) => {
650
- return (0, primitives_js_1.remap)(v, {
651
- returnType: "return_type",
652
- chunkSize: "chunk_size",
653
- chunkOverlap: "chunk_overlap",
654
- minSentencesPerChunk: "min_sentences_per_chunk",
655
- });
656
- });
657
- /**
658
- * @internal
659
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
660
- */
661
- var SentenceChunkerStrategy$;
662
- (function (SentenceChunkerStrategy$) {
663
- /** @deprecated use `SentenceChunkerStrategy$inboundSchema` instead. */
664
- SentenceChunkerStrategy$.inboundSchema = exports.SentenceChunkerStrategy$inboundSchema;
665
- /** @deprecated use `SentenceChunkerStrategy$outboundSchema` instead. */
666
- SentenceChunkerStrategy$.outboundSchema = exports.SentenceChunkerStrategy$outboundSchema;
667
- })(SentenceChunkerStrategy$ || (exports.SentenceChunkerStrategy$ = SentenceChunkerStrategy$ = {}));
668
- function sentenceChunkerStrategyToJSON(sentenceChunkerStrategy) {
669
- return JSON.stringify(exports.SentenceChunkerStrategy$outboundSchema.parse(sentenceChunkerStrategy));
670
- }
671
- function sentenceChunkerStrategyFromJSON(jsonString) {
672
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SentenceChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SentenceChunkerStrategy' from JSON`);
673
- }
674
- /** @internal */
675
- exports.ReturnTypeT$inboundSchema = z
676
- .nativeEnum(exports.ReturnTypeT);
677
- /** @internal */
678
- exports.ReturnTypeT$outboundSchema = exports.ReturnTypeT$inboundSchema;
679
- /**
680
- * @internal
681
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
682
- */
683
- var ReturnTypeT$;
684
- (function (ReturnTypeT$) {
685
- /** @deprecated use `ReturnTypeT$inboundSchema` instead. */
686
- ReturnTypeT$.inboundSchema = exports.ReturnTypeT$inboundSchema;
687
- /** @deprecated use `ReturnTypeT$outboundSchema` instead. */
688
- ReturnTypeT$.outboundSchema = exports.ReturnTypeT$outboundSchema;
689
- })(ReturnTypeT$ || (exports.ReturnTypeT$ = ReturnTypeT$ = {}));
690
- /** @internal */
691
- exports.TokenChunker$inboundSchema = z.nativeEnum(exports.TokenChunker);
692
- /** @internal */
693
- exports.TokenChunker$outboundSchema = exports.TokenChunker$inboundSchema;
694
- /**
695
- * @internal
696
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
697
- */
698
- var TokenChunker$;
699
- (function (TokenChunker$) {
700
- /** @deprecated use `TokenChunker$inboundSchema` instead. */
701
- TokenChunker$.inboundSchema = exports.TokenChunker$inboundSchema;
702
- /** @deprecated use `TokenChunker$outboundSchema` instead. */
703
- TokenChunker$.outboundSchema = exports.TokenChunker$outboundSchema;
704
- })(TokenChunker$ || (exports.TokenChunker$ = TokenChunker$ = {}));
705
- /** @internal */
706
- exports.TokenChunkerStrategy$inboundSchema = z.object({
707
- text: z.string(),
708
- metadata: z.boolean().default(true),
709
- return_type: exports.ReturnTypeT$inboundSchema.default("chunks"),
710
- strategy: exports.TokenChunker$inboundSchema,
711
- chunk_size: z.number().int().default(512),
712
- chunk_overlap: z.number().int().default(0),
713
- }).transform((v) => {
714
- return (0, primitives_js_1.remap)(v, {
715
- "return_type": "returnType",
716
- "chunk_size": "chunkSize",
717
- "chunk_overlap": "chunkOverlap",
718
- });
719
- });
720
- /** @internal */
721
- exports.TokenChunkerStrategy$outboundSchema = z.object({
722
- text: z.string(),
723
- metadata: z.boolean().default(true),
724
- returnType: exports.ReturnTypeT$outboundSchema.default("chunks"),
725
- strategy: exports.TokenChunker$outboundSchema,
726
- chunkSize: z.number().int().default(512),
727
- chunkOverlap: z.number().int().default(0),
728
- }).transform((v) => {
729
- return (0, primitives_js_1.remap)(v, {
730
- returnType: "return_type",
731
- chunkSize: "chunk_size",
732
- chunkOverlap: "chunk_overlap",
733
- });
734
- });
735
- /**
736
- * @internal
737
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
738
- */
739
- var TokenChunkerStrategy$;
740
- (function (TokenChunkerStrategy$) {
741
- /** @deprecated use `TokenChunkerStrategy$inboundSchema` instead. */
742
- TokenChunkerStrategy$.inboundSchema = exports.TokenChunkerStrategy$inboundSchema;
743
- /** @deprecated use `TokenChunkerStrategy$outboundSchema` instead. */
744
- TokenChunkerStrategy$.outboundSchema = exports.TokenChunkerStrategy$outboundSchema;
745
- })(TokenChunkerStrategy$ || (exports.TokenChunkerStrategy$ = TokenChunkerStrategy$ = {}));
746
- function tokenChunkerStrategyToJSON(tokenChunkerStrategy) {
747
- return JSON.stringify(exports.TokenChunkerStrategy$outboundSchema.parse(tokenChunkerStrategy));
748
- }
749
- function tokenChunkerStrategyFromJSON(jsonString) {
750
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TokenChunkerStrategy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TokenChunkerStrategy' from JSON`);
751
- }
752
- /** @internal */
753
- exports.ChunkTextChunkingRequest$inboundSchema = z.union([
754
- z.lazy(() => exports.SemanticChunkerStrategy$inboundSchema),
755
- z.lazy(() => exports.SDPMChunkerStrategy$inboundSchema),
756
- z.lazy(() => exports.AgenticChunkerStrategy$inboundSchema),
757
- z.lazy(() => exports.TokenChunkerStrategy$inboundSchema),
758
- z.lazy(() => exports.SentenceChunkerStrategy$inboundSchema),
759
- z.lazy(() => exports.RecursiveChunkerStrategy$inboundSchema),
760
- ]);
761
- /** @internal */
762
- exports.ChunkTextChunkingRequest$outboundSchema = z.union([
763
- z.lazy(() => exports.SemanticChunkerStrategy$outboundSchema),
764
- z.lazy(() => exports.SDPMChunkerStrategy$outboundSchema),
765
- z.lazy(() => exports.AgenticChunkerStrategy$outboundSchema),
766
- z.lazy(() => exports.TokenChunkerStrategy$outboundSchema),
767
- z.lazy(() => exports.SentenceChunkerStrategy$outboundSchema),
768
- z.lazy(() => exports.RecursiveChunkerStrategy$outboundSchema),
769
- ]);
770
- /**
771
- * @internal
772
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
773
- */
774
- var ChunkTextChunkingRequest$;
775
- (function (ChunkTextChunkingRequest$) {
776
- /** @deprecated use `ChunkTextChunkingRequest$inboundSchema` instead. */
777
- ChunkTextChunkingRequest$.inboundSchema = exports.ChunkTextChunkingRequest$inboundSchema;
778
- /** @deprecated use `ChunkTextChunkingRequest$outboundSchema` instead. */
779
- ChunkTextChunkingRequest$.outboundSchema = exports.ChunkTextChunkingRequest$outboundSchema;
780
- })(ChunkTextChunkingRequest$ || (exports.ChunkTextChunkingRequest$ = ChunkTextChunkingRequest$ = {}));
781
- function chunkTextChunkingRequestToJSON(chunkTextChunkingRequest) {
782
- return JSON.stringify(exports.ChunkTextChunkingRequest$outboundSchema.parse(chunkTextChunkingRequest));
783
- }
784
- function chunkTextChunkingRequestFromJSON(jsonString) {
785
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkTextChunkingRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkTextChunkingRequest' from JSON`);
786
- }
787
- /** @internal */
788
- exports.ChunkTextMetadata$inboundSchema = z.object({
789
- start_index: z.nullable(z.number()),
790
- end_index: z.nullable(z.number()),
791
- token_count: z.nullable(z.number()),
792
- }).transform((v) => {
793
- return (0, primitives_js_1.remap)(v, {
794
- "start_index": "startIndex",
795
- "end_index": "endIndex",
796
- "token_count": "tokenCount",
797
- });
798
- });
799
- /** @internal */
800
- exports.ChunkTextMetadata$outboundSchema = z.object({
801
- startIndex: z.nullable(z.number()),
802
- endIndex: z.nullable(z.number()),
803
- tokenCount: z.nullable(z.number()),
804
- }).transform((v) => {
805
- return (0, primitives_js_1.remap)(v, {
806
- startIndex: "start_index",
807
- endIndex: "end_index",
808
- tokenCount: "token_count",
809
- });
810
- });
811
- /**
812
- * @internal
813
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
814
- */
815
- var ChunkTextMetadata$;
816
- (function (ChunkTextMetadata$) {
817
- /** @deprecated use `ChunkTextMetadata$inboundSchema` instead. */
818
- ChunkTextMetadata$.inboundSchema = exports.ChunkTextMetadata$inboundSchema;
819
- /** @deprecated use `ChunkTextMetadata$outboundSchema` instead. */
820
- ChunkTextMetadata$.outboundSchema = exports.ChunkTextMetadata$outboundSchema;
821
- })(ChunkTextMetadata$ || (exports.ChunkTextMetadata$ = ChunkTextMetadata$ = {}));
822
- function chunkTextMetadataToJSON(chunkTextMetadata) {
823
- return JSON.stringify(exports.ChunkTextMetadata$outboundSchema.parse(chunkTextMetadata));
824
- }
825
- function chunkTextMetadataFromJSON(jsonString) {
826
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkTextMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkTextMetadata' from JSON`);
827
- }
828
- /** @internal */
829
- exports.Chunks$inboundSchema = z
830
- .object({
831
- text: z.string(),
832
- index: z.number(),
833
- metadata: z.lazy(() => exports.ChunkTextMetadata$inboundSchema).optional(),
834
- });
835
- /** @internal */
836
- exports.Chunks$outboundSchema = z.object({
837
- text: z.string(),
838
- index: z.number(),
839
- metadata: z.lazy(() => exports.ChunkTextMetadata$outboundSchema).optional(),
840
- });
841
- /**
842
- * @internal
843
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
844
- */
845
- var Chunks$;
846
- (function (Chunks$) {
847
- /** @deprecated use `Chunks$inboundSchema` instead. */
848
- Chunks$.inboundSchema = exports.Chunks$inboundSchema;
849
- /** @deprecated use `Chunks$outboundSchema` instead. */
850
- Chunks$.outboundSchema = exports.Chunks$outboundSchema;
851
- })(Chunks$ || (exports.Chunks$ = Chunks$ = {}));
852
- function chunksToJSON(chunks) {
853
- return JSON.stringify(exports.Chunks$outboundSchema.parse(chunks));
854
- }
855
- function chunksFromJSON(jsonString) {
856
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Chunks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Chunks' from JSON`);
857
- }
858
- /** @internal */
859
- exports.ChunkTextResponseBody$inboundSchema = z.object({
860
- chunks: z.array(z.lazy(() => exports.Chunks$inboundSchema)),
861
- });
862
- /** @internal */
863
- exports.ChunkTextResponseBody$outboundSchema = z.object({
864
- chunks: z.array(z.lazy(() => exports.Chunks$outboundSchema)),
865
- });
866
- /**
867
- * @internal
868
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
869
- */
870
- var ChunkTextResponseBody$;
871
- (function (ChunkTextResponseBody$) {
872
- /** @deprecated use `ChunkTextResponseBody$inboundSchema` instead. */
873
- ChunkTextResponseBody$.inboundSchema = exports.ChunkTextResponseBody$inboundSchema;
874
- /** @deprecated use `ChunkTextResponseBody$outboundSchema` instead. */
875
- ChunkTextResponseBody$.outboundSchema = exports.ChunkTextResponseBody$outboundSchema;
876
- })(ChunkTextResponseBody$ || (exports.ChunkTextResponseBody$ = ChunkTextResponseBody$ = {}));
877
- function chunkTextResponseBodyToJSON(chunkTextResponseBody) {
878
- return JSON.stringify(exports.ChunkTextResponseBody$outboundSchema.parse(chunkTextResponseBody));
879
- }
880
- function chunkTextResponseBodyFromJSON(jsonString) {
881
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ChunkTextResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChunkTextResponseBody' from JSON`);
882
- }
883
- //# sourceMappingURL=chunktext.js.map