@orq-ai/node 3.9.4 → 3.10.0-rc.2

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