@orq-ai/node 3.9.2 → 3.10.0-rc.0

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 (508) hide show
  1. package/README.md +5 -2
  2. package/bin/mcp-server.js +145 -148
  3. package/bin/mcp-server.js.map +33 -33
  4. package/docs/sdks/knowledge/README.md +0 -87
  5. package/{packages/orq-rc/docs/sdks/feedback → docs/sdks/knowledgebases}/README.md +27 -21
  6. package/funcs/{knowledgeChunkText.d.ts → knowledgeBasesChunkText.d.ts} +3 -3
  7. package/funcs/knowledgeBasesChunkText.d.ts.map +1 -0
  8. package/funcs/{knowledgeChunkText.js → knowledgeBasesChunkText.js} +4 -4
  9. package/funcs/knowledgeBasesChunkText.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +2 -2
  12. package/lib/config.js +2 -2
  13. package/lib/config.js.map +1 -1
  14. package/mcp-server/mcp-server.js +1 -1
  15. package/mcp-server/mcp-server.js.map +1 -1
  16. package/mcp-server/server.js +3 -3
  17. package/mcp-server/server.js.map +1 -1
  18. package/mcp-server/tools/{knowledgeChunkText.d.ts → knowledgeBasesChunkText.d.ts} +2 -2
  19. package/mcp-server/tools/knowledgeBasesChunkText.d.ts.map +1 -0
  20. package/mcp-server/tools/{knowledgeChunkText.js → knowledgeBasesChunkText.js} +7 -7
  21. package/mcp-server/tools/knowledgeBasesChunkText.js.map +1 -0
  22. package/models/operations/chunktext.d.ts +24 -24
  23. package/models/operations/chunktext.d.ts.map +1 -1
  24. package/models/operations/chunktext.js +38 -39
  25. package/models/operations/chunktext.js.map +1 -1
  26. package/models/operations/createcontact.js +2 -2
  27. package/models/operations/createdataset.js +2 -2
  28. package/models/operations/createdatasetitem.js +2 -2
  29. package/models/operations/createdatasource.js +2 -2
  30. package/models/operations/createeval.js +16 -16
  31. package/models/operations/fileget.js +2 -2
  32. package/models/operations/filelist.js +2 -2
  33. package/models/operations/fileupload.js +2 -2
  34. package/models/operations/getevals.js +28 -28
  35. package/models/operations/listcontacts.js +2 -2
  36. package/models/operations/listdatasetdatapoints.js +2 -2
  37. package/models/operations/listdatasets.js +2 -2
  38. package/models/operations/listdatasources.js +2 -2
  39. package/models/operations/retrievecontact.js +2 -2
  40. package/models/operations/retrievedatapoint.js +2 -2
  41. package/models/operations/retrievedataset.js +2 -2
  42. package/models/operations/retrievedatasource.js +2 -2
  43. package/models/operations/updatecontact.js +2 -2
  44. package/models/operations/updatedatapoint.js +2 -2
  45. package/models/operations/updatedataset.js +2 -2
  46. package/models/operations/updatedatasource.js +2 -2
  47. package/models/operations/updateeval.js +16 -16
  48. package/package.json +3 -2
  49. package/sdk/knowledge.d.ts +0 -7
  50. package/sdk/knowledge.d.ts.map +1 -1
  51. package/sdk/knowledge.js +0 -10
  52. package/sdk/knowledge.js.map +1 -1
  53. package/sdk/knowledgebases.d.ts +12 -0
  54. package/sdk/knowledgebases.d.ts.map +1 -0
  55. package/sdk/knowledgebases.js +22 -0
  56. package/sdk/knowledgebases.js.map +1 -0
  57. package/sdk/sdk.d.ts +3 -0
  58. package/sdk/sdk.d.ts.map +1 -1
  59. package/sdk/sdk.js +4 -0
  60. package/sdk/sdk.js.map +1 -1
  61. package/{packages/orq-rc/src/funcs/knowledgeChunkText.ts → src/funcs/knowledgeBasesChunkText.ts} +2 -2
  62. package/src/lib/config.ts +2 -2
  63. package/src/mcp-server/mcp-server.ts +1 -1
  64. package/src/mcp-server/server.ts +3 -3
  65. package/{packages/orq-rc/src/mcp-server/tools/knowledgeChunkText.ts → src/mcp-server/tools/knowledgeBasesChunkText.ts} +5 -5
  66. package/src/models/operations/chunktext.ts +63 -57
  67. package/src/models/operations/createcontact.ts +2 -2
  68. package/src/models/operations/createdataset.ts +2 -2
  69. package/src/models/operations/createdatasetitem.ts +2 -2
  70. package/src/models/operations/createdatasource.ts +2 -2
  71. package/src/models/operations/createeval.ts +16 -16
  72. package/src/models/operations/fileget.ts +2 -2
  73. package/src/models/operations/filelist.ts +2 -2
  74. package/src/models/operations/fileupload.ts +2 -2
  75. package/src/models/operations/getevals.ts +28 -28
  76. package/src/models/operations/listcontacts.ts +2 -2
  77. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  78. package/src/models/operations/listdatasets.ts +2 -2
  79. package/src/models/operations/listdatasources.ts +2 -2
  80. package/src/models/operations/retrievecontact.ts +2 -2
  81. package/src/models/operations/retrievedatapoint.ts +2 -2
  82. package/src/models/operations/retrievedataset.ts +2 -2
  83. package/src/models/operations/retrievedatasource.ts +2 -2
  84. package/src/models/operations/updatecontact.ts +2 -2
  85. package/src/models/operations/updatedatapoint.ts +2 -2
  86. package/src/models/operations/updatedataset.ts +2 -2
  87. package/src/models/operations/updatedatasource.ts +2 -2
  88. package/src/models/operations/updateeval.ts +16 -16
  89. package/src/sdk/knowledge.ts +0 -18
  90. package/src/sdk/knowledgebases.ts +27 -0
  91. package/src/sdk/sdk.ts +6 -0
  92. package/funcs/knowledgeChunkText.d.ts.map +0 -1
  93. package/funcs/knowledgeChunkText.js.map +0 -1
  94. package/mcp-server/tools/knowledgeChunkText.d.ts.map +0 -1
  95. package/mcp-server/tools/knowledgeChunkText.js.map +0 -1
  96. package/packages/orq-rc/FUNCTIONS.md +0 -103
  97. package/packages/orq-rc/README.md +0 -955
  98. package/packages/orq-rc/RUNTIMES.md +0 -48
  99. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -445
  100. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -825
  101. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -310
  102. package/packages/orq-rc/docs/sdks/evals/README.md +0 -3035
  103. package/packages/orq-rc/docs/sdks/files/README.md +0 -297
  104. package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1237
  105. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -82
  106. package/packages/orq-rc/docs/sdks/models/README.md +0 -75
  107. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  108. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -550
  109. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -76
  110. package/packages/orq-rc/jsr.json +0 -28
  111. package/packages/orq-rc/package-lock.json +0 -3217
  112. package/packages/orq-rc/package.json +0 -45
  113. package/packages/orq-rc/src/core.ts +0 -13
  114. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -165
  115. package/packages/orq-rc/src/funcs/contactsDelete.ts +0 -176
  116. package/packages/orq-rc/src/funcs/contactsList.ts +0 -169
  117. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +0 -175
  118. package/packages/orq-rc/src/funcs/contactsUpdate.ts +0 -176
  119. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  120. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  121. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -167
  122. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  123. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  124. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  125. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  126. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  127. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  128. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  129. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  130. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  131. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  132. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  133. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  134. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -184
  135. package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +0 -175
  136. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  137. package/packages/orq-rc/src/funcs/evalsBertScore.ts +0 -175
  138. package/packages/orq-rc/src/funcs/evalsBleuScore.ts +0 -175
  139. package/packages/orq-rc/src/funcs/evalsBotDetection.ts +0 -175
  140. package/packages/orq-rc/src/funcs/evalsContains.ts +0 -175
  141. package/packages/orq-rc/src/funcs/evalsContainsAll.ts +0 -175
  142. package/packages/orq-rc/src/funcs/evalsContainsAny.ts +0 -175
  143. package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +0 -175
  144. package/packages/orq-rc/src/funcs/evalsContainsNone.ts +0 -175
  145. package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +0 -175
  146. package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +0 -177
  147. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  148. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  149. package/packages/orq-rc/src/funcs/evalsEndsWith.ts +0 -175
  150. package/packages/orq-rc/src/funcs/evalsExactMatch.ts +0 -175
  151. package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +0 -183
  152. package/packages/orq-rc/src/funcs/evalsGrammar.ts +0 -173
  153. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -177
  154. package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +0 -175
  155. package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +0 -177
  156. package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +0 -175
  157. package/packages/orq-rc/src/funcs/evalsLocalization.ts +0 -175
  158. package/packages/orq-rc/src/funcs/evalsPii.ts +0 -173
  159. package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +0 -175
  160. package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +0 -174
  161. package/packages/orq-rc/src/funcs/evalsRagasContextEntitiesRecall.ts +0 -183
  162. package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +0 -180
  163. package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +0 -177
  164. package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +0 -174
  165. package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +0 -177
  166. package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +0 -174
  167. package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +0 -177
  168. package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +0 -180
  169. package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +0 -183
  170. package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +0 -177
  171. package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +0 -183
  172. package/packages/orq-rc/src/funcs/evalsSummarization.ts +0 -175
  173. package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +0 -175
  174. package/packages/orq-rc/src/funcs/evalsTranslation.ts +0 -175
  175. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  176. package/packages/orq-rc/src/funcs/evalsValidJson.ts +0 -175
  177. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  178. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  179. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  180. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  181. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  182. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  183. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  184. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  185. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  186. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  187. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  188. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  189. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  190. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  191. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  192. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  193. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  194. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  195. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  196. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  197. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  198. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  199. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -164
  200. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  201. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  202. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  203. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  204. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  205. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  206. package/packages/orq-rc/src/hooks/global.ts +0 -44
  207. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  208. package/packages/orq-rc/src/hooks/index.ts +0 -6
  209. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  210. package/packages/orq-rc/src/hooks/types.ts +0 -112
  211. package/packages/orq-rc/src/index.ts +0 -9
  212. package/packages/orq-rc/src/lib/base64.ts +0 -37
  213. package/packages/orq-rc/src/lib/config.ts +0 -74
  214. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  215. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  216. package/packages/orq-rc/src/lib/env.ts +0 -73
  217. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  218. package/packages/orq-rc/src/lib/files.ts +0 -82
  219. package/packages/orq-rc/src/lib/http.ts +0 -323
  220. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  221. package/packages/orq-rc/src/lib/logger.ts +0 -9
  222. package/packages/orq-rc/src/lib/matchers.ts +0 -348
  223. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  224. package/packages/orq-rc/src/lib/retries.ts +0 -218
  225. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  226. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  227. package/packages/orq-rc/src/lib/security.ts +0 -261
  228. package/packages/orq-rc/src/lib/url.ts +0 -33
  229. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -112
  230. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -136
  231. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  232. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  233. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  234. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  235. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -117
  236. package/packages/orq-rc/src/mcp-server/resources.ts +0 -172
  237. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  238. package/packages/orq-rc/src/mcp-server/server.ts +0 -249
  239. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  240. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  241. package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +0 -35
  242. package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +0 -37
  243. package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +0 -37
  244. package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +0 -37
  245. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  246. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  247. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  248. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  249. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  250. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  251. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  252. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  253. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  254. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  255. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  256. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  257. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  258. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  259. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  260. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  261. package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +0 -35
  262. package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
  263. package/packages/orq-rc/src/mcp-server/tools/evalsBertScore.ts +0 -35
  264. package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +0 -35
  265. package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +0 -35
  266. package/packages/orq-rc/src/mcp-server/tools/evalsContains.ts +0 -35
  267. package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +0 -35
  268. package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +0 -35
  269. package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +0 -35
  270. package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +0 -35
  271. package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +0 -35
  272. package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +0 -36
  273. package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +0 -35
  274. package/packages/orq-rc/src/mcp-server/tools/evalsDelete.ts +0 -33
  275. package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +0 -35
  276. package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +0 -35
  277. package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +0 -37
  278. package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +0 -35
  279. package/packages/orq-rc/src/mcp-server/tools/evalsInvoke.ts +0 -35
  280. package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +0 -35
  281. package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +0 -36
  282. package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +0 -35
  283. package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +0 -35
  284. package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +0 -35
  285. package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +0 -35
  286. package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +0 -35
  287. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextEntitiesRecall.ts +0 -37
  288. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +0 -36
  289. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextRecall.ts +0 -36
  290. package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +0 -35
  291. package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +0 -36
  292. package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +0 -35
  293. package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +0 -36
  294. package/packages/orq-rc/src/mcp-server/tools/evalsRagasNoiseSensitivity.ts +0 -36
  295. package/packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts +0 -36
  296. package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +0 -36
  297. package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +0 -36
  298. package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +0 -35
  299. package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +0 -35
  300. package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +0 -35
  301. package/packages/orq-rc/src/mcp-server/tools/evalsUpdate.ts +0 -35
  302. package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +0 -35
  303. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  304. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  305. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  306. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  307. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  308. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +0 -35
  309. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +0 -35
  310. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +0 -35
  311. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +0 -33
  312. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
  313. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +0 -37
  314. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +0 -35
  315. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +0 -35
  316. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +0 -37
  317. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveChunk.ts +0 -35
  318. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +0 -35
  319. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +0 -37
  320. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +0 -35
  321. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +0 -35
  322. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +0 -35
  323. package/packages/orq-rc/src/mcp-server/tools/modelsList.ts +0 -30
  324. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  325. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  326. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  327. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  328. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  329. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  330. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  331. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  332. package/packages/orq-rc/src/mcp-server/tools.ts +0 -129
  333. package/packages/orq-rc/src/models/components/deployments.ts +0 -7289
  334. package/packages/orq-rc/src/models/components/index.ts +0 -6
  335. package/packages/orq-rc/src/models/components/security.ts +0 -71
  336. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  337. package/packages/orq-rc/src/models/errors/createeval.ts +0 -80
  338. package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -91
  339. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -80
  340. package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +0 -156
  341. package/packages/orq-rc/src/models/errors/evalsbertscore.ts +0 -154
  342. package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +0 -154
  343. package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +0 -155
  344. package/packages/orq-rc/src/models/errors/evalscontains.ts +0 -154
  345. package/packages/orq-rc/src/models/errors/evalscontainsall.ts +0 -155
  346. package/packages/orq-rc/src/models/errors/evalscontainsany.ts +0 -155
  347. package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +0 -156
  348. package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +0 -155
  349. package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +0 -155
  350. package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +0 -157
  351. package/packages/orq-rc/src/models/errors/evalsendswith.ts +0 -154
  352. package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +0 -154
  353. package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +0 -160
  354. package/packages/orq-rc/src/models/errors/evalsgrammar.ts +0 -154
  355. package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +0 -156
  356. package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +0 -157
  357. package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +0 -156
  358. package/packages/orq-rc/src/models/errors/evalslocalization.ts +0 -155
  359. package/packages/orq-rc/src/models/errors/evalspii.ts +0 -154
  360. package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +0 -156
  361. package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +0 -157
  362. package/packages/orq-rc/src/models/errors/evalsragascontextentitiesrecall.ts +0 -163
  363. package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +0 -160
  364. package/packages/orq-rc/src/models/errors/evalsragascontextrecall.ts +0 -158
  365. package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +0 -157
  366. package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +0 -157
  367. package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +0 -157
  368. package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +0 -158
  369. package/packages/orq-rc/src/models/errors/evalsragasnoisesensitivity.ts +0 -160
  370. package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +0 -160
  371. package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +0 -158
  372. package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +0 -160
  373. package/packages/orq-rc/src/models/errors/evalssummarization.ts +0 -156
  374. package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +0 -155
  375. package/packages/orq-rc/src/models/errors/evalstranslation.ts +0 -155
  376. package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +0 -154
  377. package/packages/orq-rc/src/models/errors/getevals.ts +0 -80
  378. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -80
  379. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -90
  380. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  381. package/packages/orq-rc/src/models/errors/index.ts +0 -56
  382. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -154
  383. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  384. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  385. package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -91
  386. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  387. package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -83
  388. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -80
  389. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -80
  390. package/packages/orq-rc/src/models/operations/chunktext.ts +0 -1623
  391. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  392. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -428
  393. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -267
  394. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  395. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -5222
  396. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
  397. package/packages/orq-rc/src/models/operations/createeval.ts +0 -3830
  398. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  399. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -4083
  400. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
  401. package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -69
  402. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  403. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  404. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -87
  405. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -66
  406. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -78
  407. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  408. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -5439
  409. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -9379
  410. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1256
  411. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2328
  412. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -9499
  413. package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +0 -253
  414. package/packages/orq-rc/src/models/operations/evalsbertscore.ts +0 -197
  415. package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +0 -131
  416. package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +0 -249
  417. package/packages/orq-rc/src/models/operations/evalscontains.ts +0 -250
  418. package/packages/orq-rc/src/models/operations/evalscontainsall.ts +0 -248
  419. package/packages/orq-rc/src/models/operations/evalscontainsany.ts +0 -254
  420. package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +0 -181
  421. package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +0 -254
  422. package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +0 -181
  423. package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +0 -186
  424. package/packages/orq-rc/src/models/operations/evalsendswith.ts +0 -250
  425. package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +0 -183
  426. package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +0 -299
  427. package/packages/orq-rc/src/models/operations/evalsgrammar.ts +0 -243
  428. package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +0 -268
  429. package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +0 -266
  430. package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +0 -259
  431. package/packages/orq-rc/src/models/operations/evalslocalization.ts +0 -253
  432. package/packages/orq-rc/src/models/operations/evalspii.ts +0 -243
  433. package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +0 -152
  434. package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +0 -153
  435. package/packages/orq-rc/src/models/operations/evalsragascontextentitiesrecall.ts +0 -164
  436. package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +0 -166
  437. package/packages/orq-rc/src/models/operations/evalsragascontextrecall.ts +0 -164
  438. package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +0 -153
  439. package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +0 -155
  440. package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +0 -146
  441. package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +0 -157
  442. package/packages/orq-rc/src/models/operations/evalsragasnoisesensitivity.ts +0 -166
  443. package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +0 -165
  444. package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +0 -150
  445. package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +0 -285
  446. package/packages/orq-rc/src/models/operations/evalssummarization.ts +0 -253
  447. package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +0 -251
  448. package/packages/orq-rc/src/models/operations/evalstranslation.ts +0 -251
  449. package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +0 -177
  450. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  451. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  452. package/packages/orq-rc/src/models/operations/filelist.ts +0 -337
  453. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -327
  454. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2296
  455. package/packages/orq-rc/src/models/operations/getevals.ts +0 -6163
  456. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -315
  457. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -537
  458. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -2157
  459. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2162
  460. package/packages/orq-rc/src/models/operations/index.ts +0 -97
  461. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -2520
  462. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -494
  463. package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -490
  464. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -2784
  465. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
  466. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -447
  467. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -663
  468. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -273
  469. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2294
  470. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  471. package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -210
  472. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2586
  473. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  474. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
  475. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -3367
  476. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -448
  477. package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -325
  478. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -5155
  479. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -393
  480. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
  481. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4131
  482. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -920
  483. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -4220
  484. package/packages/orq-rc/src/sdk/contacts.ts +0 -99
  485. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  486. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  487. package/packages/orq-rc/src/sdk/evals.ts +0 -639
  488. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  489. package/packages/orq-rc/src/sdk/files.ts +0 -78
  490. package/packages/orq-rc/src/sdk/index.ts +0 -5
  491. package/packages/orq-rc/src/sdk/knowledge.ts +0 -267
  492. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  493. package/packages/orq-rc/src/sdk/models.ts +0 -25
  494. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  495. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  496. package/packages/orq-rc/src/sdk/sdk.ts +0 -67
  497. package/packages/orq-rc/src/types/async.ts +0 -68
  498. package/packages/orq-rc/src/types/blobs.ts +0 -31
  499. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  500. package/packages/orq-rc/src/types/enums.ts +0 -16
  501. package/packages/orq-rc/src/types/fp.ts +0 -50
  502. package/packages/orq-rc/src/types/index.ts +0 -11
  503. package/packages/orq-rc/src/types/operations.ts +0 -105
  504. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  505. package/packages/orq-rc/src/types/streams.ts +0 -21
  506. package/packages/orq-rc/tsconfig.json +0 -41
  507. package/src/funcs/knowledgeChunkText.ts +0 -160
  508. package/src/mcp-server/tools/knowledgeChunkText.ts +0 -37
