@orq-ai/node 4.4.0 → 4.5.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/examples/package-lock.json +4 -7
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +2 -2
  4. package/lib/config.js +2 -2
  5. package/lib/config.js.map +1 -1
  6. package/models/components/partdoneevent.js +1 -1
  7. package/models/components/reasoningpart.js +1 -1
  8. package/models/operations/createcontact.js +1 -1
  9. package/models/operations/createdataset.js +1 -1
  10. package/models/operations/createdatasetitem.js +4 -4
  11. package/models/operations/createdatasource.js +1 -1
  12. package/models/operations/createeval.js +16 -16
  13. package/models/operations/createidentity.js +1 -1
  14. package/models/operations/createtool.js +6 -6
  15. package/models/operations/fileget.js +1 -1
  16. package/models/operations/filelist.js +1 -1
  17. package/models/operations/fileupload.js +1 -1
  18. package/models/operations/getalltools.js +6 -6
  19. package/models/operations/getevals.js +16 -16
  20. package/models/operations/listdatasetdatapoints.js +4 -4
  21. package/models/operations/listdatasets.js +1 -1
  22. package/models/operations/listdatasources.js +1 -1
  23. package/models/operations/listidentities.js +1 -1
  24. package/models/operations/retrievedatapoint.js +4 -4
  25. package/models/operations/retrievedataset.js +1 -1
  26. package/models/operations/retrievedatasource.js +1 -1
  27. package/models/operations/retrieveidentity.js +1 -1
  28. package/models/operations/retrievetool.js +6 -6
  29. package/models/operations/runagent.js +1 -1
  30. package/models/operations/streamrunagent.js +1 -1
  31. package/models/operations/updatedatapoint.js +4 -4
  32. package/models/operations/updatedataset.js +1 -1
  33. package/models/operations/updatedatasource.js +1 -1
  34. package/models/operations/updateeval.js +16 -16
  35. package/models/operations/updateidentity.js +1 -1
  36. package/models/operations/updatetool.js +7 -7
  37. package/package.json +4 -3
  38. package/src/lib/config.ts +2 -2
  39. package/src/models/components/partdoneevent.ts +1 -1
  40. package/src/models/components/reasoningpart.ts +1 -1
  41. package/src/models/operations/createcontact.ts +1 -1
  42. package/src/models/operations/createdataset.ts +1 -1
  43. package/src/models/operations/createdatasetitem.ts +4 -4
  44. package/src/models/operations/createdatasource.ts +1 -1
  45. package/src/models/operations/createeval.ts +16 -16
  46. package/src/models/operations/createidentity.ts +1 -1
  47. package/src/models/operations/createtool.ts +6 -6
  48. package/src/models/operations/fileget.ts +1 -1
  49. package/src/models/operations/filelist.ts +1 -1
  50. package/src/models/operations/fileupload.ts +1 -1
  51. package/src/models/operations/getalltools.ts +6 -6
  52. package/src/models/operations/getevals.ts +16 -16
  53. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  54. package/src/models/operations/listdatasets.ts +1 -1
  55. package/src/models/operations/listdatasources.ts +1 -1
  56. package/src/models/operations/listidentities.ts +1 -1
  57. package/src/models/operations/retrievedatapoint.ts +4 -4
  58. package/src/models/operations/retrievedataset.ts +1 -1
  59. package/src/models/operations/retrievedatasource.ts +1 -1
  60. package/src/models/operations/retrieveidentity.ts +1 -1
  61. package/src/models/operations/retrievetool.ts +6 -6
  62. package/src/models/operations/runagent.ts +1 -1
  63. package/src/models/operations/streamrunagent.ts +1 -1
  64. package/src/models/operations/updatedatapoint.ts +4 -4
  65. package/src/models/operations/updatedataset.ts +1 -1
  66. package/src/models/operations/updatedatasource.ts +1 -1
  67. package/src/models/operations/updateeval.ts +16 -16
  68. package/src/models/operations/updateidentity.ts +1 -1
  69. package/src/models/operations/updatetool.ts +7 -7
  70. package/_speakeasy/.github/action-inputs-config.json +0 -53
  71. package/_speakeasy/.github/action-security-config.json +0 -88
  72. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  73. package/packages/orq-rc/examples/package-lock.json +0 -610
  74. package/packages/orq-rc/examples/package.json +0 -18
  75. package/packages/orq-rc/jsr.json +0 -28
  76. package/packages/orq-rc/package-lock.json +0 -1740
  77. package/packages/orq-rc/package.json +0 -30
  78. package/packages/orq-rc/src/core.ts +0 -13
  79. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -161
  80. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  81. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  82. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  83. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  84. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  85. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  86. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  87. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  88. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  89. package/packages/orq-rc/src/funcs/annotationsCreate.ts +0 -171
  90. package/packages/orq-rc/src/funcs/annotationsDelete.ts +0 -171
  91. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  92. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -160
  93. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  94. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  95. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  96. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  97. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  98. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  99. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  100. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  101. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  102. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  103. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  104. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  105. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  106. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  107. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  108. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  109. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  110. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  111. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  112. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -181
  113. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  114. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  115. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  116. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  117. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  118. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  119. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  120. package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -165
  121. package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -176
  122. package/packages/orq-rc/src/funcs/identitiesList.ts +0 -170
  123. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -175
  124. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -176
  125. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  126. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  127. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  128. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  129. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  130. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  131. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  132. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  133. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  134. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  135. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  136. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  137. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  138. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  139. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  140. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  141. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  142. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  143. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  144. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  145. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -176
  146. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  147. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  148. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -185
  149. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -180
  150. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  151. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -184
  152. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  153. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  154. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -179
  155. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -174
  156. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  157. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -180
  158. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -175
  159. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  160. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  161. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -173
  162. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  163. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  164. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  165. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  166. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  167. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  168. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -161
  169. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -262
  170. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -252
  171. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -168
  172. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -168
  173. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -161
  174. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -222
  175. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -160
  176. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -218
  177. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -167
  178. package/packages/orq-rc/src/funcs/routerOcr.ts +0 -158
  179. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -160
  180. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +0 -167
  181. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
  182. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  183. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  184. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  185. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  186. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  187. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  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 -497
  198. package/packages/orq-rc/src/lib/env.ts +0 -89
  199. package/packages/orq-rc/src/lib/event-streams.ts +0 -152
  200. package/packages/orq-rc/src/lib/files.ts +0 -82
  201. package/packages/orq-rc/src/lib/http.ts +0 -323
  202. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  203. package/packages/orq-rc/src/lib/logger.ts +0 -9
  204. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  205. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  206. package/packages/orq-rc/src/lib/retries.ts +0 -218
  207. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  208. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  209. package/packages/orq-rc/src/lib/security.ts +0 -264
  210. package/packages/orq-rc/src/lib/url.ts +0 -33
  211. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
  212. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
  213. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
  214. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
  215. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
  216. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
  217. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
  218. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
  219. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -517
  220. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -807
  221. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  222. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -299
  223. package/packages/orq-rc/src/models/components/datapart.ts +0 -38
  224. package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
  225. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
  226. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
  227. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
  228. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
  229. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  230. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  231. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  232. package/packages/orq-rc/src/models/components/index.ts +0 -56
  233. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3450
  234. package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
  235. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
  236. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -139
  237. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -71
  238. package/packages/orq-rc/src/models/components/publicidentity.ts +0 -69
  239. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
  240. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  241. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  242. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  243. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -318
  244. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
  245. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -91
  246. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
  247. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
  248. package/packages/orq-rc/src/models/components/security.ts +0 -32
  249. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  250. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  251. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  252. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  253. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
  254. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
  255. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
  256. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -230
  257. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -214
  258. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -200
  259. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
  260. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  261. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
  262. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
  263. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
  264. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  265. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  266. package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
  267. package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
  268. package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
  269. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
  270. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
  271. package/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
  272. package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
  273. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  274. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
  275. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  276. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
  277. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
  278. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
  279. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  280. package/packages/orq-rc/src/models/errors/index.ts +0 -33
  281. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -141
  282. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  283. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  284. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
  285. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -62
  286. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  287. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
  288. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
  289. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
  290. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  291. package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
  292. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
  293. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
  294. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
  295. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -7093
  296. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -609
  297. package/packages/orq-rc/src/models/operations/createannotation.ts +0 -162
  298. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6381
  299. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
  300. package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3413
  301. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
  302. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
  303. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2551
  304. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -437
  305. package/packages/orq-rc/src/models/operations/createembedding.ts +0 -947
  306. package/packages/orq-rc/src/models/operations/createeval.ts +0 -4170
  307. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -144
  308. package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
  309. package/packages/orq-rc/src/models/operations/createimage.ts +0 -1028
  310. package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -1045
  311. package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -1067
  312. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -944
  313. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
  314. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
  315. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
  316. package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
  317. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5401
  318. package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
  319. package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3324
  320. package/packages/orq-rc/src/models/operations/createspeech.ts +0 -700
  321. package/packages/orq-rc/src/models/operations/createtool.ts +0 -2499
  322. package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -955
  323. package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -930
  324. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
  325. package/packages/orq-rc/src/models/operations/deleteannotation.ts +0 -79
  326. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
  327. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
  328. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
  329. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
  330. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
  331. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
  332. package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
  333. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
  334. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
  335. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
  336. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
  337. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
  338. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
  339. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2370
  340. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4525
  341. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -690
  342. package/packages/orq-rc/src/models/operations/deployments.ts +0 -1268
  343. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4614
  344. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
  345. package/packages/orq-rc/src/models/operations/fileget.ts +0 -116
  346. package/packages/orq-rc/src/models/operations/filelist.ts +0 -172
  347. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -170
  348. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
  349. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
  350. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
  351. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3164
  352. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1398
  353. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -121
  354. package/packages/orq-rc/src/models/operations/getevals.ts +0 -2842
  355. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
  356. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
  357. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3089
  358. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3134
  359. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
  360. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
  361. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
  362. package/packages/orq-rc/src/models/operations/index.ts +0 -113
  363. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -733
  364. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1253
  365. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3018
  366. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -260
  367. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -263
  368. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
  369. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
  370. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -235
  371. package/packages/orq-rc/src/models/operations/listidentities.ts +0 -275
  372. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
  373. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -143
  374. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3209
  375. package/packages/orq-rc/src/models/operations/parse.ts +0 -777
  376. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
  377. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
  378. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3104
  379. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
  380. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
  381. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
  382. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -117
  383. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
  384. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
  385. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
  386. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1379
  387. package/packages/orq-rc/src/models/operations/runagent.ts +0 -5351
  388. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
  389. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -629
  390. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5546
  391. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -7447
  392. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
  393. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
  394. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
  395. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
  396. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4066
  397. package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -189
  398. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
  399. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
  400. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
  401. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -246
  402. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5472
  403. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2696
  404. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  405. package/packages/orq-rc/src/sdk/annotations.ts +0 -39
  406. package/packages/orq-rc/src/sdk/audio.ts +0 -25
  407. package/packages/orq-rc/src/sdk/chat.ts +0 -13
  408. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  409. package/packages/orq-rc/src/sdk/completions.ts +0 -32
  410. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  411. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  412. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  413. package/packages/orq-rc/src/sdk/edits.ts +0 -27
  414. package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
  415. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  416. package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
  417. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  418. package/packages/orq-rc/src/sdk/files.ts +0 -78
  419. package/packages/orq-rc/src/sdk/generations.ts +0 -27
  420. package/packages/orq-rc/src/sdk/identities.ts +0 -99
  421. package/packages/orq-rc/src/sdk/images.ts +0 -25
  422. package/packages/orq-rc/src/sdk/index.ts +0 -5
  423. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  424. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  425. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  426. package/packages/orq-rc/src/sdk/models.ts +0 -25
  427. package/packages/orq-rc/src/sdk/moderations.ts +0 -24
  428. package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
  429. package/packages/orq-rc/src/sdk/orqresponses.ts +0 -32
  430. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  431. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  432. package/packages/orq-rc/src/sdk/rerank.ts +0 -27
  433. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  434. package/packages/orq-rc/src/sdk/router.ts +0 -72
  435. package/packages/orq-rc/src/sdk/sdk.ts +0 -115
  436. package/packages/orq-rc/src/sdk/speech.ts +0 -27
  437. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  438. package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
  439. package/packages/orq-rc/src/sdk/translations.ts +0 -24
  440. package/packages/orq-rc/src/sdk/variations.ts +0 -27
  441. package/packages/orq-rc/src/types/async.ts +0 -68
  442. package/packages/orq-rc/src/types/blobs.ts +0 -32
  443. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  444. package/packages/orq-rc/src/types/enums.ts +0 -45
  445. package/packages/orq-rc/src/types/fp.ts +0 -50
  446. package/packages/orq-rc/src/types/index.ts +0 -11
  447. package/packages/orq-rc/src/types/operations.ts +0 -105
  448. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  449. package/packages/orq-rc/src/types/streams.ts +0 -21
  450. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  451. package/packages/orq-rc/tsconfig.json +0 -40
