@orq-ai/node 3.10.19 → 3.11.0-rc.10

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