@@ -1,1623 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- /**
13
- * Return format: chunks (with metadata) or texts (plain strings)
14
- */
15
- export const ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType = {
16
- Chunks: "chunks",
17
- Texts: "texts",
18
- } as const;
19
- /**
20
- * Return format: chunks (with metadata) or texts (plain strings)
21
- */
22
- export type ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType =
23
- ClosedEnum<
24
- typeof ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType
25
- >;
26
-
27
- export const AgenticChunker = {
28
- Agentic: "agentic",
29
- } as const;
30
- export type AgenticChunker = ClosedEnum<typeof AgenticChunker>;
31
-
32
- /**
33
- * Agentic LLM-powered chunker that uses AI to determine optimal split points. Best for complex documents requiring intelligent segmentation.
34
- */
35
- export type AgenticChunkerStrategy = {
36
- /**
37
- * The text content to be chunked
38
- */
39
- text: string;
40
- /**
41
- * Whether to include metadata for each chunk
42
- */
43
- metadata?: boolean | undefined;
44
- /**
45
- * Return format: chunks (with metadata) or texts (plain strings)
46
- */
47
- returnType?:
48
- | ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType
49
- | undefined;
50
- strategy: AgenticChunker;
51
- /**
52
- * Chat model to use for chunking. (Available models)[https://docs.orq.ai/docs/proxy#chat-models]
53
- */
54
- model: string;
55
- /**
56
- * Maximum tokens per chunk
57
- */
58
- chunkSize?: number | undefined;
59
- /**
60
- * Size of candidate splits for LLM evaluation
61
- */
62
- candidateSize?: number | undefined;
63
- /**
64
- * Minimum characters allowed per chunk
65
- */
66
- minCharactersPerChunk?: number | undefined;
67
- };
68
-
69
- /**
70
- * Return format: chunks (with metadata) or texts (plain strings)
71
- */
72
- export const ChunkTextChunkingRequestKnowledgeRequestReturnType = {
73
- Chunks: "chunks",
74
- Texts: "texts",
75
- } as const;
76
- /**
77
- * Return format: chunks (with metadata) or texts (plain strings)
78
- */
79
- export type ChunkTextChunkingRequestKnowledgeRequestReturnType = ClosedEnum<
80
- typeof ChunkTextChunkingRequestKnowledgeRequestReturnType
81
- >;
82
-
83
- export const SDPMChunker = {
84
- Sdpm: "sdpm",
85
- } as const;
86
- export type SDPMChunker = ClosedEnum<typeof SDPMChunker>;
87
-
88
- export const ChunkTextThreshold2 = {
89
- Auto: "auto",
90
- } as const;
91
- export type ChunkTextThreshold2 = ClosedEnum<typeof ChunkTextThreshold2>;
92
-
93
- /**
94
- * Similarity threshold for grouping (0-1) or "auto" for automatic detection
95
- */
96
- export type ChunkingRequestThreshold = number | ChunkTextThreshold2;
97
-
98
- /**
99
- * Chunking mode: window-based or sentence-based similarity
100
- */
101
- export const ChunkingRequestMode = {
102
- Window: "window",
103
- Sentence: "sentence",
104
- } as const;
105
- /**
106
- * Chunking mode: window-based or sentence-based similarity
107
- */
108
- export type ChunkingRequestMode = ClosedEnum<typeof ChunkingRequestMode>;
109
-
110
- /**
111
- * Sub-Document Prose Model chunker that uses skip-gram patterns to identify optimal split points. Good for technical documents with structured content.
112
- */
113
- export type SDPMChunkerStrategy = {
114
- /**
115
- * The text content to be chunked
116
- */
117
- text: string;
118
- /**
119
- * Whether to include metadata for each chunk
120
- */
121
- metadata?: boolean | undefined;
122
- /**
123
- * Return format: chunks (with metadata) or texts (plain strings)
124
- */
125
- returnType?: ChunkTextChunkingRequestKnowledgeRequestReturnType | undefined;
126
- strategy: SDPMChunker;
127
- /**
128
- * Maximum tokens per chunk
129
- */
130
- chunkSize?: number | undefined;
131
- /**
132
- * Window size for skip-gram patterns
133
- */
134
- skipWindow?: number | undefined;
135
- /**
136
- * Similarity threshold for grouping (0-1) or "auto" for automatic detection
137
- */
138
- threshold?: number | ChunkTextThreshold2 | undefined;
139
- /**
140
- * Embedding model to use for semantic similarity. (Available embedding models)[https://docs.orq.ai/docs/proxy#embedding-models]
141
- */
142
- embeddingModel: string;
143
- /**
144
- * Chunking mode: window-based or sentence-based similarity
145
- */
146
- mode?: ChunkingRequestMode | undefined;
147
- };
148
-
149
- /**
150
- * Return format: chunks (with metadata) or texts (plain strings)
151
- */
152
- export const ChunkTextChunkingRequestKnowledgeReturnType = {
153
- Chunks: "chunks",
154
- Texts: "texts",
155
- } as const;
156
- /**
157
- * Return format: chunks (with metadata) or texts (plain strings)
158
- */
159
- export type ChunkTextChunkingRequestKnowledgeReturnType = ClosedEnum<
160
- typeof ChunkTextChunkingRequestKnowledgeReturnType
161
- >;
162
-
163
- export const SemanticChunker = {
164
- Semantic: "semantic",
165
- } as const;
166
- export type SemanticChunker = ClosedEnum<typeof SemanticChunker>;
167
-
168
- export const Threshold2 = {
169
- Auto: "auto",
170
- } as const;
171
- export type Threshold2 = ClosedEnum<typeof Threshold2>;
172
-
173
- /**
174
- * Similarity threshold for grouping (0-1) or "auto" for automatic detection
175
- */
176
- export type Threshold = number | Threshold2;
177
-
178
- /**
179
- * Chunking mode: window-based or sentence-based similarity
180
- */
181
- export const Mode = {
182
- Window: "window",
183
- Sentence: "sentence",
184
- } as const;
185
- /**
186
- * Chunking mode: window-based or sentence-based similarity
187
- */
188
- export type Mode = ClosedEnum<typeof Mode>;
189
-
190
- /**
191
- * Groups semantically similar sentences using embeddings. Excellent for maintaining topic coherence and context within chunks.
192
- */
193
- export type SemanticChunkerStrategy = {
194
- /**
195
- * The text content to be chunked
196
- */
197
- text: string;
198
- /**
199
- * Whether to include metadata for each chunk
200
- */
201
- metadata?: boolean | undefined;
202
- /**
203
- * Return format: chunks (with metadata) or texts (plain strings)
204
- */
205
- returnType?: ChunkTextChunkingRequestKnowledgeReturnType | undefined;
206
- strategy: SemanticChunker;
207
- /**
208
- * Maximum tokens per chunk
209
- */
210
- chunkSize?: number | undefined;
211
- /**
212
- * Similarity threshold for grouping (0-1) or "auto" for automatic detection
213
- */
214
- threshold?: number | Threshold2 | undefined;
215
- /**
216
- * Embedding model to use for semantic similarity. (Available embedding models)[https://docs.orq.ai/docs/proxy#embedding-models]
217
- */
218
- embeddingModel: string;
219
- /**
220
- * Chunking mode: window-based or sentence-based similarity
221
- */
222
- mode?: Mode | undefined;
223
- /**
224
- * Window size for similarity comparison
225
- */
226
- similarityWindow?: number | undefined;
227
- };
228
-
229
- /**
230
- * Return format: chunks (with metadata) or texts (plain strings)
231
- */
232
- export const ChunkTextChunkingRequestReturnType = {
233
- Chunks: "chunks",
234
- Texts: "texts",
235
- } as const;
236
- /**
237
- * Return format: chunks (with metadata) or texts (plain strings)
238
- */
239
- export type ChunkTextChunkingRequestReturnType = ClosedEnum<
240
- typeof ChunkTextChunkingRequestReturnType
241
- >;
242
-
243
- export const RecursiveChunker = {
244
- Recursive: "recursive",
245
- } as const;
246
- export type RecursiveChunker = ClosedEnum<typeof RecursiveChunker>;
247
-
248
- /**
249
- * Recursively splits text using a hierarchy of separators (paragraphs, sentences, words). Versatile general-purpose chunker that preserves document structure.
250
- */
251
- export type RecursiveChunkerStrategy = {
252
- /**
253
- * The text content to be chunked
254
- */
255
- text: string;
256
- /**
257
- * Whether to include metadata for each chunk
258
- */
259
- metadata?: boolean | undefined;
260
- /**
261
- * Return format: chunks (with metadata) or texts (plain strings)
262
- */
263
- returnType?: ChunkTextChunkingRequestReturnType | undefined;
264
- strategy: RecursiveChunker;
265
- /**
266
- * Maximum tokens per chunk
267
- */
268
- chunkSize?: number | undefined;
269
- /**
270
- * Hierarchy of separators to use for splitting
271
- */
272
- separators?: Array<string> | undefined;
273
- /**
274
- * Minimum characters allowed per chunk
275
- */
276
- minCharactersPerChunk?: number | undefined;
277
- };
278
-
279
- /**
280
- * Return format: chunks (with metadata) or texts (plain strings)
281
- */
282
- export const ChunkingRequestReturnType = {
283
- Chunks: "chunks",
284
- Texts: "texts",
285
- } as const;
286
- /**
287
- * Return format: chunks (with metadata) or texts (plain strings)
288
- */
289
- export type ChunkingRequestReturnType = ClosedEnum<
290
- typeof ChunkingRequestReturnType
291
- >;
292
-
293
- export const SentenceChunker = {
294
- Sentence: "sentence",
295
- } as const;
296
- export type SentenceChunker = ClosedEnum<typeof SentenceChunker>;
297
-
298
- /**
299
- * Splits text at sentence boundaries while respecting token limits. Ideal for maintaining semantic coherence and readability.
300
- */
301
- export type SentenceChunkerStrategy = {
302
- /**
303
- * The text content to be chunked
304
- */
305
- text: string;
306
- /**
307
- * Whether to include metadata for each chunk
308
- */
309
- metadata?: boolean | undefined;
310
- /**
311
- * Return format: chunks (with metadata) or texts (plain strings)
312
- */
313
- returnType?: ChunkingRequestReturnType | undefined;
314
- strategy: SentenceChunker;
315
- /**
316
- * Maximum tokens per chunk
317
- */
318
- chunkSize?: number | undefined;
319
- /**
320
- * Number of overlapping tokens between chunks
321
- */
322
- chunkOverlap?: number | undefined;
323
- /**
324
- * Minimum number of sentences per chunk
325
- */
326
- minSentencesPerChunk?: number | undefined;
327
- };
328
-
329
- /**
330
- * Return format: chunks (with metadata) or texts (plain strings)
331
- */
332
- export const ReturnTypeT = {
333
- Chunks: "chunks",
334
- Texts: "texts",
335
- } as const;
336
- /**
337
- * Return format: chunks (with metadata) or texts (plain strings)
338
- */
339
- export type ReturnTypeT = ClosedEnum<typeof ReturnTypeT>;
340
-
341
- export const TokenChunker = {
342
- Token: "token",
343
- } as const;
344
- export type TokenChunker = ClosedEnum<typeof TokenChunker>;
345
-
346
- /**
347
- * Splits text based on token count. Best for ensuring chunks fit within LLM context windows and maintaining consistent chunk sizes for embedding models.
348
- */
349
- export type TokenChunkerStrategy = {
350
- /**
351
- * The text content to be chunked
352
- */
353
- text: string;
354
- /**
355
- * Whether to include metadata for each chunk
356
- */
357
- metadata?: boolean | undefined;
358
- /**
359
- * Return format: chunks (with metadata) or texts (plain strings)
360
- */
361
- returnType?: ReturnTypeT | undefined;
362
- strategy: TokenChunker;
363
- /**
364
- * Maximum tokens per chunk
365
- */
366
- chunkSize?: number | undefined;
367
- /**
368
- * Number of tokens to overlap between chunks
369
- */
370
- chunkOverlap?: number | undefined;
371
- };
372
-
373
- /**
374
- * Request payload for text chunking with strategy-specific configuration
375
- */
376
- export type ChunkTextChunkingRequest =
377
- | SemanticChunkerStrategy
378
- | SDPMChunkerStrategy
379
- | AgenticChunkerStrategy
380
- | TokenChunkerStrategy
381
- | SentenceChunkerStrategy
382
- | RecursiveChunkerStrategy;
383
-
384
- export type ChunkTextMetadata = {
385
- startIndex: number | null;
386
- endIndex: number | null;
387
- tokenCount: number | null;
388
- };
389
-
390
- export type Chunks = {
391
- /**
392
- * The text content of the chunk
393
- */
394
- text: string;
395
- /**
396
- * The position index of this chunk in the sequence
397
- */
398
- index: number;
399
- metadata?: ChunkTextMetadata | undefined;
400
- };
401
-
402
- /**
403
- * Text successfully chunked
404
- */
405
- export type ChunkTextResponseBody = {
406
- chunks: Array<Chunks>;
407
- };
408
-
409
- /** @internal */
410
- export const ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema:
411
- z.ZodNativeEnum<
412
- typeof ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType
413
- > = z.nativeEnum(
414
- ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType,
415
- );
416
-
417
- /** @internal */
418
- export const ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema:
419
- z.ZodNativeEnum<
420
- typeof ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType
421
- > =
422
- ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema;
423
-
424
- /**
425
- * @internal
426
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
427
- */
428
- export namespace ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$ {
429
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema` instead. */
430
- export const inboundSchema =
431
- ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema;
432
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema` instead. */
433
- export const outboundSchema =
434
- ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema;
435
- }
436
-
437
- /** @internal */
438
- export const AgenticChunker$inboundSchema: z.ZodNativeEnum<
439
- typeof AgenticChunker
440
- > = z.nativeEnum(AgenticChunker);
441
-
442
- /** @internal */
443
- export const AgenticChunker$outboundSchema: z.ZodNativeEnum<
444
- typeof AgenticChunker
445
- > = AgenticChunker$inboundSchema;
446
-
447
- /**
448
- * @internal
449
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
450
- */
451
- export namespace AgenticChunker$ {
452
- /** @deprecated use `AgenticChunker$inboundSchema` instead. */
453
- export const inboundSchema = AgenticChunker$inboundSchema;
454
- /** @deprecated use `AgenticChunker$outboundSchema` instead. */
455
- export const outboundSchema = AgenticChunker$outboundSchema;
456
- }
457
-
458
- /** @internal */
459
- export const AgenticChunkerStrategy$inboundSchema: z.ZodType<
460
- AgenticChunkerStrategy,
461
- z.ZodTypeDef,
462
- unknown
463
- > = z.object({
464
- text: z.string(),
465
- metadata: z.boolean().default(true),
466
- return_type:
467
- ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$inboundSchema
468
- .default("chunks"),
469
- strategy: AgenticChunker$inboundSchema,
470
- model: z.string(),
471
- chunk_size: z.number().int().default(1024),
472
- candidate_size: z.number().int().default(128),
473
- min_characters_per_chunk: z.number().int().default(24),
474
- }).transform((v) => {
475
- return remap$(v, {
476
- "return_type": "returnType",
477
- "chunk_size": "chunkSize",
478
- "candidate_size": "candidateSize",
479
- "min_characters_per_chunk": "minCharactersPerChunk",
480
- });
481
- });
482
-
483
- /** @internal */
484
- export type AgenticChunkerStrategy$Outbound = {
485
- text: string;
486
- metadata: boolean;
487
- return_type: string;
488
- strategy: string;
489
- model: string;
490
- chunk_size: number;
491
- candidate_size: number;
492
- min_characters_per_chunk: number;
493
- };
494
-
495
- /** @internal */
496
- export const AgenticChunkerStrategy$outboundSchema: z.ZodType<
497
- AgenticChunkerStrategy$Outbound,
498
- z.ZodTypeDef,
499
- AgenticChunkerStrategy
500
- > = z.object({
501
- text: z.string(),
502
- metadata: z.boolean().default(true),
503
- returnType:
504
- ChunkTextChunkingRequestKnowledgeRequestRequestBodyReturnType$outboundSchema
505
- .default("chunks"),
506
- strategy: AgenticChunker$outboundSchema,
507
- model: z.string(),
508
- chunkSize: z.number().int().default(1024),
509
- candidateSize: z.number().int().default(128),
510
- minCharactersPerChunk: z.number().int().default(24),
511
- }).transform((v) => {
512
- return remap$(v, {
513
- returnType: "return_type",
514
- chunkSize: "chunk_size",
515
- candidateSize: "candidate_size",
516
- minCharactersPerChunk: "min_characters_per_chunk",
517
- });
518
- });
519
-
520
- /**
521
- * @internal
522
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
523
- */
524
- export namespace AgenticChunkerStrategy$ {
525
- /** @deprecated use `AgenticChunkerStrategy$inboundSchema` instead. */
526
- export const inboundSchema = AgenticChunkerStrategy$inboundSchema;
527
- /** @deprecated use `AgenticChunkerStrategy$outboundSchema` instead. */
528
- export const outboundSchema = AgenticChunkerStrategy$outboundSchema;
529
- /** @deprecated use `AgenticChunkerStrategy$Outbound` instead. */
530
- export type Outbound = AgenticChunkerStrategy$Outbound;
531
- }
532
-
533
- export function agenticChunkerStrategyToJSON(
534
- agenticChunkerStrategy: AgenticChunkerStrategy,
535
- ): string {
536
- return JSON.stringify(
537
- AgenticChunkerStrategy$outboundSchema.parse(agenticChunkerStrategy),
538
- );
539
- }
540
-
541
- export function agenticChunkerStrategyFromJSON(
542
- jsonString: string,
543
- ): SafeParseResult<AgenticChunkerStrategy, SDKValidationError> {
544
- return safeParse(
545
- jsonString,
546
- (x) => AgenticChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
547
- `Failed to parse 'AgenticChunkerStrategy' from JSON`,
548
- );
549
- }
550
-
551
- /** @internal */
552
- export const ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema:
553
- z.ZodNativeEnum<typeof ChunkTextChunkingRequestKnowledgeRequestReturnType> = z
554
- .nativeEnum(ChunkTextChunkingRequestKnowledgeRequestReturnType);
555
-
556
- /** @internal */
557
- export const ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema:
558
- z.ZodNativeEnum<typeof ChunkTextChunkingRequestKnowledgeRequestReturnType> =
559
- ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema;
560
-
561
- /**
562
- * @internal
563
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
564
- */
565
- export namespace ChunkTextChunkingRequestKnowledgeRequestReturnType$ {
566
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema` instead. */
567
- export const inboundSchema =
568
- ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema;
569
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema` instead. */
570
- export const outboundSchema =
571
- ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema;
572
- }
573
-
574
- /** @internal */
575
- export const SDPMChunker$inboundSchema: z.ZodNativeEnum<typeof SDPMChunker> = z
576
- .nativeEnum(SDPMChunker);
577
-
578
- /** @internal */
579
- export const SDPMChunker$outboundSchema: z.ZodNativeEnum<typeof SDPMChunker> =
580
- SDPMChunker$inboundSchema;
581
-
582
- /**
583
- * @internal
584
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
585
- */
586
- export namespace SDPMChunker$ {
587
- /** @deprecated use `SDPMChunker$inboundSchema` instead. */
588
- export const inboundSchema = SDPMChunker$inboundSchema;
589
- /** @deprecated use `SDPMChunker$outboundSchema` instead. */
590
- export const outboundSchema = SDPMChunker$outboundSchema;
591
- }
592
-
593
- /** @internal */
594
- export const ChunkTextThreshold2$inboundSchema: z.ZodNativeEnum<
595
- typeof ChunkTextThreshold2
596
- > = z.nativeEnum(ChunkTextThreshold2);
597
-
598
- /** @internal */
599
- export const ChunkTextThreshold2$outboundSchema: z.ZodNativeEnum<
600
- typeof ChunkTextThreshold2
601
- > = ChunkTextThreshold2$inboundSchema;
602
-
603
- /**
604
- * @internal
605
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
606
- */
607
- export namespace ChunkTextThreshold2$ {
608
- /** @deprecated use `ChunkTextThreshold2$inboundSchema` instead. */
609
- export const inboundSchema = ChunkTextThreshold2$inboundSchema;
610
- /** @deprecated use `ChunkTextThreshold2$outboundSchema` instead. */
611
- export const outboundSchema = ChunkTextThreshold2$outboundSchema;
612
- }
613
-
614
- /** @internal */
615
- export const ChunkingRequestThreshold$inboundSchema: z.ZodType<
616
- ChunkingRequestThreshold,
617
- z.ZodTypeDef,
618
- unknown
619
- > = z.union([z.number(), ChunkTextThreshold2$inboundSchema]);
620
-
621
- /** @internal */
622
- export type ChunkingRequestThreshold$Outbound = number | string;
623
-
624
- /** @internal */
625
- export const ChunkingRequestThreshold$outboundSchema: z.ZodType<
626
- ChunkingRequestThreshold$Outbound,
627
- z.ZodTypeDef,
628
- ChunkingRequestThreshold
629
- > = z.union([z.number(), ChunkTextThreshold2$outboundSchema]);
630
-
631
- /**
632
- * @internal
633
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
634
- */
635
- export namespace ChunkingRequestThreshold$ {
636
- /** @deprecated use `ChunkingRequestThreshold$inboundSchema` instead. */
637
- export const inboundSchema = ChunkingRequestThreshold$inboundSchema;
638
- /** @deprecated use `ChunkingRequestThreshold$outboundSchema` instead. */
639
- export const outboundSchema = ChunkingRequestThreshold$outboundSchema;
640
- /** @deprecated use `ChunkingRequestThreshold$Outbound` instead. */
641
- export type Outbound = ChunkingRequestThreshold$Outbound;
642
- }
643
-
644
- export function chunkingRequestThresholdToJSON(
645
- chunkingRequestThreshold: ChunkingRequestThreshold,
646
- ): string {
647
- return JSON.stringify(
648
- ChunkingRequestThreshold$outboundSchema.parse(chunkingRequestThreshold),
649
- );
650
- }
651
-
652
- export function chunkingRequestThresholdFromJSON(
653
- jsonString: string,
654
- ): SafeParseResult<ChunkingRequestThreshold, SDKValidationError> {
655
- return safeParse(
656
- jsonString,
657
- (x) => ChunkingRequestThreshold$inboundSchema.parse(JSON.parse(x)),
658
- `Failed to parse 'ChunkingRequestThreshold' from JSON`,
659
- );
660
- }
661
-
662
- /** @internal */
663
- export const ChunkingRequestMode$inboundSchema: z.ZodNativeEnum<
664
- typeof ChunkingRequestMode
665
- > = z.nativeEnum(ChunkingRequestMode);
666
-
667
- /** @internal */
668
- export const ChunkingRequestMode$outboundSchema: z.ZodNativeEnum<
669
- typeof ChunkingRequestMode
670
- > = ChunkingRequestMode$inboundSchema;
671
-
672
- /**
673
- * @internal
674
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
675
- */
676
- export namespace ChunkingRequestMode$ {
677
- /** @deprecated use `ChunkingRequestMode$inboundSchema` instead. */
678
- export const inboundSchema = ChunkingRequestMode$inboundSchema;
679
- /** @deprecated use `ChunkingRequestMode$outboundSchema` instead. */
680
- export const outboundSchema = ChunkingRequestMode$outboundSchema;
681
- }
682
-
683
- /** @internal */
684
- export const SDPMChunkerStrategy$inboundSchema: z.ZodType<
685
- SDPMChunkerStrategy,
686
- z.ZodTypeDef,
687
- unknown
688
- > = z.object({
689
- text: z.string(),
690
- metadata: z.boolean().default(true),
691
- return_type: ChunkTextChunkingRequestKnowledgeRequestReturnType$inboundSchema
692
- .default("chunks"),
693
- strategy: SDPMChunker$inboundSchema,
694
- chunk_size: z.number().int().default(512),
695
- skip_window: z.number().int().default(1),
696
- threshold: z.union([z.number(), ChunkTextThreshold2$inboundSchema])
697
- .optional(),
698
- embedding_model: z.string(),
699
- mode: ChunkingRequestMode$inboundSchema.default("window"),
700
- }).transform((v) => {
701
- return remap$(v, {
702
- "return_type": "returnType",
703
- "chunk_size": "chunkSize",
704
- "skip_window": "skipWindow",
705
- "embedding_model": "embeddingModel",
706
- });
707
- });
708
-
709
- /** @internal */
710
- export type SDPMChunkerStrategy$Outbound = {
711
- text: string;
712
- metadata: boolean;
713
- return_type: string;
714
- strategy: string;
715
- chunk_size: number;
716
- skip_window: number;
717
- threshold?: number | string | undefined;
718
- embedding_model: string;
719
- mode: string;
720
- };
721
-
722
- /** @internal */
723
- export const SDPMChunkerStrategy$outboundSchema: z.ZodType<
724
- SDPMChunkerStrategy$Outbound,
725
- z.ZodTypeDef,
726
- SDPMChunkerStrategy
727
- > = z.object({
728
- text: z.string(),
729
- metadata: z.boolean().default(true),
730
- returnType: ChunkTextChunkingRequestKnowledgeRequestReturnType$outboundSchema
731
- .default("chunks"),
732
- strategy: SDPMChunker$outboundSchema,
733
- chunkSize: z.number().int().default(512),
734
- skipWindow: z.number().int().default(1),
735
- threshold: z.union([z.number(), ChunkTextThreshold2$outboundSchema])
736
- .optional(),
737
- embeddingModel: z.string(),
738
- mode: ChunkingRequestMode$outboundSchema.default("window"),
739
- }).transform((v) => {
740
- return remap$(v, {
741
- returnType: "return_type",
742
- chunkSize: "chunk_size",
743
- skipWindow: "skip_window",
744
- embeddingModel: "embedding_model",
745
- });
746
- });
747
-
748
- /**
749
- * @internal
750
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
751
- */
752
- export namespace SDPMChunkerStrategy$ {
753
- /** @deprecated use `SDPMChunkerStrategy$inboundSchema` instead. */
754
- export const inboundSchema = SDPMChunkerStrategy$inboundSchema;
755
- /** @deprecated use `SDPMChunkerStrategy$outboundSchema` instead. */
756
- export const outboundSchema = SDPMChunkerStrategy$outboundSchema;
757
- /** @deprecated use `SDPMChunkerStrategy$Outbound` instead. */
758
- export type Outbound = SDPMChunkerStrategy$Outbound;
759
- }
760
-
761
- export function sdpmChunkerStrategyToJSON(
762
- sdpmChunkerStrategy: SDPMChunkerStrategy,
763
- ): string {
764
- return JSON.stringify(
765
- SDPMChunkerStrategy$outboundSchema.parse(sdpmChunkerStrategy),
766
- );
767
- }
768
-
769
- export function sdpmChunkerStrategyFromJSON(
770
- jsonString: string,
771
- ): SafeParseResult<SDPMChunkerStrategy, SDKValidationError> {
772
- return safeParse(
773
- jsonString,
774
- (x) => SDPMChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
775
- `Failed to parse 'SDPMChunkerStrategy' from JSON`,
776
- );
777
- }
778
-
779
- /** @internal */
780
- export const ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema:
781
- z.ZodNativeEnum<typeof ChunkTextChunkingRequestKnowledgeReturnType> = z
782
- .nativeEnum(ChunkTextChunkingRequestKnowledgeReturnType);
783
-
784
- /** @internal */
785
- export const ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema:
786
- z.ZodNativeEnum<typeof ChunkTextChunkingRequestKnowledgeReturnType> =
787
- ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema;
788
-
789
- /**
790
- * @internal
791
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
792
- */
793
- export namespace ChunkTextChunkingRequestKnowledgeReturnType$ {
794
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema` instead. */
795
- export const inboundSchema =
796
- ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema;
797
- /** @deprecated use `ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema` instead. */
798
- export const outboundSchema =
799
- ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema;
800
- }
801
-
802
- /** @internal */
803
- export const SemanticChunker$inboundSchema: z.ZodNativeEnum<
804
- typeof SemanticChunker
805
- > = z.nativeEnum(SemanticChunker);
806
-
807
- /** @internal */
808
- export const SemanticChunker$outboundSchema: z.ZodNativeEnum<
809
- typeof SemanticChunker
810
- > = SemanticChunker$inboundSchema;
811
-
812
- /**
813
- * @internal
814
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
815
- */
816
- export namespace SemanticChunker$ {
817
- /** @deprecated use `SemanticChunker$inboundSchema` instead. */
818
- export const inboundSchema = SemanticChunker$inboundSchema;
819
- /** @deprecated use `SemanticChunker$outboundSchema` instead. */
820
- export const outboundSchema = SemanticChunker$outboundSchema;
821
- }
822
-
823
- /** @internal */
824
- export const Threshold2$inboundSchema: z.ZodNativeEnum<typeof Threshold2> = z
825
- .nativeEnum(Threshold2);
826
-
827
- /** @internal */
828
- export const Threshold2$outboundSchema: z.ZodNativeEnum<typeof Threshold2> =
829
- Threshold2$inboundSchema;
830
-
831
- /**
832
- * @internal
833
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
834
- */
835
- export namespace Threshold2$ {
836
- /** @deprecated use `Threshold2$inboundSchema` instead. */
837
- export const inboundSchema = Threshold2$inboundSchema;
838
- /** @deprecated use `Threshold2$outboundSchema` instead. */
839
- export const outboundSchema = Threshold2$outboundSchema;
840
- }
841
-
842
- /** @internal */
843
- export const Threshold$inboundSchema: z.ZodType<
844
- Threshold,
845
- z.ZodTypeDef,
846
- unknown
847
- > = z.union([z.number(), Threshold2$inboundSchema]);
848
-
849
- /** @internal */
850
- export type Threshold$Outbound = number | string;
851
-
852
- /** @internal */
853
- export const Threshold$outboundSchema: z.ZodType<
854
- Threshold$Outbound,
855
- z.ZodTypeDef,
856
- Threshold
857
- > = z.union([z.number(), Threshold2$outboundSchema]);
858
-
859
- /**
860
- * @internal
861
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
862
- */
863
- export namespace Threshold$ {
864
- /** @deprecated use `Threshold$inboundSchema` instead. */
865
- export const inboundSchema = Threshold$inboundSchema;
866
- /** @deprecated use `Threshold$outboundSchema` instead. */
867
- export const outboundSchema = Threshold$outboundSchema;
868
- /** @deprecated use `Threshold$Outbound` instead. */
869
- export type Outbound = Threshold$Outbound;
870
- }
871
-
872
- export function thresholdToJSON(threshold: Threshold): string {
873
- return JSON.stringify(Threshold$outboundSchema.parse(threshold));
874
- }
875
-
876
- export function thresholdFromJSON(
877
- jsonString: string,
878
- ): SafeParseResult<Threshold, SDKValidationError> {
879
- return safeParse(
880
- jsonString,
881
- (x) => Threshold$inboundSchema.parse(JSON.parse(x)),
882
- `Failed to parse 'Threshold' from JSON`,
883
- );
884
- }
885
-
886
- /** @internal */
887
- export const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode> = z.nativeEnum(
888
- Mode,
889
- );
890
-
891
- /** @internal */
892
- export const Mode$outboundSchema: z.ZodNativeEnum<typeof Mode> =
893
- Mode$inboundSchema;
894
-
895
- /**
896
- * @internal
897
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
898
- */
899
- export namespace Mode$ {
900
- /** @deprecated use `Mode$inboundSchema` instead. */
901
- export const inboundSchema = Mode$inboundSchema;
902
- /** @deprecated use `Mode$outboundSchema` instead. */
903
- export const outboundSchema = Mode$outboundSchema;
904
- }
905
-
906
- /** @internal */
907
- export const SemanticChunkerStrategy$inboundSchema: z.ZodType<
908
- SemanticChunkerStrategy,
909
- z.ZodTypeDef,
910
- unknown
911
- > = z.object({
912
- text: z.string(),
913
- metadata: z.boolean().default(true),
914
- return_type: ChunkTextChunkingRequestKnowledgeReturnType$inboundSchema
915
- .default("chunks"),
916
- strategy: SemanticChunker$inboundSchema,
917
- chunk_size: z.number().int().default(512),
918
- threshold: z.union([z.number(), Threshold2$inboundSchema]).optional(),
919
- embedding_model: z.string(),
920
- mode: Mode$inboundSchema.default("window"),
921
- similarity_window: z.number().int().default(1),
922
- }).transform((v) => {
923
- return remap$(v, {
924
- "return_type": "returnType",
925
- "chunk_size": "chunkSize",
926
- "embedding_model": "embeddingModel",
927
- "similarity_window": "similarityWindow",
928
- });
929
- });
930
-
931
- /** @internal */
932
- export type SemanticChunkerStrategy$Outbound = {
933
- text: string;
934
- metadata: boolean;
935
- return_type: string;
936
- strategy: string;
937
- chunk_size: number;
938
- threshold?: number | string | undefined;
939
- embedding_model: string;
940
- mode: string;
941
- similarity_window: number;
942
- };
943
-
944
- /** @internal */
945
- export const SemanticChunkerStrategy$outboundSchema: z.ZodType<
946
- SemanticChunkerStrategy$Outbound,
947
- z.ZodTypeDef,
948
- SemanticChunkerStrategy
949
- > = z.object({
950
- text: z.string(),
951
- metadata: z.boolean().default(true),
952
- returnType: ChunkTextChunkingRequestKnowledgeReturnType$outboundSchema
953
- .default("chunks"),
954
- strategy: SemanticChunker$outboundSchema,
955
- chunkSize: z.number().int().default(512),
956
- threshold: z.union([z.number(), Threshold2$outboundSchema]).optional(),
957
- embeddingModel: z.string(),
958
- mode: Mode$outboundSchema.default("window"),
959
- similarityWindow: z.number().int().default(1),
960
- }).transform((v) => {
961
- return remap$(v, {
962
- returnType: "return_type",
963
- chunkSize: "chunk_size",
964
- embeddingModel: "embedding_model",
965
- similarityWindow: "similarity_window",
966
- });
967
- });
968
-
969
- /**
970
- * @internal
971
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
972
- */
973
- export namespace SemanticChunkerStrategy$ {
974
- /** @deprecated use `SemanticChunkerStrategy$inboundSchema` instead. */
975
- export const inboundSchema = SemanticChunkerStrategy$inboundSchema;
976
- /** @deprecated use `SemanticChunkerStrategy$outboundSchema` instead. */
977
- export const outboundSchema = SemanticChunkerStrategy$outboundSchema;
978
- /** @deprecated use `SemanticChunkerStrategy$Outbound` instead. */
979
- export type Outbound = SemanticChunkerStrategy$Outbound;
980
- }
981
-
982
- export function semanticChunkerStrategyToJSON(
983
- semanticChunkerStrategy: SemanticChunkerStrategy,
984
- ): string {
985
- return JSON.stringify(
986
- SemanticChunkerStrategy$outboundSchema.parse(semanticChunkerStrategy),
987
- );
988
- }
989
-
990
- export function semanticChunkerStrategyFromJSON(
991
- jsonString: string,
992
- ): SafeParseResult<SemanticChunkerStrategy, SDKValidationError> {
993
- return safeParse(
994
- jsonString,
995
- (x) => SemanticChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
996
- `Failed to parse 'SemanticChunkerStrategy' from JSON`,
997
- );
998
- }
999
-
1000
- /** @internal */
1001
- export const ChunkTextChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
1002
- typeof ChunkTextChunkingRequestReturnType
1003
- > = z.nativeEnum(ChunkTextChunkingRequestReturnType);
1004
-
1005
- /** @internal */
1006
- export const ChunkTextChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
1007
- typeof ChunkTextChunkingRequestReturnType
1008
- > = ChunkTextChunkingRequestReturnType$inboundSchema;
1009
-
1010
- /**
1011
- * @internal
1012
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1013
- */
1014
- export namespace ChunkTextChunkingRequestReturnType$ {
1015
- /** @deprecated use `ChunkTextChunkingRequestReturnType$inboundSchema` instead. */
1016
- export const inboundSchema = ChunkTextChunkingRequestReturnType$inboundSchema;
1017
- /** @deprecated use `ChunkTextChunkingRequestReturnType$outboundSchema` instead. */
1018
- export const outboundSchema =
1019
- ChunkTextChunkingRequestReturnType$outboundSchema;
1020
- }
1021
-
1022
- /** @internal */
1023
- export const RecursiveChunker$inboundSchema: z.ZodNativeEnum<
1024
- typeof RecursiveChunker
1025
- > = z.nativeEnum(RecursiveChunker);
1026
-
1027
- /** @internal */
1028
- export const RecursiveChunker$outboundSchema: z.ZodNativeEnum<
1029
- typeof RecursiveChunker
1030
- > = RecursiveChunker$inboundSchema;
1031
-
1032
- /**
1033
- * @internal
1034
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1035
- */
1036
- export namespace RecursiveChunker$ {
1037
- /** @deprecated use `RecursiveChunker$inboundSchema` instead. */
1038
- export const inboundSchema = RecursiveChunker$inboundSchema;
1039
- /** @deprecated use `RecursiveChunker$outboundSchema` instead. */
1040
- export const outboundSchema = RecursiveChunker$outboundSchema;
1041
- }
1042
-
1043
- /** @internal */
1044
- export const RecursiveChunkerStrategy$inboundSchema: z.ZodType<
1045
- RecursiveChunkerStrategy,
1046
- z.ZodTypeDef,
1047
- unknown
1048
- > = z.object({
1049
- text: z.string(),
1050
- metadata: z.boolean().default(true),
1051
- return_type: ChunkTextChunkingRequestReturnType$inboundSchema.default(
1052
- "chunks",
1053
- ),
1054
- strategy: RecursiveChunker$inboundSchema,
1055
- chunk_size: z.number().int().default(512),
1056
- separators: z.array(z.string()).optional(),
1057
- min_characters_per_chunk: z.number().int().default(24),
1058
- }).transform((v) => {
1059
- return remap$(v, {
1060
- "return_type": "returnType",
1061
- "chunk_size": "chunkSize",
1062
- "min_characters_per_chunk": "minCharactersPerChunk",
1063
- });
1064
- });
1065
-
1066
- /** @internal */
1067
- export type RecursiveChunkerStrategy$Outbound = {
1068
- text: string;
1069
- metadata: boolean;
1070
- return_type: string;
1071
- strategy: string;
1072
- chunk_size: number;
1073
- separators?: Array<string> | undefined;
1074
- min_characters_per_chunk: number;
1075
- };
1076
-
1077
- /** @internal */
1078
- export const RecursiveChunkerStrategy$outboundSchema: z.ZodType<
1079
- RecursiveChunkerStrategy$Outbound,
1080
- z.ZodTypeDef,
1081
- RecursiveChunkerStrategy
1082
- > = z.object({
1083
- text: z.string(),
1084
- metadata: z.boolean().default(true),
1085
- returnType: ChunkTextChunkingRequestReturnType$outboundSchema.default(
1086
- "chunks",
1087
- ),
1088
- strategy: RecursiveChunker$outboundSchema,
1089
- chunkSize: z.number().int().default(512),
1090
- separators: z.array(z.string()).optional(),
1091
- minCharactersPerChunk: z.number().int().default(24),
1092
- }).transform((v) => {
1093
- return remap$(v, {
1094
- returnType: "return_type",
1095
- chunkSize: "chunk_size",
1096
- minCharactersPerChunk: "min_characters_per_chunk",
1097
- });
1098
- });
1099
-
1100
- /**
1101
- * @internal
1102
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1103
- */
1104
- export namespace RecursiveChunkerStrategy$ {
1105
- /** @deprecated use `RecursiveChunkerStrategy$inboundSchema` instead. */
1106
- export const inboundSchema = RecursiveChunkerStrategy$inboundSchema;
1107
- /** @deprecated use `RecursiveChunkerStrategy$outboundSchema` instead. */
1108
- export const outboundSchema = RecursiveChunkerStrategy$outboundSchema;
1109
- /** @deprecated use `RecursiveChunkerStrategy$Outbound` instead. */
1110
- export type Outbound = RecursiveChunkerStrategy$Outbound;
1111
- }
1112
-
1113
- export function recursiveChunkerStrategyToJSON(
1114
- recursiveChunkerStrategy: RecursiveChunkerStrategy,
1115
- ): string {
1116
- return JSON.stringify(
1117
- RecursiveChunkerStrategy$outboundSchema.parse(recursiveChunkerStrategy),
1118
- );
1119
- }
1120
-
1121
- export function recursiveChunkerStrategyFromJSON(
1122
- jsonString: string,
1123
- ): SafeParseResult<RecursiveChunkerStrategy, SDKValidationError> {
1124
- return safeParse(
1125
- jsonString,
1126
- (x) => RecursiveChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
1127
- `Failed to parse 'RecursiveChunkerStrategy' from JSON`,
1128
- );
1129
- }
1130
-
1131
- /** @internal */
1132
- export const ChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
1133
- typeof ChunkingRequestReturnType
1134
- > = z.nativeEnum(ChunkingRequestReturnType);
1135
-
1136
- /** @internal */
1137
- export const ChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
1138
- typeof ChunkingRequestReturnType
1139
- > = ChunkingRequestReturnType$inboundSchema;
1140
-
1141
- /**
1142
- * @internal
1143
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1144
- */
1145
- export namespace ChunkingRequestReturnType$ {
1146
- /** @deprecated use `ChunkingRequestReturnType$inboundSchema` instead. */
1147
- export const inboundSchema = ChunkingRequestReturnType$inboundSchema;
1148
- /** @deprecated use `ChunkingRequestReturnType$outboundSchema` instead. */
1149
- export const outboundSchema = ChunkingRequestReturnType$outboundSchema;
1150
- }
1151
-
1152
- /** @internal */
1153
- export const SentenceChunker$inboundSchema: z.ZodNativeEnum<
1154
- typeof SentenceChunker
1155
- > = z.nativeEnum(SentenceChunker);
1156
-
1157
- /** @internal */
1158
- export const SentenceChunker$outboundSchema: z.ZodNativeEnum<
1159
- typeof SentenceChunker
1160
- > = SentenceChunker$inboundSchema;
1161
-
1162
- /**
1163
- * @internal
1164
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1165
- */
1166
- export namespace SentenceChunker$ {
1167
- /** @deprecated use `SentenceChunker$inboundSchema` instead. */
1168
- export const inboundSchema = SentenceChunker$inboundSchema;
1169
- /** @deprecated use `SentenceChunker$outboundSchema` instead. */
1170
- export const outboundSchema = SentenceChunker$outboundSchema;
1171
- }
1172
-
1173
- /** @internal */
1174
- export const SentenceChunkerStrategy$inboundSchema: z.ZodType<
1175
- SentenceChunkerStrategy,
1176
- z.ZodTypeDef,
1177
- unknown
1178
- > = z.object({
1179
- text: z.string(),
1180
- metadata: z.boolean().default(true),
1181
- return_type: ChunkingRequestReturnType$inboundSchema.default("chunks"),
1182
- strategy: SentenceChunker$inboundSchema,
1183
- chunk_size: z.number().int().default(512),
1184
- chunk_overlap: z.number().int().default(0),
1185
- min_sentences_per_chunk: z.number().int().default(1),
1186
- }).transform((v) => {
1187
- return remap$(v, {
1188
- "return_type": "returnType",
1189
- "chunk_size": "chunkSize",
1190
- "chunk_overlap": "chunkOverlap",
1191
- "min_sentences_per_chunk": "minSentencesPerChunk",
1192
- });
1193
- });
1194
-
1195
- /** @internal */
1196
- export type SentenceChunkerStrategy$Outbound = {
1197
- text: string;
1198
- metadata: boolean;
1199
- return_type: string;
1200
- strategy: string;
1201
- chunk_size: number;
1202
- chunk_overlap: number;
1203
- min_sentences_per_chunk: number;
1204
- };
1205
-
1206
- /** @internal */
1207
- export const SentenceChunkerStrategy$outboundSchema: z.ZodType<
1208
- SentenceChunkerStrategy$Outbound,
1209
- z.ZodTypeDef,
1210
- SentenceChunkerStrategy
1211
- > = z.object({
1212
- text: z.string(),
1213
- metadata: z.boolean().default(true),
1214
- returnType: ChunkingRequestReturnType$outboundSchema.default("chunks"),
1215
- strategy: SentenceChunker$outboundSchema,
1216
- chunkSize: z.number().int().default(512),
1217
- chunkOverlap: z.number().int().default(0),
1218
- minSentencesPerChunk: z.number().int().default(1),
1219
- }).transform((v) => {
1220
- return remap$(v, {
1221
- returnType: "return_type",
1222
- chunkSize: "chunk_size",
1223
- chunkOverlap: "chunk_overlap",
1224
- minSentencesPerChunk: "min_sentences_per_chunk",
1225
- });
1226
- });
1227
-
1228
- /**
1229
- * @internal
1230
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1231
- */
1232
- export namespace SentenceChunkerStrategy$ {
1233
- /** @deprecated use `SentenceChunkerStrategy$inboundSchema` instead. */
1234
- export const inboundSchema = SentenceChunkerStrategy$inboundSchema;
1235
- /** @deprecated use `SentenceChunkerStrategy$outboundSchema` instead. */
1236
- export const outboundSchema = SentenceChunkerStrategy$outboundSchema;
1237
- /** @deprecated use `SentenceChunkerStrategy$Outbound` instead. */
1238
- export type Outbound = SentenceChunkerStrategy$Outbound;
1239
- }
1240
-
1241
- export function sentenceChunkerStrategyToJSON(
1242
- sentenceChunkerStrategy: SentenceChunkerStrategy,
1243
- ): string {
1244
- return JSON.stringify(
1245
- SentenceChunkerStrategy$outboundSchema.parse(sentenceChunkerStrategy),
1246
- );
1247
- }
1248
-
1249
- export function sentenceChunkerStrategyFromJSON(
1250
- jsonString: string,
1251
- ): SafeParseResult<SentenceChunkerStrategy, SDKValidationError> {
1252
- return safeParse(
1253
- jsonString,
1254
- (x) => SentenceChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
1255
- `Failed to parse 'SentenceChunkerStrategy' from JSON`,
1256
- );
1257
- }
1258
-
1259
- /** @internal */
1260
- export const ReturnTypeT$inboundSchema: z.ZodNativeEnum<typeof ReturnTypeT> = z
1261
- .nativeEnum(ReturnTypeT);
1262
-
1263
- /** @internal */
1264
- export const ReturnTypeT$outboundSchema: z.ZodNativeEnum<typeof ReturnTypeT> =
1265
- ReturnTypeT$inboundSchema;
1266
-
1267
- /**
1268
- * @internal
1269
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1270
- */
1271
- export namespace ReturnTypeT$ {
1272
- /** @deprecated use `ReturnTypeT$inboundSchema` instead. */
1273
- export const inboundSchema = ReturnTypeT$inboundSchema;
1274
- /** @deprecated use `ReturnTypeT$outboundSchema` instead. */
1275
- export const outboundSchema = ReturnTypeT$outboundSchema;
1276
- }
1277
-
1278
- /** @internal */
1279
- export const TokenChunker$inboundSchema: z.ZodNativeEnum<typeof TokenChunker> =
1280
- z.nativeEnum(TokenChunker);
1281
-
1282
- /** @internal */
1283
- export const TokenChunker$outboundSchema: z.ZodNativeEnum<typeof TokenChunker> =
1284
- TokenChunker$inboundSchema;
1285
-
1286
- /**
1287
- * @internal
1288
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1289
- */
1290
- export namespace TokenChunker$ {
1291
- /** @deprecated use `TokenChunker$inboundSchema` instead. */
1292
- export const inboundSchema = TokenChunker$inboundSchema;
1293
- /** @deprecated use `TokenChunker$outboundSchema` instead. */
1294
- export const outboundSchema = TokenChunker$outboundSchema;
1295
- }
1296
-
1297
- /** @internal */
1298
- export const TokenChunkerStrategy$inboundSchema: z.ZodType<
1299
- TokenChunkerStrategy,
1300
- z.ZodTypeDef,
1301
- unknown
1302
- > = z.object({
1303
- text: z.string(),
1304
- metadata: z.boolean().default(true),
1305
- return_type: ReturnTypeT$inboundSchema.default("chunks"),
1306
- strategy: TokenChunker$inboundSchema,
1307
- chunk_size: z.number().int().default(512),
1308
- chunk_overlap: z.number().int().default(0),
1309
- }).transform((v) => {
1310
- return remap$(v, {
1311
- "return_type": "returnType",
1312
- "chunk_size": "chunkSize",
1313
- "chunk_overlap": "chunkOverlap",
1314
- });
1315
- });
1316
-
1317
- /** @internal */
1318
- export type TokenChunkerStrategy$Outbound = {
1319
- text: string;
1320
- metadata: boolean;
1321
- return_type: string;
1322
- strategy: string;
1323
- chunk_size: number;
1324
- chunk_overlap: number;
1325
- };
1326
-
1327
- /** @internal */
1328
- export const TokenChunkerStrategy$outboundSchema: z.ZodType<
1329
- TokenChunkerStrategy$Outbound,
1330
- z.ZodTypeDef,
1331
- TokenChunkerStrategy
1332
- > = z.object({
1333
- text: z.string(),
1334
- metadata: z.boolean().default(true),
1335
- returnType: ReturnTypeT$outboundSchema.default("chunks"),
1336
- strategy: TokenChunker$outboundSchema,
1337
- chunkSize: z.number().int().default(512),
1338
- chunkOverlap: z.number().int().default(0),
1339
- }).transform((v) => {
1340
- return remap$(v, {
1341
- returnType: "return_type",
1342
- chunkSize: "chunk_size",
1343
- chunkOverlap: "chunk_overlap",
1344
- });
1345
- });
1346
-
1347
- /**
1348
- * @internal
1349
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1350
- */
1351
- export namespace TokenChunkerStrategy$ {
1352
- /** @deprecated use `TokenChunkerStrategy$inboundSchema` instead. */
1353
- export const inboundSchema = TokenChunkerStrategy$inboundSchema;
1354
- /** @deprecated use `TokenChunkerStrategy$outboundSchema` instead. */
1355
- export const outboundSchema = TokenChunkerStrategy$outboundSchema;
1356
- /** @deprecated use `TokenChunkerStrategy$Outbound` instead. */
1357
- export type Outbound = TokenChunkerStrategy$Outbound;
1358
- }
1359
-
1360
- export function tokenChunkerStrategyToJSON(
1361
- tokenChunkerStrategy: TokenChunkerStrategy,
1362
- ): string {
1363
- return JSON.stringify(
1364
- TokenChunkerStrategy$outboundSchema.parse(tokenChunkerStrategy),
1365
- );
1366
- }
1367
-
1368
- export function tokenChunkerStrategyFromJSON(
1369
- jsonString: string,
1370
- ): SafeParseResult<TokenChunkerStrategy, SDKValidationError> {
1371
- return safeParse(
1372
- jsonString,
1373
- (x) => TokenChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
1374
- `Failed to parse 'TokenChunkerStrategy' from JSON`,
1375
- );
1376
- }
1377
-
1378
- /** @internal */
1379
- export const ChunkTextChunkingRequest$inboundSchema: z.ZodType<
1380
- ChunkTextChunkingRequest,
1381
- z.ZodTypeDef,
1382
- unknown
1383
- > = z.union([
1384
- z.lazy(() => SemanticChunkerStrategy$inboundSchema),
1385
- z.lazy(() => SDPMChunkerStrategy$inboundSchema),
1386
- z.lazy(() => AgenticChunkerStrategy$inboundSchema),
1387
- z.lazy(() => TokenChunkerStrategy$inboundSchema),
1388
- z.lazy(() => SentenceChunkerStrategy$inboundSchema),
1389
- z.lazy(() => RecursiveChunkerStrategy$inboundSchema),
1390
- ]);
1391
-
1392
- /** @internal */
1393
- export type ChunkTextChunkingRequest$Outbound =
1394
- | SemanticChunkerStrategy$Outbound
1395
- | SDPMChunkerStrategy$Outbound
1396
- | AgenticChunkerStrategy$Outbound
1397
- | TokenChunkerStrategy$Outbound
1398
- | SentenceChunkerStrategy$Outbound
1399
- | RecursiveChunkerStrategy$Outbound;
1400
-
1401
- /** @internal */
1402
- export const ChunkTextChunkingRequest$outboundSchema: z.ZodType<
1403
- ChunkTextChunkingRequest$Outbound,
1404
- z.ZodTypeDef,
1405
- ChunkTextChunkingRequest
1406
- > = z.union([
1407
- z.lazy(() => SemanticChunkerStrategy$outboundSchema),
1408
- z.lazy(() => SDPMChunkerStrategy$outboundSchema),
1409
- z.lazy(() => AgenticChunkerStrategy$outboundSchema),
1410
- z.lazy(() => TokenChunkerStrategy$outboundSchema),
1411
- z.lazy(() => SentenceChunkerStrategy$outboundSchema),
1412
- z.lazy(() => RecursiveChunkerStrategy$outboundSchema),
1413
- ]);
1414
-
1415
- /**
1416
- * @internal
1417
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1418
- */
1419
- export namespace ChunkTextChunkingRequest$ {
1420
- /** @deprecated use `ChunkTextChunkingRequest$inboundSchema` instead. */
1421
- export const inboundSchema = ChunkTextChunkingRequest$inboundSchema;
1422
- /** @deprecated use `ChunkTextChunkingRequest$outboundSchema` instead. */
1423
- export const outboundSchema = ChunkTextChunkingRequest$outboundSchema;
1424
- /** @deprecated use `ChunkTextChunkingRequest$Outbound` instead. */
1425
- export type Outbound = ChunkTextChunkingRequest$Outbound;
1426
- }
1427
-
1428
- export function chunkTextChunkingRequestToJSON(
1429
- chunkTextChunkingRequest: ChunkTextChunkingRequest,
1430
- ): string {
1431
- return JSON.stringify(
1432
- ChunkTextChunkingRequest$outboundSchema.parse(chunkTextChunkingRequest),
1433
- );
1434
- }
1435
-
1436
- export function chunkTextChunkingRequestFromJSON(
1437
- jsonString: string,
1438
- ): SafeParseResult<ChunkTextChunkingRequest, SDKValidationError> {
1439
- return safeParse(
1440
- jsonString,
1441
- (x) => ChunkTextChunkingRequest$inboundSchema.parse(JSON.parse(x)),
1442
- `Failed to parse 'ChunkTextChunkingRequest' from JSON`,
1443
- );
1444
- }
1445
-
1446
- /** @internal */
1447
- export const ChunkTextMetadata$inboundSchema: z.ZodType<
1448
- ChunkTextMetadata,
1449
- z.ZodTypeDef,
1450
- unknown
1451
- > = z.object({
1452
- start_index: z.nullable(z.number()),
1453
- end_index: z.nullable(z.number()),
1454
- token_count: z.nullable(z.number()),
1455
- }).transform((v) => {
1456
- return remap$(v, {
1457
- "start_index": "startIndex",
1458
- "end_index": "endIndex",
1459
- "token_count": "tokenCount",
1460
- });
1461
- });
1462
-
1463
- /** @internal */
1464
- export type ChunkTextMetadata$Outbound = {
1465
- start_index: number | null;
1466
- end_index: number | null;
1467
- token_count: number | null;
1468
- };
1469
-
1470
- /** @internal */
1471
- export const ChunkTextMetadata$outboundSchema: z.ZodType<
1472
- ChunkTextMetadata$Outbound,
1473
- z.ZodTypeDef,
1474
- ChunkTextMetadata
1475
- > = z.object({
1476
- startIndex: z.nullable(z.number()),
1477
- endIndex: z.nullable(z.number()),
1478
- tokenCount: z.nullable(z.number()),
1479
- }).transform((v) => {
1480
- return remap$(v, {
1481
- startIndex: "start_index",
1482
- endIndex: "end_index",
1483
- tokenCount: "token_count",
1484
- });
1485
- });
1486
-
1487
- /**
1488
- * @internal
1489
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1490
- */
1491
- export namespace ChunkTextMetadata$ {
1492
- /** @deprecated use `ChunkTextMetadata$inboundSchema` instead. */
1493
- export const inboundSchema = ChunkTextMetadata$inboundSchema;
1494
- /** @deprecated use `ChunkTextMetadata$outboundSchema` instead. */
1495
- export const outboundSchema = ChunkTextMetadata$outboundSchema;
1496
- /** @deprecated use `ChunkTextMetadata$Outbound` instead. */
1497
- export type Outbound = ChunkTextMetadata$Outbound;
1498
- }
1499
-
1500
- export function chunkTextMetadataToJSON(
1501
- chunkTextMetadata: ChunkTextMetadata,
1502
- ): string {
1503
- return JSON.stringify(
1504
- ChunkTextMetadata$outboundSchema.parse(chunkTextMetadata),
1505
- );
1506
- }
1507
-
1508
- export function chunkTextMetadataFromJSON(
1509
- jsonString: string,
1510
- ): SafeParseResult<ChunkTextMetadata, SDKValidationError> {
1511
- return safeParse(
1512
- jsonString,
1513
- (x) => ChunkTextMetadata$inboundSchema.parse(JSON.parse(x)),
1514
- `Failed to parse 'ChunkTextMetadata' from JSON`,
1515
- );
1516
- }
1517
-
1518
- /** @internal */
1519
- export const Chunks$inboundSchema: z.ZodType<Chunks, z.ZodTypeDef, unknown> = z
1520
- .object({
1521
- text: z.string(),
1522
- index: z.number(),
1523
- metadata: z.lazy(() => ChunkTextMetadata$inboundSchema).optional(),
1524
- });
1525
-
1526
- /** @internal */
1527
- export type Chunks$Outbound = {
1528
- text: string;
1529
- index: number;
1530
- metadata?: ChunkTextMetadata$Outbound | undefined;
1531
- };
1532
-
1533
- /** @internal */
1534
- export const Chunks$outboundSchema: z.ZodType<
1535
- Chunks$Outbound,
1536
- z.ZodTypeDef,
1537
- Chunks
1538
- > = z.object({
1539
- text: z.string(),
1540
- index: z.number(),
1541
- metadata: z.lazy(() => ChunkTextMetadata$outboundSchema).optional(),
1542
- });
1543
-
1544
- /**
1545
- * @internal
1546
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1547
- */
1548
- export namespace Chunks$ {
1549
- /** @deprecated use `Chunks$inboundSchema` instead. */
1550
- export const inboundSchema = Chunks$inboundSchema;
1551
- /** @deprecated use `Chunks$outboundSchema` instead. */
1552
- export const outboundSchema = Chunks$outboundSchema;
1553
- /** @deprecated use `Chunks$Outbound` instead. */
1554
- export type Outbound = Chunks$Outbound;
1555
- }
1556
-
1557
- export function chunksToJSON(chunks: Chunks): string {
1558
- return JSON.stringify(Chunks$outboundSchema.parse(chunks));
1559
- }
1560
-
1561
- export function chunksFromJSON(
1562
- jsonString: string,
1563
- ): SafeParseResult<Chunks, SDKValidationError> {
1564
- return safeParse(
1565
- jsonString,
1566
- (x) => Chunks$inboundSchema.parse(JSON.parse(x)),
1567
- `Failed to parse 'Chunks' from JSON`,
1568
- );
1569
- }
1570
-
1571
- /** @internal */
1572
- export const ChunkTextResponseBody$inboundSchema: z.ZodType<
1573
- ChunkTextResponseBody,
1574
- z.ZodTypeDef,
1575
- unknown
1576
- > = z.object({
1577
- chunks: z.array(z.lazy(() => Chunks$inboundSchema)),
1578
- });
1579
-
1580
- /** @internal */
1581
- export type ChunkTextResponseBody$Outbound = {
1582
- chunks: Array<Chunks$Outbound>;
1583
- };
1584
-
1585
- /** @internal */
1586
- export const ChunkTextResponseBody$outboundSchema: z.ZodType<
1587
- ChunkTextResponseBody$Outbound,
1588
- z.ZodTypeDef,
1589
- ChunkTextResponseBody
1590
- > = z.object({
1591
- chunks: z.array(z.lazy(() => Chunks$outboundSchema)),
1592
- });
1593
-
1594
- /**
1595
- * @internal
1596
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1597
- */
1598
- export namespace ChunkTextResponseBody$ {
1599
- /** @deprecated use `ChunkTextResponseBody$inboundSchema` instead. */
1600
- export const inboundSchema = ChunkTextResponseBody$inboundSchema;
1601
- /** @deprecated use `ChunkTextResponseBody$outboundSchema` instead. */
1602
- export const outboundSchema = ChunkTextResponseBody$outboundSchema;
1603
- /** @deprecated use `ChunkTextResponseBody$Outbound` instead. */
1604
- export type Outbound = ChunkTextResponseBody$Outbound;
1605
- }
1606
-
1607
- export function chunkTextResponseBodyToJSON(
1608
- chunkTextResponseBody: ChunkTextResponseBody,
1609
- ): string {
1610
- return JSON.stringify(
1611
- ChunkTextResponseBody$outboundSchema.parse(chunkTextResponseBody),
1612
- );
1613
- }
1614
-
1615
- export function chunkTextResponseBodyFromJSON(
1616
- jsonString: string,
1617
- ): SafeParseResult<ChunkTextResponseBody, SDKValidationError> {
1618
- return safeParse(
1619
- jsonString,
1620
- (x) => ChunkTextResponseBody$inboundSchema.parse(JSON.parse(x)),
1621
- `Failed to parse 'ChunkTextResponseBody' from JSON`,
1622
- );
1623
- }