@@ -1,1253 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
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
- * The role of the prompt message
14
- */
15
- export const Role = {
16
- System: "system",
17
- Assistant: "assistant",
18
- User: "user",
19
- Exception: "exception",
20
- Tool: "tool",
21
- Prompt: "prompt",
22
- Correction: "correction",
23
- ExpectedOutput: "expected_output",
24
- } as const;
25
- /**
26
- * The role of the prompt message
27
- */
28
- export type Role = ClosedEnum<typeof Role>;
29
-
30
- export type FileT = {
31
- /**
32
- * The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
33
- */
34
- fileData?: string | undefined;
35
- /**
36
- * URL to the file. Only supported by Anthropic Claude models for PDF files.
37
- */
38
- uri?: string | undefined;
39
- /**
40
- * MIME type of the file (e.g., application/pdf, image/png)
41
- */
42
- mimeType?: string | undefined;
43
- /**
44
- * The name of the file, used when passing the file to the model as a string.
45
- */
46
- filename?: string | undefined;
47
- };
48
-
49
- export type Three = {
50
- /**
51
- * The type of the content part. Always `file`.
52
- */
53
- type: "file";
54
- file: FileT;
55
- };
56
-
57
- export type ImageUrl = {
58
- /**
59
- * Either a URL of the image or the base64 encoded data URI.
60
- */
61
- url: string;
62
- /**
63
- * Specifies the detail level of the image. Currently only supported with OpenAI models
64
- */
65
- detail?: string | undefined;
66
- };
67
-
68
- /**
69
- * The image part of the prompt message. Only supported with vision models.
70
- */
71
- export type Two2 = {
72
- type: "image_url";
73
- imageUrl: ImageUrl;
74
- };
75
-
76
- /**
77
- * Text content part of a prompt message
78
- */
79
- export type One = {
80
- type: "text";
81
- text: string;
82
- };
83
-
84
- export type Two = One | Two2 | Three;
85
-
86
- /**
87
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
88
- */
89
- export type Content = string | Array<One | Two2 | Three>;
90
-
91
- export const InvokeEvalType = {
92
- Function: "function",
93
- } as const;
94
- export type InvokeEvalType = ClosedEnum<typeof InvokeEvalType>;
95
-
96
- export type FunctionT = {
97
- name: string;
98
- /**
99
- * JSON string arguments for the functions
100
- */
101
- arguments: string;
102
- };
103
-
104
- export type ToolCalls = {
105
- id?: string | undefined;
106
- index?: number | undefined;
107
- type: InvokeEvalType;
108
- function: FunctionT;
109
- };
110
-
111
- export type Messages = {
112
- /**
113
- * The role of the prompt message
114
- */
115
- role: Role;
116
- /**
117
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Can be null for tool messages in certain scenarios.
118
- */
119
- content: string | Array<One | Two2 | Three> | null;
120
- toolCalls?: Array<ToolCalls> | undefined;
121
- toolCallId?: string | null | undefined;
122
- };
123
-
124
- export type InvokeEvalRequestBody = {
125
- /**
126
- * Latest user message
127
- */
128
- query?: string | undefined;
129
- /**
130
- * The generated response from the model
131
- */
132
- output?: string | undefined;
133
- /**
134
- * The reference used to compare the output
135
- */
136
- reference?: string | undefined;
137
- /**
138
- * Knowledge base retrievals
139
- */
140
- retrievals?: Array<string> | undefined;
141
- /**
142
- * The messages used to generate the output, without the last user message
143
- */
144
- messages?: Array<Messages> | undefined;
145
- /**
146
- * Model to use for LLM-based evaluators (e.g. "openai/gpt-4o")
147
- */
148
- model?: string | undefined;
149
- };
150
-
151
- export type InvokeEvalRequest = {
152
- /**
153
- * Evaluator ID
154
- */
155
- id: string;
156
- requestBody?: InvokeEvalRequestBody | undefined;
157
- };
158
-
159
- export type Structured = {
160
- type: "structured";
161
- value: { [k: string]: any };
162
- };
163
-
164
- export type InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue =
165
- | number
166
- | boolean;
167
-
168
- export type InvokeEvalResponseBodyEvalsResponse200Value = {
169
- type: string;
170
- value: number | boolean;
171
- };
172
-
173
- export type InvokeEvalResponseBodyHTTP = {
174
- type: "http_eval";
175
- value?: InvokeEvalResponseBodyEvalsResponse200Value | null | undefined;
176
- };
177
-
178
- export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value =
179
- | number
180
- | boolean
181
- | string;
182
-
183
- export type OriginalValue = number | boolean | string;
184
-
185
- export type InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue =
186
- | number
187
- | boolean
188
- | string;
189
-
190
- export type Votes = {
191
- model: string;
192
- replacement: boolean;
193
- success: boolean;
194
- value?: number | boolean | string | undefined;
195
- explanation?: string | undefined;
196
- error?: string | undefined;
197
- };
198
-
199
- export type Stats = {
200
- mean: number;
201
- std: number;
202
- };
203
-
204
- export type ResponseBodyJury = {
205
- judgesConfigured: number;
206
- judgesSucceeded: number;
207
- judgesFailed: number;
208
- replacementsUsed: number;
209
- tie: boolean;
210
- votes: Array<Votes>;
211
- stats?: Stats | undefined;
212
- };
213
-
214
- export type InvokeEvalResponseBodyEvalsResponseValue = {
215
- workflowRunId: string;
216
- value: number | boolean | string | null;
217
- explanation?: string | null | undefined;
218
- originalValue?: number | boolean | string | null | undefined;
219
- originalExplanation?: string | null | undefined;
220
- jury?: ResponseBodyJury | undefined;
221
- };
222
-
223
- export type InvokeEvalResponseBodyLLM = {
224
- type: "llm_evaluator";
225
- value: InvokeEvalResponseBodyEvalsResponseValue | null;
226
- };
227
-
228
- export type InvokeEvalResponseBodyEvalsValue = {
229
- f1: number;
230
- precision: number;
231
- recall: number;
232
- };
233
-
234
- export type BERTScore = {
235
- type: "bert_score";
236
- value: InvokeEvalResponseBodyEvalsValue;
237
- };
238
-
239
- export type Rouge1 = {
240
- f1: number;
241
- precision: number;
242
- recall: number;
243
- };
244
-
245
- export type Rouge2 = {
246
- f1: number;
247
- precision: number;
248
- recall: number;
249
- };
250
-
251
- export type RougeL = {
252
- f1: number;
253
- precision: number;
254
- recall: number;
255
- };
256
-
257
- export type InvokeEvalResponseBodyValue = {
258
- rouge1: Rouge1;
259
- rouge2: Rouge2;
260
- rougeL: RougeL;
261
- };
262
-
263
- export type RougeN = {
264
- type: "rouge_n";
265
- value: InvokeEvalResponseBodyValue;
266
- };
267
-
268
- export type StringArray = {
269
- type: "string_array";
270
- values: Array<string | null>;
271
- };
272
-
273
- export type ResponseBodyValue = boolean | string | number;
274
-
275
- export type ResponseBodyBoolean = {
276
- type: "boolean";
277
- value: boolean | string | number | null;
278
- };
279
-
280
- export const FormatOptionsStyle = {
281
- Currency: "currency",
282
- } as const;
283
- export type FormatOptionsStyle = ClosedEnum<typeof FormatOptionsStyle>;
284
-
285
- export const Currency = {
286
- Usd: "USD",
287
- } as const;
288
- export type Currency = ClosedEnum<typeof Currency>;
289
-
290
- export type FormatOptions2 = {
291
- style: FormatOptionsStyle;
292
- currency: Currency;
293
- };
294
-
295
- export type FormatOptions1 = {
296
- significantDigits: number;
297
- };
298
-
299
- export type FormatOptions = FormatOptions2 | FormatOptions1;
300
-
301
- export type ResponseBodyNumber = {
302
- type: "number";
303
- originalValue?: number | null | undefined;
304
- value: number | null;
305
- formatOptions?: FormatOptions2 | FormatOptions1 | undefined;
306
- };
307
-
308
- export type String = {
309
- type: "string";
310
- originalValue?: string | null | undefined;
311
- value?: string | null | undefined;
312
- };
313
-
314
- /**
315
- * Returns the result of the evaluator run
316
- */
317
- export type InvokeEvalResponseBody =
318
- | String
319
- | ResponseBodyNumber
320
- | ResponseBodyBoolean
321
- | StringArray
322
- | RougeN
323
- | BERTScore
324
- | InvokeEvalResponseBodyLLM
325
- | InvokeEvalResponseBodyHTTP
326
- | Structured;
327
-
328
- /** @internal */
329
- export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
330
- Role,
331
- );
332
-
333
- /** @internal */
334
- export type FileT$Outbound = {
335
- file_data?: string | undefined;
336
- uri?: string | undefined;
337
- mimeType?: string | undefined;
338
- filename?: string | undefined;
339
- };
340
-
341
- /** @internal */
342
- export const FileT$outboundSchema: z.ZodType<
343
- FileT$Outbound,
344
- z.ZodTypeDef,
345
- FileT
346
- > = z.object({
347
- fileData: z.string().optional(),
348
- uri: z.string().optional(),
349
- mimeType: z.string().optional(),
350
- filename: z.string().optional(),
351
- }).transform((v) => {
352
- return remap$(v, {
353
- fileData: "file_data",
354
- });
355
- });
356
-
357
- export function fileToJSON(fileT: FileT): string {
358
- return JSON.stringify(FileT$outboundSchema.parse(fileT));
359
- }
360
-
361
- /** @internal */
362
- export type Three$Outbound = {
363
- type: "file";
364
- file: FileT$Outbound;
365
- };
366
-
367
- /** @internal */
368
- export const Three$outboundSchema: z.ZodType<
369
- Three$Outbound,
370
- z.ZodTypeDef,
371
- Three
372
- > = z.object({
373
- type: z.literal("file"),
374
- file: z.lazy(() => FileT$outboundSchema),
375
- });
376
-
377
- export function threeToJSON(three: Three): string {
378
- return JSON.stringify(Three$outboundSchema.parse(three));
379
- }
380
-
381
- /** @internal */
382
- export type ImageUrl$Outbound = {
383
- url: string;
384
- detail?: string | undefined;
385
- };
386
-
387
- /** @internal */
388
- export const ImageUrl$outboundSchema: z.ZodType<
389
- ImageUrl$Outbound,
390
- z.ZodTypeDef,
391
- ImageUrl
392
- > = z.object({
393
- url: z.string(),
394
- detail: z.string().optional(),
395
- });
396
-
397
- export function imageUrlToJSON(imageUrl: ImageUrl): string {
398
- return JSON.stringify(ImageUrl$outboundSchema.parse(imageUrl));
399
- }
400
-
401
- /** @internal */
402
- export type Two2$Outbound = {
403
- type: "image_url";
404
- image_url: ImageUrl$Outbound;
405
- };
406
-
407
- /** @internal */
408
- export const Two2$outboundSchema: z.ZodType<Two2$Outbound, z.ZodTypeDef, Two2> =
409
- z.object({
410
- type: z.literal("image_url"),
411
- imageUrl: z.lazy(() => ImageUrl$outboundSchema),
412
- }).transform((v) => {
413
- return remap$(v, {
414
- imageUrl: "image_url",
415
- });
416
- });
417
-
418
- export function two2ToJSON(two2: Two2): string {
419
- return JSON.stringify(Two2$outboundSchema.parse(two2));
420
- }
421
-
422
- /** @internal */
423
- export type One$Outbound = {
424
- type: "text";
425
- text: string;
426
- };
427
-
428
- /** @internal */
429
- export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
430
- .object({
431
- type: z.literal("text"),
432
- text: z.string(),
433
- });
434
-
435
- export function oneToJSON(one: One): string {
436
- return JSON.stringify(One$outboundSchema.parse(one));
437
- }
438
-
439
- /** @internal */
440
- export type Two$Outbound = One$Outbound | Two2$Outbound | Three$Outbound;
441
-
442
- /** @internal */
443
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
444
- .union([
445
- z.lazy(() => One$outboundSchema),
446
- z.lazy(() => Two2$outboundSchema),
447
- z.lazy(() => Three$outboundSchema),
448
- ]);
449
-
450
- export function twoToJSON(two: Two): string {
451
- return JSON.stringify(Two$outboundSchema.parse(two));
452
- }
453
-
454
- /** @internal */
455
- export type Content$Outbound =
456
- | string
457
- | Array<One$Outbound | Two2$Outbound | Three$Outbound>;
458
-
459
- /** @internal */
460
- export const Content$outboundSchema: z.ZodType<
461
- Content$Outbound,
462
- z.ZodTypeDef,
463
- Content
464
- > = z.union([
465
- z.string(),
466
- z.array(z.union([
467
- z.lazy(() => One$outboundSchema),
468
- z.lazy(() => Two2$outboundSchema),
469
- z.lazy(() => Three$outboundSchema),
470
- ])),
471
- ]);
472
-
473
- export function contentToJSON(content: Content): string {
474
- return JSON.stringify(Content$outboundSchema.parse(content));
475
- }
476
-
477
- /** @internal */
478
- export const InvokeEvalType$outboundSchema: z.ZodNativeEnum<
479
- typeof InvokeEvalType
480
- > = z.nativeEnum(InvokeEvalType);
481
-
482
- /** @internal */
483
- export type FunctionT$Outbound = {
484
- name: string;
485
- arguments: string;
486
- };
487
-
488
- /** @internal */
489
- export const FunctionT$outboundSchema: z.ZodType<
490
- FunctionT$Outbound,
491
- z.ZodTypeDef,
492
- FunctionT
493
- > = z.object({
494
- name: z.string(),
495
- arguments: z.string(),
496
- });
497
-
498
- export function functionToJSON(functionT: FunctionT): string {
499
- return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
500
- }
501
-
502
- /** @internal */
503
- export type ToolCalls$Outbound = {
504
- id?: string | undefined;
505
- index?: number | undefined;
506
- type: string;
507
- function: FunctionT$Outbound;
508
- };
509
-
510
- /** @internal */
511
- export const ToolCalls$outboundSchema: z.ZodType<
512
- ToolCalls$Outbound,
513
- z.ZodTypeDef,
514
- ToolCalls
515
- > = z.object({
516
- id: z.string().optional(),
517
- index: z.number().optional(),
518
- type: InvokeEvalType$outboundSchema,
519
- function: z.lazy(() => FunctionT$outboundSchema),
520
- });
521
-
522
- export function toolCallsToJSON(toolCalls: ToolCalls): string {
523
- return JSON.stringify(ToolCalls$outboundSchema.parse(toolCalls));
524
- }
525
-
526
- /** @internal */
527
- export type Messages$Outbound = {
528
- role: string;
529
- content: string | Array<One$Outbound | Two2$Outbound | Three$Outbound> | null;
530
- tool_calls?: Array<ToolCalls$Outbound> | undefined;
531
- tool_call_id?: string | null | undefined;
532
- };
533
-
534
- /** @internal */
535
- export const Messages$outboundSchema: z.ZodType<
536
- Messages$Outbound,
537
- z.ZodTypeDef,
538
- Messages
539
- > = z.object({
540
- role: Role$outboundSchema,
541
- content: z.nullable(
542
- z.union([
543
- z.string(),
544
- z.array(z.union([
545
- z.lazy(() => One$outboundSchema),
546
- z.lazy(() => Two2$outboundSchema),
547
- z.lazy(() => Three$outboundSchema),
548
- ])),
549
- ]),
550
- ),
551
- toolCalls: z.array(z.lazy(() => ToolCalls$outboundSchema)).optional(),
552
- toolCallId: z.nullable(z.string()).optional(),
553
- }).transform((v) => {
554
- return remap$(v, {
555
- toolCalls: "tool_calls",
556
- toolCallId: "tool_call_id",
557
- });
558
- });
559
-
560
- export function messagesToJSON(messages: Messages): string {
561
- return JSON.stringify(Messages$outboundSchema.parse(messages));
562
- }
563
-
564
- /** @internal */
565
- export type InvokeEvalRequestBody$Outbound = {
566
- query?: string | undefined;
567
- output?: string | undefined;
568
- reference?: string | undefined;
569
- retrievals?: Array<string> | undefined;
570
- messages?: Array<Messages$Outbound> | undefined;
571
- model?: string | undefined;
572
- };
573
-
574
- /** @internal */
575
- export const InvokeEvalRequestBody$outboundSchema: z.ZodType<
576
- InvokeEvalRequestBody$Outbound,
577
- z.ZodTypeDef,
578
- InvokeEvalRequestBody
579
- > = z.object({
580
- query: z.string().optional(),
581
- output: z.string().optional(),
582
- reference: z.string().optional(),
583
- retrievals: z.array(z.string()).optional(),
584
- messages: z.array(z.lazy(() => Messages$outboundSchema)).optional(),
585
- model: z.string().optional(),
586
- });
587
-
588
- export function invokeEvalRequestBodyToJSON(
589
- invokeEvalRequestBody: InvokeEvalRequestBody,
590
- ): string {
591
- return JSON.stringify(
592
- InvokeEvalRequestBody$outboundSchema.parse(invokeEvalRequestBody),
593
- );
594
- }
595
-
596
- /** @internal */
597
- export type InvokeEvalRequest$Outbound = {
598
- id: string;
599
- RequestBody?: InvokeEvalRequestBody$Outbound | undefined;
600
- };
601
-
602
- /** @internal */
603
- export const InvokeEvalRequest$outboundSchema: z.ZodType<
604
- InvokeEvalRequest$Outbound,
605
- z.ZodTypeDef,
606
- InvokeEvalRequest
607
- > = z.object({
608
- id: z.string(),
609
- requestBody: z.lazy(() => InvokeEvalRequestBody$outboundSchema).optional(),
610
- }).transform((v) => {
611
- return remap$(v, {
612
- requestBody: "RequestBody",
613
- });
614
- });
615
-
616
- export function invokeEvalRequestToJSON(
617
- invokeEvalRequest: InvokeEvalRequest,
618
- ): string {
619
- return JSON.stringify(
620
- InvokeEvalRequest$outboundSchema.parse(invokeEvalRequest),
621
- );
622
- }
623
-
624
- /** @internal */
625
- export const Structured$inboundSchema: z.ZodType<
626
- Structured,
627
- z.ZodTypeDef,
628
- unknown
629
- > = z.object({
630
- type: z.literal("structured"),
631
- value: z.record(z.any()),
632
- });
633
-
634
- export function structuredFromJSON(
635
- jsonString: string,
636
- ): SafeParseResult<Structured, SDKValidationError> {
637
- return safeParse(
638
- jsonString,
639
- (x) => Structured$inboundSchema.parse(JSON.parse(x)),
640
- `Failed to parse 'Structured' from JSON`,
641
- );
642
- }
643
-
644
- /** @internal */
645
- export const InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema:
646
- z.ZodType<
647
- InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
648
- z.ZodTypeDef,
649
- unknown
650
- > = z.union([z.number(), z.boolean()]);
651
-
652
- export function invokeEvalResponseBodyEvalsResponse200ApplicationJSONValueFromJSON(
653
- jsonString: string,
654
- ): SafeParseResult<
655
- InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue,
656
- SDKValidationError
657
- > {
658
- return safeParse(
659
- jsonString,
660
- (x) =>
661
- InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue$inboundSchema
662
- .parse(JSON.parse(x)),
663
- `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJSONValue' from JSON`,
664
- );
665
- }
666
-
667
- /** @internal */
668
- export const InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema:
669
- z.ZodType<
670
- InvokeEvalResponseBodyEvalsResponse200Value,
671
- z.ZodTypeDef,
672
- unknown
673
- > = z.object({
674
- type: z.string(),
675
- value: z.union([z.number(), z.boolean()]),
676
- });
677
-
678
- export function invokeEvalResponseBodyEvalsResponse200ValueFromJSON(
679
- jsonString: string,
680
- ): SafeParseResult<
681
- InvokeEvalResponseBodyEvalsResponse200Value,
682
- SDKValidationError
683
- > {
684
- return safeParse(
685
- jsonString,
686
- (x) =>
687
- InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema.parse(
688
- JSON.parse(x),
689
- ),
690
- `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200Value' from JSON`,
691
- );
692
- }
693
-
694
- /** @internal */
695
- export const InvokeEvalResponseBodyHTTP$inboundSchema: z.ZodType<
696
- InvokeEvalResponseBodyHTTP,
697
- z.ZodTypeDef,
698
- unknown
699
- > = z.object({
700
- type: z.literal("http_eval"),
701
- value: z.nullable(
702
- z.lazy(() => InvokeEvalResponseBodyEvalsResponse200Value$inboundSchema),
703
- ).optional(),
704
- });
705
-
706
- export function invokeEvalResponseBodyHTTPFromJSON(
707
- jsonString: string,
708
- ): SafeParseResult<InvokeEvalResponseBodyHTTP, SDKValidationError> {
709
- return safeParse(
710
- jsonString,
711
- (x) => InvokeEvalResponseBodyHTTP$inboundSchema.parse(JSON.parse(x)),
712
- `Failed to parse 'InvokeEvalResponseBodyHTTP' from JSON`,
713
- );
714
- }
715
-
716
- /** @internal */
717
- export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema:
718
- z.ZodType<
719
- InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
720
- z.ZodTypeDef,
721
- unknown
722
- > = z.union([z.number(), z.boolean(), z.string()]);
723
-
724
- export function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueFromJSON(
725
- jsonString: string,
726
- ): SafeParseResult<
727
- InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value,
728
- SDKValidationError
729
- > {
730
- return safeParse(
731
- jsonString,
732
- (x) =>
733
- InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value$inboundSchema
734
- .parse(JSON.parse(x)),
735
- `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJson7Value' from JSON`,
736
- );
737
- }
738
-
739
- /** @internal */
740
- export const OriginalValue$inboundSchema: z.ZodType<
741
- OriginalValue,
742
- z.ZodTypeDef,
743
- unknown
744
- > = z.union([z.number(), z.boolean(), z.string()]);
745
-
746
- export function originalValueFromJSON(
747
- jsonString: string,
748
- ): SafeParseResult<OriginalValue, SDKValidationError> {
749
- return safeParse(
750
- jsonString,
751
- (x) => OriginalValue$inboundSchema.parse(JSON.parse(x)),
752
- `Failed to parse 'OriginalValue' from JSON`,
753
- );
754
- }
755
-
756
- /** @internal */
757
- export const InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue$inboundSchema:
758
- z.ZodType<
759
- InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue,
760
- z.ZodTypeDef,
761
- unknown
762
- > = z.union([z.number(), z.boolean(), z.string()]);
763
-
764
- export function invokeEvalResponseBodyEvalsResponse200ApplicationJSON7ValueValueFromJSON(
765
- jsonString: string,
766
- ): SafeParseResult<
767
- InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue,
768
- SDKValidationError
769
- > {
770
- return safeParse(
771
- jsonString,
772
- (x) =>
773
- InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue$inboundSchema
774
- .parse(JSON.parse(x)),
775
- `Failed to parse 'InvokeEvalResponseBodyEvalsResponse200ApplicationJson7ValueValue' from JSON`,
776
- );
777
- }
778
-
779
- /** @internal */
780
- export const Votes$inboundSchema: z.ZodType<Votes, z.ZodTypeDef, unknown> = z
781
- .object({
782
- model: z.string(),
783
- replacement: z.boolean(),
784
- success: z.boolean(),
785
- value: z.union([z.number(), z.boolean(), z.string()]).optional(),
786
- explanation: z.string().optional(),
787
- error: z.string().optional(),
788
- });
789
-
790
- export function votesFromJSON(
791
- jsonString: string,
792
- ): SafeParseResult<Votes, SDKValidationError> {
793
- return safeParse(
794
- jsonString,
795
- (x) => Votes$inboundSchema.parse(JSON.parse(x)),
796
- `Failed to parse 'Votes' from JSON`,
797
- );
798
- }
799
-
800
- /** @internal */
801
- export const Stats$inboundSchema: z.ZodType<Stats, z.ZodTypeDef, unknown> = z
802
- .object({
803
- mean: z.number(),
804
- std: z.number(),
805
- });
806
-
807
- export function statsFromJSON(
808
- jsonString: string,
809
- ): SafeParseResult<Stats, SDKValidationError> {
810
- return safeParse(
811
- jsonString,
812
- (x) => Stats$inboundSchema.parse(JSON.parse(x)),
813
- `Failed to parse 'Stats' from JSON`,
814
- );
815
- }
816
-
817
- /** @internal */
818
- export const ResponseBodyJury$inboundSchema: z.ZodType<
819
- ResponseBodyJury,
820
- z.ZodTypeDef,
821
- unknown
822
- > = z.object({
823
- judges_configured: z.number().int(),
824
- judges_succeeded: z.number().int(),
825
- judges_failed: z.number().int(),
826
- replacements_used: z.number().int(),
827
- tie: z.boolean(),
828
- votes: z.array(z.lazy(() => Votes$inboundSchema)),
829
- stats: z.lazy(() => Stats$inboundSchema).optional(),
830
- }).transform((v) => {
831
- return remap$(v, {
832
- "judges_configured": "judgesConfigured",
833
- "judges_succeeded": "judgesSucceeded",
834
- "judges_failed": "judgesFailed",
835
- "replacements_used": "replacementsUsed",
836
- });
837
- });
838
-
839
- export function responseBodyJuryFromJSON(
840
- jsonString: string,
841
- ): SafeParseResult<ResponseBodyJury, SDKValidationError> {
842
- return safeParse(
843
- jsonString,
844
- (x) => ResponseBodyJury$inboundSchema.parse(JSON.parse(x)),
845
- `Failed to parse 'ResponseBodyJury' from JSON`,
846
- );
847
- }
848
-
849
- /** @internal */
850
- export const InvokeEvalResponseBodyEvalsResponseValue$inboundSchema: z.ZodType<
851
- InvokeEvalResponseBodyEvalsResponseValue,
852
- z.ZodTypeDef,
853
- unknown
854
- > = z.object({
855
- workflow_run_id: z.string(),
856
- value: z.nullable(z.union([z.number(), z.boolean(), z.string()])),
857
- explanation: z.nullable(z.string()).optional(),
858
- original_value: z.nullable(z.union([z.number(), z.boolean(), z.string()]))
859
- .optional(),
860
- original_explanation: z.nullable(z.string()).optional(),
861
- jury: z.lazy(() => ResponseBodyJury$inboundSchema).optional(),
862
- }).transform((v) => {
863
- return remap$(v, {
864
- "workflow_run_id": "workflowRunId",
865
- "original_value": "originalValue",
866
- "original_explanation": "originalExplanation",
867
- });
868
- });
869
-
870
- export function invokeEvalResponseBodyEvalsResponseValueFromJSON(
871
- jsonString: string,
872
- ): SafeParseResult<
873
- InvokeEvalResponseBodyEvalsResponseValue,
874
- SDKValidationError
875
- > {
876
- return safeParse(
877
- jsonString,
878
- (x) =>
879
- InvokeEvalResponseBodyEvalsResponseValue$inboundSchema.parse(
880
- JSON.parse(x),
881
- ),
882
- `Failed to parse 'InvokeEvalResponseBodyEvalsResponseValue' from JSON`,
883
- );
884
- }
885
-
886
- /** @internal */
887
- export const InvokeEvalResponseBodyLLM$inboundSchema: z.ZodType<
888
- InvokeEvalResponseBodyLLM,
889
- z.ZodTypeDef,
890
- unknown
891
- > = z.object({
892
- type: z.literal("llm_evaluator"),
893
- value: z.nullable(
894
- z.lazy(() => InvokeEvalResponseBodyEvalsResponseValue$inboundSchema),
895
- ),
896
- });
897
-
898
- export function invokeEvalResponseBodyLLMFromJSON(
899
- jsonString: string,
900
- ): SafeParseResult<InvokeEvalResponseBodyLLM, SDKValidationError> {
901
- return safeParse(
902
- jsonString,
903
- (x) => InvokeEvalResponseBodyLLM$inboundSchema.parse(JSON.parse(x)),
904
- `Failed to parse 'InvokeEvalResponseBodyLLM' from JSON`,
905
- );
906
- }
907
-
908
- /** @internal */
909
- export const InvokeEvalResponseBodyEvalsValue$inboundSchema: z.ZodType<
910
- InvokeEvalResponseBodyEvalsValue,
911
- z.ZodTypeDef,
912
- unknown
913
- > = z.object({
914
- f1: z.number(),
915
- precision: z.number(),
916
- recall: z.number(),
917
- });
918
-
919
- export function invokeEvalResponseBodyEvalsValueFromJSON(
920
- jsonString: string,
921
- ): SafeParseResult<InvokeEvalResponseBodyEvalsValue, SDKValidationError> {
922
- return safeParse(
923
- jsonString,
924
- (x) => InvokeEvalResponseBodyEvalsValue$inboundSchema.parse(JSON.parse(x)),
925
- `Failed to parse 'InvokeEvalResponseBodyEvalsValue' from JSON`,
926
- );
927
- }
928
-
929
- /** @internal */
930
- export const BERTScore$inboundSchema: z.ZodType<
931
- BERTScore,
932
- z.ZodTypeDef,
933
- unknown
934
- > = z.object({
935
- type: z.literal("bert_score"),
936
- value: z.lazy(() => InvokeEvalResponseBodyEvalsValue$inboundSchema),
937
- });
938
-
939
- export function bertScoreFromJSON(
940
- jsonString: string,
941
- ): SafeParseResult<BERTScore, SDKValidationError> {
942
- return safeParse(
943
- jsonString,
944
- (x) => BERTScore$inboundSchema.parse(JSON.parse(x)),
945
- `Failed to parse 'BERTScore' from JSON`,
946
- );
947
- }
948
-
949
- /** @internal */
950
- export const Rouge1$inboundSchema: z.ZodType<Rouge1, z.ZodTypeDef, unknown> = z
951
- .object({
952
- f1: z.number(),
953
- precision: z.number(),
954
- recall: z.number(),
955
- });
956
-
957
- export function rouge1FromJSON(
958
- jsonString: string,
959
- ): SafeParseResult<Rouge1, SDKValidationError> {
960
- return safeParse(
961
- jsonString,
962
- (x) => Rouge1$inboundSchema.parse(JSON.parse(x)),
963
- `Failed to parse 'Rouge1' from JSON`,
964
- );
965
- }
966
-
967
- /** @internal */
968
- export const Rouge2$inboundSchema: z.ZodType<Rouge2, z.ZodTypeDef, unknown> = z
969
- .object({
970
- f1: z.number(),
971
- precision: z.number(),
972
- recall: z.number(),
973
- });
974
-
975
- export function rouge2FromJSON(
976
- jsonString: string,
977
- ): SafeParseResult<Rouge2, SDKValidationError> {
978
- return safeParse(
979
- jsonString,
980
- (x) => Rouge2$inboundSchema.parse(JSON.parse(x)),
981
- `Failed to parse 'Rouge2' from JSON`,
982
- );
983
- }
984
-
985
- /** @internal */
986
- export const RougeL$inboundSchema: z.ZodType<RougeL, z.ZodTypeDef, unknown> = z
987
- .object({
988
- f1: z.number(),
989
- precision: z.number(),
990
- recall: z.number(),
991
- });
992
-
993
- export function rougeLFromJSON(
994
- jsonString: string,
995
- ): SafeParseResult<RougeL, SDKValidationError> {
996
- return safeParse(
997
- jsonString,
998
- (x) => RougeL$inboundSchema.parse(JSON.parse(x)),
999
- `Failed to parse 'RougeL' from JSON`,
1000
- );
1001
- }
1002
-
1003
- /** @internal */
1004
- export const InvokeEvalResponseBodyValue$inboundSchema: z.ZodType<
1005
- InvokeEvalResponseBodyValue,
1006
- z.ZodTypeDef,
1007
- unknown
1008
- > = z.object({
1009
- rouge_1: z.lazy(() => Rouge1$inboundSchema),
1010
- rouge_2: z.lazy(() => Rouge2$inboundSchema),
1011
- rouge_l: z.lazy(() => RougeL$inboundSchema),
1012
- }).transform((v) => {
1013
- return remap$(v, {
1014
- "rouge_1": "rouge1",
1015
- "rouge_2": "rouge2",
1016
- "rouge_l": "rougeL",
1017
- });
1018
- });
1019
-
1020
- export function invokeEvalResponseBodyValueFromJSON(
1021
- jsonString: string,
1022
- ): SafeParseResult<InvokeEvalResponseBodyValue, SDKValidationError> {
1023
- return safeParse(
1024
- jsonString,
1025
- (x) => InvokeEvalResponseBodyValue$inboundSchema.parse(JSON.parse(x)),
1026
- `Failed to parse 'InvokeEvalResponseBodyValue' from JSON`,
1027
- );
1028
- }
1029
-
1030
- /** @internal */
1031
- export const RougeN$inboundSchema: z.ZodType<RougeN, z.ZodTypeDef, unknown> = z
1032
- .object({
1033
- type: z.literal("rouge_n"),
1034
- value: z.lazy(() => InvokeEvalResponseBodyValue$inboundSchema),
1035
- });
1036
-
1037
- export function rougeNFromJSON(
1038
- jsonString: string,
1039
- ): SafeParseResult<RougeN, SDKValidationError> {
1040
- return safeParse(
1041
- jsonString,
1042
- (x) => RougeN$inboundSchema.parse(JSON.parse(x)),
1043
- `Failed to parse 'RougeN' from JSON`,
1044
- );
1045
- }
1046
-
1047
- /** @internal */
1048
- export const StringArray$inboundSchema: z.ZodType<
1049
- StringArray,
1050
- z.ZodTypeDef,
1051
- unknown
1052
- > = z.object({
1053
- type: z.literal("string_array"),
1054
- values: z.array(z.nullable(z.string())),
1055
- });
1056
-
1057
- export function stringArrayFromJSON(
1058
- jsonString: string,
1059
- ): SafeParseResult<StringArray, SDKValidationError> {
1060
- return safeParse(
1061
- jsonString,
1062
- (x) => StringArray$inboundSchema.parse(JSON.parse(x)),
1063
- `Failed to parse 'StringArray' from JSON`,
1064
- );
1065
- }
1066
-
1067
- /** @internal */
1068
- export const ResponseBodyValue$inboundSchema: z.ZodType<
1069
- ResponseBodyValue,
1070
- z.ZodTypeDef,
1071
- unknown
1072
- > = z.union([z.boolean(), z.string(), z.number()]);
1073
-
1074
- export function responseBodyValueFromJSON(
1075
- jsonString: string,
1076
- ): SafeParseResult<ResponseBodyValue, SDKValidationError> {
1077
- return safeParse(
1078
- jsonString,
1079
- (x) => ResponseBodyValue$inboundSchema.parse(JSON.parse(x)),
1080
- `Failed to parse 'ResponseBodyValue' from JSON`,
1081
- );
1082
- }
1083
-
1084
- /** @internal */
1085
- export const ResponseBodyBoolean$inboundSchema: z.ZodType<
1086
- ResponseBodyBoolean,
1087
- z.ZodTypeDef,
1088
- unknown
1089
- > = z.object({
1090
- type: z.literal("boolean"),
1091
- value: z.nullable(z.union([z.boolean(), z.string(), z.number()])),
1092
- });
1093
-
1094
- export function responseBodyBooleanFromJSON(
1095
- jsonString: string,
1096
- ): SafeParseResult<ResponseBodyBoolean, SDKValidationError> {
1097
- return safeParse(
1098
- jsonString,
1099
- (x) => ResponseBodyBoolean$inboundSchema.parse(JSON.parse(x)),
1100
- `Failed to parse 'ResponseBodyBoolean' from JSON`,
1101
- );
1102
- }
1103
-
1104
- /** @internal */
1105
- export const FormatOptionsStyle$inboundSchema: z.ZodNativeEnum<
1106
- typeof FormatOptionsStyle
1107
- > = z.nativeEnum(FormatOptionsStyle);
1108
-
1109
- /** @internal */
1110
- export const Currency$inboundSchema: z.ZodNativeEnum<typeof Currency> = z
1111
- .nativeEnum(Currency);
1112
-
1113
- /** @internal */
1114
- export const FormatOptions2$inboundSchema: z.ZodType<
1115
- FormatOptions2,
1116
- z.ZodTypeDef,
1117
- unknown
1118
- > = z.object({
1119
- style: FormatOptionsStyle$inboundSchema,
1120
- currency: Currency$inboundSchema,
1121
- });
1122
-
1123
- export function formatOptions2FromJSON(
1124
- jsonString: string,
1125
- ): SafeParseResult<FormatOptions2, SDKValidationError> {
1126
- return safeParse(
1127
- jsonString,
1128
- (x) => FormatOptions2$inboundSchema.parse(JSON.parse(x)),
1129
- `Failed to parse 'FormatOptions2' from JSON`,
1130
- );
1131
- }
1132
-
1133
- /** @internal */
1134
- export const FormatOptions1$inboundSchema: z.ZodType<
1135
- FormatOptions1,
1136
- z.ZodTypeDef,
1137
- unknown
1138
- > = z.object({
1139
- significant_digits: z.number(),
1140
- }).transform((v) => {
1141
- return remap$(v, {
1142
- "significant_digits": "significantDigits",
1143
- });
1144
- });
1145
-
1146
- export function formatOptions1FromJSON(
1147
- jsonString: string,
1148
- ): SafeParseResult<FormatOptions1, SDKValidationError> {
1149
- return safeParse(
1150
- jsonString,
1151
- (x) => FormatOptions1$inboundSchema.parse(JSON.parse(x)),
1152
- `Failed to parse 'FormatOptions1' from JSON`,
1153
- );
1154
- }
1155
-
1156
- /** @internal */
1157
- export const FormatOptions$inboundSchema: z.ZodType<
1158
- FormatOptions,
1159
- z.ZodTypeDef,
1160
- unknown
1161
- > = z.union([
1162
- z.lazy(() => FormatOptions2$inboundSchema),
1163
- z.lazy(() => FormatOptions1$inboundSchema),
1164
- ]);
1165
-
1166
- export function formatOptionsFromJSON(
1167
- jsonString: string,
1168
- ): SafeParseResult<FormatOptions, SDKValidationError> {
1169
- return safeParse(
1170
- jsonString,
1171
- (x) => FormatOptions$inboundSchema.parse(JSON.parse(x)),
1172
- `Failed to parse 'FormatOptions' from JSON`,
1173
- );
1174
- }
1175
-
1176
- /** @internal */
1177
- export const ResponseBodyNumber$inboundSchema: z.ZodType<
1178
- ResponseBodyNumber,
1179
- z.ZodTypeDef,
1180
- unknown
1181
- > = z.object({
1182
- type: z.literal("number"),
1183
- original_value: z.nullable(z.number()).optional(),
1184
- value: z.nullable(z.number()),
1185
- format_options: z.union([
1186
- z.lazy(() => FormatOptions2$inboundSchema),
1187
- z.lazy(() => FormatOptions1$inboundSchema),
1188
- ]).optional(),
1189
- }).transform((v) => {
1190
- return remap$(v, {
1191
- "original_value": "originalValue",
1192
- "format_options": "formatOptions",
1193
- });
1194
- });
1195
-
1196
- export function responseBodyNumberFromJSON(
1197
- jsonString: string,
1198
- ): SafeParseResult<ResponseBodyNumber, SDKValidationError> {
1199
- return safeParse(
1200
- jsonString,
1201
- (x) => ResponseBodyNumber$inboundSchema.parse(JSON.parse(x)),
1202
- `Failed to parse 'ResponseBodyNumber' from JSON`,
1203
- );
1204
- }
1205
-
1206
- /** @internal */
1207
- export const String$inboundSchema: z.ZodType<String, z.ZodTypeDef, unknown> = z
1208
- .object({
1209
- type: z.literal("string"),
1210
- original_value: z.nullable(z.string()).optional(),
1211
- value: z.nullable(z.string()).optional(),
1212
- }).transform((v) => {
1213
- return remap$(v, {
1214
- "original_value": "originalValue",
1215
- });
1216
- });
1217
-
1218
- export function stringFromJSON(
1219
- jsonString: string,
1220
- ): SafeParseResult<String, SDKValidationError> {
1221
- return safeParse(
1222
- jsonString,
1223
- (x) => String$inboundSchema.parse(JSON.parse(x)),
1224
- `Failed to parse 'String' from JSON`,
1225
- );
1226
- }
1227
-
1228
- /** @internal */
1229
- export const InvokeEvalResponseBody$inboundSchema: z.ZodType<
1230
- InvokeEvalResponseBody,
1231
- z.ZodTypeDef,
1232
- unknown
1233
- > = z.union([
1234
- z.lazy(() => String$inboundSchema),
1235
- z.lazy(() => ResponseBodyNumber$inboundSchema),
1236
- z.lazy(() => ResponseBodyBoolean$inboundSchema),
1237
- z.lazy(() => StringArray$inboundSchema),
1238
- z.lazy(() => RougeN$inboundSchema),
1239
- z.lazy(() => BERTScore$inboundSchema),
1240
- z.lazy(() => InvokeEvalResponseBodyLLM$inboundSchema),
1241
- z.lazy(() => InvokeEvalResponseBodyHTTP$inboundSchema),
1242
- z.lazy(() => Structured$inboundSchema),
1243
- ]);
1244
-
1245
- export function invokeEvalResponseBodyFromJSON(
1246
- jsonString: string,
1247
- ): SafeParseResult<InvokeEvalResponseBody, SDKValidationError> {
1248
- return safeParse(
1249
- jsonString,
1250
- (x) => InvokeEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
1251
- `Failed to parse 'InvokeEvalResponseBody' from JSON`,
1252
- );
1253
- }