@orq-ai/node 3.6.3 → 3.6.4

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 (226) hide show
  1. package/bin/mcp-server.js +40 -40
  2. package/bin/mcp-server.js.map +21 -21
  3. package/index.d.ts +2 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +3 -1
  6. package/index.js.map +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +3 -3
  9. package/lib/config.js +3 -3
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/models/operations/bulkcreatedatapoints.js +2 -2
  13. package/models/operations/createcontact.js +2 -2
  14. package/models/operations/createdataset.js +2 -2
  15. package/models/operations/createdatasetitem.js +2 -2
  16. package/models/operations/createdatasource.js +2 -2
  17. package/models/operations/fileget.js +2 -2
  18. package/models/operations/filelist.js +2 -2
  19. package/models/operations/fileupload.js +2 -2
  20. package/models/operations/listdatasetdatapoints.js +2 -2
  21. package/models/operations/listdatasets.js +2 -2
  22. package/models/operations/listdatasources.js +2 -2
  23. package/models/operations/retrievedatapoint.js +2 -2
  24. package/models/operations/retrievedataset.js +2 -2
  25. package/models/operations/retrievedatasource.js +2 -2
  26. package/models/operations/updatedatapoint.js +2 -2
  27. package/models/operations/updatedataset.js +2 -2
  28. package/models/operations/updatedatasource.js +2 -2
  29. package/package.json +1 -1
  30. package/packages/orq-rc/README.md +73 -2
  31. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -77
  32. package/packages/orq-rc/docs/sdks/evals/README.md +2661 -0
  33. package/packages/orq-rc/docs/sdks/knowledge/README.md +1 -1
  34. package/packages/orq-rc/jsr.json +1 -1
  35. package/packages/orq-rc/package-lock.json +2 -2
  36. package/packages/orq-rc/package.json +1 -1
  37. package/packages/orq-rc/src/funcs/evalsAgeAppropriate.ts +171 -0
  38. package/packages/orq-rc/src/funcs/evalsBleuScore.ts +171 -0
  39. package/packages/orq-rc/src/funcs/evalsBotDetection.ts +171 -0
  40. package/packages/orq-rc/src/funcs/evalsContains.ts +171 -0
  41. package/packages/orq-rc/src/funcs/evalsContainsAll.ts +171 -0
  42. package/packages/orq-rc/src/funcs/evalsContainsAny.ts +171 -0
  43. package/packages/orq-rc/src/funcs/evalsContainsEmail.ts +171 -0
  44. package/packages/orq-rc/src/funcs/evalsContainsNone.ts +171 -0
  45. package/packages/orq-rc/src/funcs/evalsContainsUrl.ts +171 -0
  46. package/packages/orq-rc/src/funcs/evalsContainsValidLink.ts +173 -0
  47. package/packages/orq-rc/src/funcs/{datasetsCreateDatapoints.ts → evalsCreate.ts} +27 -29
  48. package/packages/orq-rc/src/funcs/evalsEndsWith.ts +171 -0
  49. package/packages/orq-rc/src/funcs/evalsExactMatch.ts +171 -0
  50. package/packages/orq-rc/src/funcs/evalsFactCheckingKnowledgeBase.ts +179 -0
  51. package/packages/orq-rc/src/funcs/evalsGrammar.ts +169 -0
  52. package/packages/orq-rc/src/funcs/evalsLengthBetween.ts +171 -0
  53. package/packages/orq-rc/src/funcs/evalsLengthGreaterThan.ts +173 -0
  54. package/packages/orq-rc/src/funcs/evalsLengthLessThan.ts +171 -0
  55. package/packages/orq-rc/src/funcs/evalsLocalization.ts +171 -0
  56. package/packages/orq-rc/src/funcs/evalsPii.ts +169 -0
  57. package/packages/orq-rc/src/funcs/evalsRagasCoherence.ts +171 -0
  58. package/packages/orq-rc/src/funcs/evalsRagasConciseness.ts +170 -0
  59. package/packages/orq-rc/src/funcs/evalsRagasContextPrecision.ts +176 -0
  60. package/packages/orq-rc/src/funcs/evalsRagasCorrectness.ts +170 -0
  61. package/packages/orq-rc/src/funcs/evalsRagasFaithfulness.ts +173 -0
  62. package/packages/orq-rc/src/funcs/evalsRagasHarmfulness.ts +170 -0
  63. package/packages/orq-rc/src/funcs/evalsRagasMaliciousness.ts +173 -0
  64. package/packages/orq-rc/src/funcs/evalsRagasResponseRelevancy.ts +179 -0
  65. package/packages/orq-rc/src/funcs/evalsRagasSummarization.ts +173 -0
  66. package/packages/orq-rc/src/funcs/evalsRunBertScore.ts +169 -0
  67. package/packages/orq-rc/src/funcs/evalsSentimentClassification.ts +179 -0
  68. package/packages/orq-rc/src/funcs/evalsSummarization.ts +171 -0
  69. package/packages/orq-rc/src/funcs/evalsToneOfVoice.ts +171 -0
  70. package/packages/orq-rc/src/funcs/evalsTranslation.ts +171 -0
  71. package/packages/orq-rc/src/funcs/evalsValidJson.ts +171 -0
  72. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +4 -4
  73. package/packages/orq-rc/src/index.ts +2 -0
  74. package/packages/orq-rc/src/lib/config.ts +3 -3
  75. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  76. package/packages/orq-rc/src/mcp-server/server.ts +71 -3
  77. package/packages/orq-rc/src/mcp-server/tools/evalsAgeAppropriate.ts +35 -0
  78. package/packages/orq-rc/src/mcp-server/tools/evalsBleuScore.ts +35 -0
  79. package/packages/orq-rc/src/mcp-server/tools/evalsBotDetection.ts +35 -0
  80. package/packages/orq-rc/src/mcp-server/tools/{datasetsCreateDatapoints.ts → evalsContains.ts} +6 -8
  81. package/packages/orq-rc/src/mcp-server/tools/evalsContainsAll.ts +35 -0
  82. package/packages/orq-rc/src/mcp-server/tools/evalsContainsAny.ts +35 -0
  83. package/packages/orq-rc/src/mcp-server/tools/evalsContainsEmail.ts +35 -0
  84. package/packages/orq-rc/src/mcp-server/tools/evalsContainsNone.ts +35 -0
  85. package/packages/orq-rc/src/mcp-server/tools/evalsContainsUrl.ts +35 -0
  86. package/packages/orq-rc/src/mcp-server/tools/evalsContainsValidLink.ts +36 -0
  87. package/packages/orq-rc/src/mcp-server/tools/evalsCreate.ts +35 -0
  88. package/packages/orq-rc/src/mcp-server/tools/evalsEndsWith.ts +35 -0
  89. package/packages/orq-rc/src/mcp-server/tools/evalsExactMatch.ts +35 -0
  90. package/packages/orq-rc/src/mcp-server/tools/evalsFactCheckingKnowledgeBase.ts +37 -0
  91. package/packages/orq-rc/src/mcp-server/tools/evalsGrammar.ts +35 -0
  92. package/packages/orq-rc/src/mcp-server/tools/evalsLengthBetween.ts +35 -0
  93. package/packages/orq-rc/src/mcp-server/tools/evalsLengthGreaterThan.ts +36 -0
  94. package/packages/orq-rc/src/mcp-server/tools/evalsLengthLessThan.ts +35 -0
  95. package/packages/orq-rc/src/mcp-server/tools/evalsLocalization.ts +35 -0
  96. package/packages/orq-rc/src/mcp-server/tools/evalsPii.ts +35 -0
  97. package/packages/orq-rc/src/mcp-server/tools/evalsRagasCoherence.ts +35 -0
  98. package/packages/orq-rc/src/mcp-server/tools/evalsRagasConciseness.ts +35 -0
  99. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextPrecision.ts +36 -0
  100. package/packages/orq-rc/src/mcp-server/tools/evalsRagasCorrectness.ts +35 -0
  101. package/packages/orq-rc/src/mcp-server/tools/evalsRagasFaithfulness.ts +36 -0
  102. package/packages/orq-rc/src/mcp-server/tools/evalsRagasHarmfulness.ts +35 -0
  103. package/packages/orq-rc/src/mcp-server/tools/evalsRagasMaliciousness.ts +36 -0
  104. package/packages/orq-rc/src/mcp-server/tools/evalsRagasResponseRelevancy.ts +36 -0
  105. package/packages/orq-rc/src/mcp-server/tools/evalsRagasSummarization.ts +36 -0
  106. package/packages/orq-rc/src/mcp-server/tools/evalsRunBertScore.ts +35 -0
  107. package/packages/orq-rc/src/mcp-server/tools/evalsSentimentClassification.ts +36 -0
  108. package/packages/orq-rc/src/mcp-server/tools/evalsSummarization.ts +35 -0
  109. package/packages/orq-rc/src/mcp-server/tools/evalsToneOfVoice.ts +35 -0
  110. package/packages/orq-rc/src/mcp-server/tools/evalsTranslation.ts +35 -0
  111. package/packages/orq-rc/src/mcp-server/tools/evalsValidJson.ts +35 -0
  112. package/packages/orq-rc/src/models/errors/createeval.ts +71 -0
  113. package/packages/orq-rc/src/models/errors/evalsageappropriate.ts +139 -0
  114. package/packages/orq-rc/src/models/errors/evalsbleuscore.ts +137 -0
  115. package/packages/orq-rc/src/models/errors/evalsbotdetection.ts +138 -0
  116. package/packages/orq-rc/src/models/errors/evalscontains.ts +137 -0
  117. package/packages/orq-rc/src/models/errors/evalscontainsall.ts +138 -0
  118. package/packages/orq-rc/src/models/errors/evalscontainsany.ts +138 -0
  119. package/packages/orq-rc/src/models/errors/evalscontainsemail.ts +139 -0
  120. package/packages/orq-rc/src/models/errors/evalscontainsnone.ts +138 -0
  121. package/packages/orq-rc/src/models/errors/evalscontainsurl.ts +138 -0
  122. package/packages/orq-rc/src/models/errors/evalscontainsvalidlink.ts +140 -0
  123. package/packages/orq-rc/src/models/errors/evalsendswith.ts +137 -0
  124. package/packages/orq-rc/src/models/errors/evalsexactmatch.ts +137 -0
  125. package/packages/orq-rc/src/models/errors/evalsfactcheckingknowledgebase.ts +143 -0
  126. package/packages/orq-rc/src/models/errors/evalsgrammar.ts +137 -0
  127. package/packages/orq-rc/src/models/errors/evalslengthbetween.ts +139 -0
  128. package/packages/orq-rc/src/models/errors/evalslengthgreaterthan.ts +140 -0
  129. package/packages/orq-rc/src/models/errors/evalslengthlessthan.ts +139 -0
  130. package/packages/orq-rc/src/models/errors/evalslocalization.ts +138 -0
  131. package/packages/orq-rc/src/models/errors/evalspii.ts +137 -0
  132. package/packages/orq-rc/src/models/errors/evalsragascoherence.ts +139 -0
  133. package/packages/orq-rc/src/models/errors/evalsragasconciseness.ts +140 -0
  134. package/packages/orq-rc/src/models/errors/evalsragascontextprecision.ts +143 -0
  135. package/packages/orq-rc/src/models/errors/evalsragascorrectness.ts +140 -0
  136. package/packages/orq-rc/src/models/errors/evalsragasfaithfulness.ts +140 -0
  137. package/packages/orq-rc/src/models/errors/evalsragasharmfulness.ts +140 -0
  138. package/packages/orq-rc/src/models/errors/evalsragasmaliciousness.ts +141 -0
  139. package/packages/orq-rc/src/models/errors/evalsragasresponserelevancy.ts +143 -0
  140. package/packages/orq-rc/src/models/errors/evalsragassummarization.ts +141 -0
  141. package/packages/orq-rc/src/models/errors/evalssentimentclassification.ts +143 -0
  142. package/packages/orq-rc/src/models/errors/evalssummarization.ts +139 -0
  143. package/packages/orq-rc/src/models/errors/evalstoneofvoice.ts +138 -0
  144. package/packages/orq-rc/src/models/errors/evalstranslation.ts +138 -0
  145. package/packages/orq-rc/src/models/errors/evalsvalidjson.ts +137 -0
  146. package/packages/orq-rc/src/models/errors/index.ts +35 -0
  147. package/packages/orq-rc/src/models/errors/runbertscore.ts +137 -0
  148. package/packages/orq-rc/src/models/operations/createchunk.ts +20 -24
  149. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  150. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  151. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4045 -972
  152. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  153. package/packages/orq-rc/src/models/operations/createeval.ts +3830 -0
  154. package/packages/orq-rc/src/models/operations/evalsageappropriate.ts +253 -0
  155. package/packages/orq-rc/src/models/operations/evalsbleuscore.ts +131 -0
  156. package/packages/orq-rc/src/models/operations/evalsbotdetection.ts +249 -0
  157. package/packages/orq-rc/src/models/operations/evalscontains.ts +250 -0
  158. package/packages/orq-rc/src/models/operations/evalscontainsall.ts +248 -0
  159. package/packages/orq-rc/src/models/operations/evalscontainsany.ts +254 -0
  160. package/packages/orq-rc/src/models/operations/evalscontainsemail.ts +181 -0
  161. package/packages/orq-rc/src/models/operations/evalscontainsnone.ts +254 -0
  162. package/packages/orq-rc/src/models/operations/evalscontainsurl.ts +181 -0
  163. package/packages/orq-rc/src/models/operations/evalscontainsvalidlink.ts +186 -0
  164. package/packages/orq-rc/src/models/operations/evalsendswith.ts +250 -0
  165. package/packages/orq-rc/src/models/operations/evalsexactmatch.ts +183 -0
  166. package/packages/orq-rc/src/models/operations/evalsfactcheckingknowledgebase.ts +299 -0
  167. package/packages/orq-rc/src/models/operations/evalsgrammar.ts +243 -0
  168. package/packages/orq-rc/src/models/operations/evalslengthbetween.ts +268 -0
  169. package/packages/orq-rc/src/models/operations/evalslengthgreaterthan.ts +266 -0
  170. package/packages/orq-rc/src/models/operations/evalslengthlessthan.ts +259 -0
  171. package/packages/orq-rc/src/models/operations/evalslocalization.ts +253 -0
  172. package/packages/orq-rc/src/models/operations/evalspii.ts +243 -0
  173. package/packages/orq-rc/src/models/operations/evalsragascoherence.ts +152 -0
  174. package/packages/orq-rc/src/models/operations/evalsragasconciseness.ts +153 -0
  175. package/packages/orq-rc/src/models/operations/evalsragascontextprecision.ts +166 -0
  176. package/packages/orq-rc/src/models/operations/evalsragascorrectness.ts +153 -0
  177. package/packages/orq-rc/src/models/operations/evalsragasfaithfulness.ts +155 -0
  178. package/packages/orq-rc/src/models/operations/evalsragasharmfulness.ts +146 -0
  179. package/packages/orq-rc/src/models/operations/evalsragasmaliciousness.ts +157 -0
  180. package/packages/orq-rc/src/models/operations/evalsragasresponserelevancy.ts +165 -0
  181. package/packages/orq-rc/src/models/operations/evalsragassummarization.ts +150 -0
  182. package/packages/orq-rc/src/models/operations/evalssentimentclassification.ts +285 -0
  183. package/packages/orq-rc/src/models/operations/evalssummarization.ts +253 -0
  184. package/packages/orq-rc/src/models/operations/evalstoneofvoice.ts +251 -0
  185. package/packages/orq-rc/src/models/operations/evalstranslation.ts +251 -0
  186. package/packages/orq-rc/src/models/operations/evalsvalidjson.ts +177 -0
  187. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  188. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  189. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  190. package/packages/orq-rc/src/models/operations/index.ts +35 -1
  191. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +1805 -301
  192. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  193. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  194. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +1737 -277
  195. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  196. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  197. package/packages/orq-rc/src/models/operations/runbertscore.ts +197 -0
  198. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +3990 -976
  199. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  200. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  201. package/packages/orq-rc/src/sdk/datasets.ts +0 -18
  202. package/packages/orq-rc/src/sdk/evals.ts +534 -0
  203. package/packages/orq-rc/src/sdk/knowledge.ts +1 -1
  204. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  205. package/src/index.ts +2 -0
  206. package/src/lib/config.ts +3 -3
  207. package/src/mcp-server/mcp-server.ts +1 -1
  208. package/src/mcp-server/server.ts +1 -1
  209. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  210. package/src/models/operations/createcontact.ts +2 -2
  211. package/src/models/operations/createdataset.ts +2 -2
  212. package/src/models/operations/createdatasetitem.ts +2 -2
  213. package/src/models/operations/createdatasource.ts +2 -2
  214. package/src/models/operations/fileget.ts +2 -2
  215. package/src/models/operations/filelist.ts +2 -2
  216. package/src/models/operations/fileupload.ts +2 -2
  217. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  218. package/src/models/operations/listdatasets.ts +2 -2
  219. package/src/models/operations/listdatasources.ts +2 -2
  220. package/src/models/operations/retrievedatapoint.ts +2 -2
  221. package/src/models/operations/retrievedataset.ts +2 -2
  222. package/src/models/operations/retrievedatasource.ts +2 -2
  223. package/src/models/operations/updatedatapoint.ts +2 -2
  224. package/src/models/operations/updatedataset.ts +2 -2
  225. package/src/models/operations/updatedatasource.ts +2 -2
  226. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -2232
@@ -15,34 +15,231 @@ export type RetrieveDatapointRequest = {
15
15
  };
16
16
 
17
17
  /**
18
- * The role of the prompt message
18
+ * The role of the messages author, in this case tool.
19
19
  */
20
- export const RetrieveDatapointRole = {
21
- System: "system",
20
+ export const RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole = {
21
+ Tool: "tool",
22
+ } as const;
23
+ /**
24
+ * The role of the messages author, in this case tool.
25
+ */
26
+ export type RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole =
27
+ ClosedEnum<
28
+ typeof RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole
29
+ >;
30
+
31
+ /**
32
+ * The contents of the tool message.
33
+ */
34
+ export type RetrieveDatapointMessagesDatasetsResponseContent =
35
+ | string
36
+ | Array<string>;
37
+
38
+ export type RetrieveDatapointMessagesToolMessage = {
39
+ /**
40
+ * The role of the messages author, in this case tool.
41
+ */
42
+ role: RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole;
43
+ /**
44
+ * The contents of the tool message.
45
+ */
46
+ content: string | Array<string>;
47
+ /**
48
+ * Tool call that this message is responding to.
49
+ */
50
+ toolCallId: string;
51
+ };
52
+
53
+ /**
54
+ * The type of the content part.
55
+ */
56
+ export const RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType =
57
+ {
58
+ Refusal: "refusal",
59
+ } as const;
60
+ /**
61
+ * The type of the content part.
62
+ */
63
+ export type RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType =
64
+ ClosedEnum<
65
+ typeof RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType
66
+ >;
67
+
68
+ export type RetrieveDatapoint2RefusalContentPart = {
69
+ /**
70
+ * The type of the content part.
71
+ */
72
+ type: RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType;
73
+ /**
74
+ * The refusal message generated by the model.
75
+ */
76
+ refusal: string;
77
+ };
78
+
79
+ /**
80
+ * The type of the content part.
81
+ */
82
+ export const RetrieveDatapoint2DatasetsResponse200ApplicationJSONType = {
83
+ Text: "text",
84
+ } as const;
85
+ /**
86
+ * The type of the content part.
87
+ */
88
+ export type RetrieveDatapoint2DatasetsResponse200ApplicationJSONType =
89
+ ClosedEnum<typeof RetrieveDatapoint2DatasetsResponse200ApplicationJSONType>;
90
+
91
+ export type RetrieveDatapoint2TextContentPart = {
92
+ /**
93
+ * The type of the content part.
94
+ */
95
+ type: RetrieveDatapoint2DatasetsResponse200ApplicationJSONType;
96
+ /**
97
+ * The text content.
98
+ */
99
+ text: string;
100
+ };
101
+
102
+ export type RetrieveDatapointContentDatasets2 =
103
+ | RetrieveDatapoint2TextContentPart
104
+ | RetrieveDatapoint2RefusalContentPart;
105
+
106
+ /**
107
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
108
+ */
109
+ export type RetrieveDatapointMessagesDatasetsContent =
110
+ | string
111
+ | Array<
112
+ RetrieveDatapoint2TextContentPart | RetrieveDatapoint2RefusalContentPart
113
+ >;
114
+
115
+ /**
116
+ * The role of the messages author, in this case `assistant`.
117
+ */
118
+ export const RetrieveDatapointMessagesDatasetsResponse200Role = {
22
119
  Assistant: "assistant",
120
+ } as const;
121
+ /**
122
+ * The role of the messages author, in this case `assistant`.
123
+ */
124
+ export type RetrieveDatapointMessagesDatasetsResponse200Role = ClosedEnum<
125
+ typeof RetrieveDatapointMessagesDatasetsResponse200Role
126
+ >;
127
+
128
+ /**
129
+ * Data about a previous audio response from the model.
130
+ */
131
+ export type RetrieveDatapointMessagesAudio = {
132
+ /**
133
+ * Unique identifier for a previous audio response from the model.
134
+ */
135
+ id: string;
136
+ };
137
+
138
+ /**
139
+ * The type of the tool. Currently, only `function` is supported.
140
+ */
141
+ export const RetrieveDatapointMessagesType = {
142
+ Function: "function",
143
+ } as const;
144
+ /**
145
+ * The type of the tool. Currently, only `function` is supported.
146
+ */
147
+ export type RetrieveDatapointMessagesType = ClosedEnum<
148
+ typeof RetrieveDatapointMessagesType
149
+ >;
150
+
151
+ export type RetrieveDatapointMessagesFunction = {
152
+ /**
153
+ * The name of the function to call.
154
+ */
155
+ name?: string | undefined;
156
+ /**
157
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
158
+ */
159
+ arguments?: string | undefined;
160
+ };
161
+
162
+ export type RetrieveDatapointMessagesToolCalls = {
163
+ /**
164
+ * The ID of the tool call.
165
+ */
166
+ id: string;
167
+ /**
168
+ * The type of the tool. Currently, only `function` is supported.
169
+ */
170
+ type: RetrieveDatapointMessagesType;
171
+ function: RetrieveDatapointMessagesFunction;
172
+ };
173
+
174
+ export type RetrieveDatapointMessagesAssistantMessage = {
175
+ /**
176
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
177
+ */
178
+ content?:
179
+ | string
180
+ | Array<
181
+ RetrieveDatapoint2TextContentPart | RetrieveDatapoint2RefusalContentPart
182
+ >
183
+ | null
184
+ | undefined;
185
+ /**
186
+ * The refusal message by the assistant.
187
+ */
188
+ refusal?: string | null | undefined;
189
+ /**
190
+ * The role of the messages author, in this case `assistant`.
191
+ */
192
+ role: RetrieveDatapointMessagesDatasetsResponse200Role;
193
+ /**
194
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
195
+ */
196
+ name?: string | undefined;
197
+ /**
198
+ * Data about a previous audio response from the model.
199
+ */
200
+ audio?: RetrieveDatapointMessagesAudio | null | undefined;
201
+ /**
202
+ * The tool calls generated by the model, such as function calls.
203
+ */
204
+ toolCalls?: Array<RetrieveDatapointMessagesToolCalls> | undefined;
205
+ /**
206
+ * Internal thought process of the model
207
+ */
208
+ reasoning?: string | undefined;
209
+ /**
210
+ * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
211
+ */
212
+ reasoningSignature?: string | undefined;
213
+ /**
214
+ * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
215
+ */
216
+ redactedReasoning?: string | undefined;
217
+ };
218
+
219
+ /**
220
+ * The role of the messages author, in this case `user`.
221
+ */
222
+ export const RetrieveDatapointMessagesDatasetsResponseRole = {
23
223
  User: "user",
24
- Exception: "exception",
25
- Tool: "tool",
26
- Prompt: "prompt",
27
- Correction: "correction",
28
- ExpectedOutput: "expected_output",
29
224
  } as const;
30
225
  /**
31
- * The role of the prompt message
226
+ * The role of the messages author, in this case `user`.
32
227
  */
33
- export type RetrieveDatapointRole = ClosedEnum<typeof RetrieveDatapointRole>;
228
+ export type RetrieveDatapointMessagesDatasetsResponseRole = ClosedEnum<
229
+ typeof RetrieveDatapointMessagesDatasetsResponseRole
230
+ >;
34
231
 
35
232
  /**
36
233
  * The type of the content part. Always `file`.
37
234
  */
38
- export const RetrieveDatapoint2DatasetsResponseType = {
235
+ export const RetrieveDatapoint2DatasetsResponse200Type = {
39
236
  File: "file",
40
237
  } as const;
41
238
  /**
42
239
  * The type of the content part. Always `file`.
43
240
  */
44
- export type RetrieveDatapoint2DatasetsResponseType = ClosedEnum<
45
- typeof RetrieveDatapoint2DatasetsResponseType
241
+ export type RetrieveDatapoint2DatasetsResponse200Type = ClosedEnum<
242
+ typeof RetrieveDatapoint2DatasetsResponse200Type
46
243
  >;
47
244
 
48
245
  export type RetrieveDatapoint2File = {
@@ -56,14 +253,51 @@ export type RetrieveDatapoint2File = {
56
253
  filename?: string | undefined;
57
254
  };
58
255
 
59
- export type RetrieveDatapoint23 = {
256
+ export type RetrieveDatapoint24 = {
60
257
  /**
61
258
  * The type of the content part. Always `file`.
62
259
  */
63
- type: RetrieveDatapoint2DatasetsResponseType;
260
+ type: RetrieveDatapoint2DatasetsResponse200Type;
64
261
  file: RetrieveDatapoint2File;
65
262
  };
66
263
 
264
+ export const RetrieveDatapoint2DatasetsResponseType = {
265
+ InputAudio: "input_audio",
266
+ } as const;
267
+ export type RetrieveDatapoint2DatasetsResponseType = ClosedEnum<
268
+ typeof RetrieveDatapoint2DatasetsResponseType
269
+ >;
270
+
271
+ /**
272
+ * The format of the encoded audio data. Currently supports `wav` and `mp3`.
273
+ */
274
+ export const RetrieveDatapoint2Format = {
275
+ Mp3: "mp3",
276
+ Wav: "wav",
277
+ } as const;
278
+ /**
279
+ * The format of the encoded audio data. Currently supports `wav` and `mp3`.
280
+ */
281
+ export type RetrieveDatapoint2Format = ClosedEnum<
282
+ typeof RetrieveDatapoint2Format
283
+ >;
284
+
285
+ export type RetrieveDatapoint2InputAudio = {
286
+ /**
287
+ * Base64 encoded audio data.
288
+ */
289
+ data: string;
290
+ /**
291
+ * The format of the encoded audio data. Currently supports `wav` and `mp3`.
292
+ */
293
+ format: RetrieveDatapoint2Format;
294
+ };
295
+
296
+ export type RetrieveDatapoint23 = {
297
+ type: RetrieveDatapoint2DatasetsResponseType;
298
+ inputAudio: RetrieveDatapoint2InputAudio;
299
+ };
300
+
67
301
  export const RetrieveDatapoint2DatasetsType = {
68
302
  ImageUrl: "image_url",
69
303
  } as const;
@@ -71,24 +305,32 @@ export type RetrieveDatapoint2DatasetsType = ClosedEnum<
71
305
  typeof RetrieveDatapoint2DatasetsType
72
306
  >;
73
307
 
308
+ /**
309
+ * Specifies the detail level of the image.
310
+ */
311
+ export const RetrieveDatapoint2Detail = {
312
+ Low: "low",
313
+ High: "high",
314
+ Auto: "auto",
315
+ } as const;
316
+ /**
317
+ * Specifies the detail level of the image.
318
+ */
319
+ export type RetrieveDatapoint2Detail = ClosedEnum<
320
+ typeof RetrieveDatapoint2Detail
321
+ >;
322
+
74
323
  export type RetrieveDatapoint2ImageUrl = {
75
324
  /**
76
- * The orq.ai id of the image
77
- */
78
- id?: string | undefined;
79
- /**
80
- * Either a URL of the image or the base64 encoded data URI.
325
+ * Either a URL of the image or the base64 encoded image data.
81
326
  */
82
327
  url: string;
83
328
  /**
84
- * Specifies the detail level of the image. Currently only supported with OpenAI models
329
+ * Specifies the detail level of the image.
85
330
  */
86
- detail?: string | undefined;
331
+ detail?: RetrieveDatapoint2Detail | undefined;
87
332
  };
88
333
 
89
- /**
90
- * The image part of the prompt message. Only supported with vision models.
91
- */
92
334
  export type RetrieveDatapoint22 = {
93
335
  type: RetrieveDatapoint2DatasetsType;
94
336
  imageUrl: RetrieveDatapoint2ImageUrl;
@@ -99,9 +341,6 @@ export const RetrieveDatapoint2Type = {
99
341
  } as const;
100
342
  export type RetrieveDatapoint2Type = ClosedEnum<typeof RetrieveDatapoint2Type>;
101
343
 
102
- /**
103
- * Text content part of a prompt message
104
- */
105
344
  export type RetrieveDatapoint21 = {
106
345
  type: RetrieveDatapoint2Type;
107
346
  text: string;
@@ -110,50 +349,106 @@ export type RetrieveDatapoint21 = {
110
349
  export type RetrieveDatapointContent2 =
111
350
  | RetrieveDatapoint21
112
351
  | RetrieveDatapoint22
113
- | RetrieveDatapoint23;
352
+ | RetrieveDatapoint23
353
+ | RetrieveDatapoint24;
114
354
 
115
355
  /**
116
- * 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.
356
+ * The contents of the user message.
117
357
  */
118
- export type RetrieveDatapointContent =
358
+ export type RetrieveDatapointMessagesContent =
119
359
  | string
120
- | Array<RetrieveDatapoint21 | RetrieveDatapoint22 | RetrieveDatapoint23>;
360
+ | Array<
361
+ | RetrieveDatapoint21
362
+ | RetrieveDatapoint22
363
+ | RetrieveDatapoint23
364
+ | RetrieveDatapoint24
365
+ >;
121
366
 
122
- export const RetrieveDatapointType = {
123
- Function: "function",
367
+ export type RetrieveDatapointMessagesUserMessage = {
368
+ /**
369
+ * The role of the messages author, in this case `user`.
370
+ */
371
+ role: RetrieveDatapointMessagesDatasetsResponseRole;
372
+ /**
373
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
374
+ */
375
+ name?: string | undefined;
376
+ /**
377
+ * The contents of the user message.
378
+ */
379
+ content:
380
+ | string
381
+ | Array<
382
+ | RetrieveDatapoint21
383
+ | RetrieveDatapoint22
384
+ | RetrieveDatapoint23
385
+ | RetrieveDatapoint24
386
+ >;
387
+ };
388
+
389
+ /**
390
+ * The role of the messages author, in this case `system`.
391
+ */
392
+ export const RetrieveDatapointMessagesDatasetsRole = {
393
+ System: "system",
124
394
  } as const;
125
- export type RetrieveDatapointType = ClosedEnum<typeof RetrieveDatapointType>;
395
+ /**
396
+ * The role of the messages author, in this case `system`.
397
+ */
398
+ export type RetrieveDatapointMessagesDatasetsRole = ClosedEnum<
399
+ typeof RetrieveDatapointMessagesDatasetsRole
400
+ >;
126
401
 
127
- export type RetrieveDatapointFunction = {
128
- name: string;
402
+ export type RetrieveDatapointMessagesSystemMessage = {
129
403
  /**
130
- * JSON string arguments for the functions
404
+ * The role of the messages author, in this case `system`.
131
405
  */
132
- arguments: string;
406
+ role: RetrieveDatapointMessagesDatasetsRole;
407
+ /**
408
+ * The contents of the system message.
409
+ */
410
+ content: string;
411
+ /**
412
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
413
+ */
414
+ name?: string | undefined;
133
415
  };
134
416
 
135
- export type RetrieveDatapointToolCalls = {
136
- id?: string | undefined;
137
- index?: number | undefined;
138
- type: RetrieveDatapointType;
139
- function: RetrieveDatapointFunction;
140
- };
417
+ /**
418
+ * The role of the messages author, in this case `developer`.
419
+ */
420
+ export const RetrieveDatapointMessagesRole = {
421
+ Developer: "developer",
422
+ } as const;
423
+ /**
424
+ * The role of the messages author, in this case `developer`.
425
+ */
426
+ export type RetrieveDatapointMessagesRole = ClosedEnum<
427
+ typeof RetrieveDatapointMessagesRole
428
+ >;
141
429
 
142
- export type RetrieveDatapointMessages = {
430
+ export type RetrieveDatapointMessagesDeveloperMessage = {
143
431
  /**
144
- * The role of the prompt message
432
+ * The role of the messages author, in this case `developer`.
145
433
  */
146
- role: RetrieveDatapointRole;
434
+ role: RetrieveDatapointMessagesRole;
147
435
  /**
148
- * 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.
436
+ * The contents of the developer message.
149
437
  */
150
- content:
151
- | string
152
- | Array<RetrieveDatapoint21 | RetrieveDatapoint22 | RetrieveDatapoint23>;
153
- toolCalls?: Array<RetrieveDatapointToolCalls> | undefined;
154
- toolCallId?: string | undefined;
438
+ content: string;
439
+ /**
440
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
441
+ */
442
+ name?: string | undefined;
155
443
  };
156
444
 
445
+ export type RetrieveDatapointMessages =
446
+ | RetrieveDatapointMessagesDeveloperMessage
447
+ | RetrieveDatapointMessagesSystemMessage
448
+ | RetrieveDatapointMessagesUserMessage
449
+ | RetrieveDatapointMessagesToolMessage
450
+ | RetrieveDatapointMessagesAssistantMessage;
451
+
157
452
  /**
158
453
  * Datapoint retrieved.
159
454
  */
@@ -171,9 +466,17 @@ export type RetrieveDatapointResponseBody = {
171
466
  */
172
467
  inputs?: { [k: string]: any } | undefined;
173
468
  /**
174
- * The prompt template messages
469
+ * A list of messages comprising the conversation so far
175
470
  */
176
- messages?: Array<RetrieveDatapointMessages> | undefined;
471
+ messages?:
472
+ | Array<
473
+ | RetrieveDatapointMessagesDeveloperMessage
474
+ | RetrieveDatapointMessagesSystemMessage
475
+ | RetrieveDatapointMessagesUserMessage
476
+ | RetrieveDatapointMessagesToolMessage
477
+ | RetrieveDatapointMessagesAssistantMessage
478
+ >
479
+ | undefined;
177
480
  expectedOutput?: string | undefined;
178
481
  /**
179
482
  * The unique identifier of the dataset
@@ -224,12 +527,962 @@ export const RetrieveDatapointRequest$outboundSchema: z.ZodType<
224
527
  z.ZodTypeDef,
225
528
  RetrieveDatapointRequest
226
529
  > = z.object({
227
- datasetId: z.string(),
228
- datapointId: z.string(),
530
+ datasetId: z.string(),
531
+ datapointId: z.string(),
532
+ }).transform((v) => {
533
+ return remap$(v, {
534
+ datasetId: "dataset_id",
535
+ datapointId: "datapoint_id",
536
+ });
537
+ });
538
+
539
+ /**
540
+ * @internal
541
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
542
+ */
543
+ export namespace RetrieveDatapointRequest$ {
544
+ /** @deprecated use `RetrieveDatapointRequest$inboundSchema` instead. */
545
+ export const inboundSchema = RetrieveDatapointRequest$inboundSchema;
546
+ /** @deprecated use `RetrieveDatapointRequest$outboundSchema` instead. */
547
+ export const outboundSchema = RetrieveDatapointRequest$outboundSchema;
548
+ /** @deprecated use `RetrieveDatapointRequest$Outbound` instead. */
549
+ export type Outbound = RetrieveDatapointRequest$Outbound;
550
+ }
551
+
552
+ export function retrieveDatapointRequestToJSON(
553
+ retrieveDatapointRequest: RetrieveDatapointRequest,
554
+ ): string {
555
+ return JSON.stringify(
556
+ RetrieveDatapointRequest$outboundSchema.parse(retrieveDatapointRequest),
557
+ );
558
+ }
559
+
560
+ export function retrieveDatapointRequestFromJSON(
561
+ jsonString: string,
562
+ ): SafeParseResult<RetrieveDatapointRequest, SDKValidationError> {
563
+ return safeParse(
564
+ jsonString,
565
+ (x) => RetrieveDatapointRequest$inboundSchema.parse(JSON.parse(x)),
566
+ `Failed to parse 'RetrieveDatapointRequest' from JSON`,
567
+ );
568
+ }
569
+
570
+ /** @internal */
571
+ export const RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$inboundSchema:
572
+ z.ZodNativeEnum<
573
+ typeof RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole
574
+ > = z.nativeEnum(
575
+ RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole,
576
+ );
577
+
578
+ /** @internal */
579
+ export const RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$outboundSchema:
580
+ z.ZodNativeEnum<
581
+ typeof RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole
582
+ > =
583
+ RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$inboundSchema;
584
+
585
+ /**
586
+ * @internal
587
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
588
+ */
589
+ export namespace RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$ {
590
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$inboundSchema` instead. */
591
+ export const inboundSchema =
592
+ RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$inboundSchema;
593
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$outboundSchema` instead. */
594
+ export const outboundSchema =
595
+ RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$outboundSchema;
596
+ }
597
+
598
+ /** @internal */
599
+ export const RetrieveDatapointMessagesDatasetsResponseContent$inboundSchema:
600
+ z.ZodType<
601
+ RetrieveDatapointMessagesDatasetsResponseContent,
602
+ z.ZodTypeDef,
603
+ unknown
604
+ > = z.union([z.string(), z.array(z.string())]);
605
+
606
+ /** @internal */
607
+ export type RetrieveDatapointMessagesDatasetsResponseContent$Outbound =
608
+ | string
609
+ | Array<string>;
610
+
611
+ /** @internal */
612
+ export const RetrieveDatapointMessagesDatasetsResponseContent$outboundSchema:
613
+ z.ZodType<
614
+ RetrieveDatapointMessagesDatasetsResponseContent$Outbound,
615
+ z.ZodTypeDef,
616
+ RetrieveDatapointMessagesDatasetsResponseContent
617
+ > = z.union([z.string(), z.array(z.string())]);
618
+
619
+ /**
620
+ * @internal
621
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
622
+ */
623
+ export namespace RetrieveDatapointMessagesDatasetsResponseContent$ {
624
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponseContent$inboundSchema` instead. */
625
+ export const inboundSchema =
626
+ RetrieveDatapointMessagesDatasetsResponseContent$inboundSchema;
627
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponseContent$outboundSchema` instead. */
628
+ export const outboundSchema =
629
+ RetrieveDatapointMessagesDatasetsResponseContent$outboundSchema;
630
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponseContent$Outbound` instead. */
631
+ export type Outbound =
632
+ RetrieveDatapointMessagesDatasetsResponseContent$Outbound;
633
+ }
634
+
635
+ export function retrieveDatapointMessagesDatasetsResponseContentToJSON(
636
+ retrieveDatapointMessagesDatasetsResponseContent:
637
+ RetrieveDatapointMessagesDatasetsResponseContent,
638
+ ): string {
639
+ return JSON.stringify(
640
+ RetrieveDatapointMessagesDatasetsResponseContent$outboundSchema.parse(
641
+ retrieveDatapointMessagesDatasetsResponseContent,
642
+ ),
643
+ );
644
+ }
645
+
646
+ export function retrieveDatapointMessagesDatasetsResponseContentFromJSON(
647
+ jsonString: string,
648
+ ): SafeParseResult<
649
+ RetrieveDatapointMessagesDatasetsResponseContent,
650
+ SDKValidationError
651
+ > {
652
+ return safeParse(
653
+ jsonString,
654
+ (x) =>
655
+ RetrieveDatapointMessagesDatasetsResponseContent$inboundSchema.parse(
656
+ JSON.parse(x),
657
+ ),
658
+ `Failed to parse 'RetrieveDatapointMessagesDatasetsResponseContent' from JSON`,
659
+ );
660
+ }
661
+
662
+ /** @internal */
663
+ export const RetrieveDatapointMessagesToolMessage$inboundSchema: z.ZodType<
664
+ RetrieveDatapointMessagesToolMessage,
665
+ z.ZodTypeDef,
666
+ unknown
667
+ > = z.object({
668
+ role:
669
+ RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$inboundSchema,
670
+ content: z.union([z.string(), z.array(z.string())]),
671
+ tool_call_id: z.string(),
672
+ }).transform((v) => {
673
+ return remap$(v, {
674
+ "tool_call_id": "toolCallId",
675
+ });
676
+ });
677
+
678
+ /** @internal */
679
+ export type RetrieveDatapointMessagesToolMessage$Outbound = {
680
+ role: string;
681
+ content: string | Array<string>;
682
+ tool_call_id: string;
683
+ };
684
+
685
+ /** @internal */
686
+ export const RetrieveDatapointMessagesToolMessage$outboundSchema: z.ZodType<
687
+ RetrieveDatapointMessagesToolMessage$Outbound,
688
+ z.ZodTypeDef,
689
+ RetrieveDatapointMessagesToolMessage
690
+ > = z.object({
691
+ role:
692
+ RetrieveDatapointMessagesDatasetsResponse200ApplicationJSONRole$outboundSchema,
693
+ content: z.union([z.string(), z.array(z.string())]),
694
+ toolCallId: z.string(),
695
+ }).transform((v) => {
696
+ return remap$(v, {
697
+ toolCallId: "tool_call_id",
698
+ });
699
+ });
700
+
701
+ /**
702
+ * @internal
703
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
704
+ */
705
+ export namespace RetrieveDatapointMessagesToolMessage$ {
706
+ /** @deprecated use `RetrieveDatapointMessagesToolMessage$inboundSchema` instead. */
707
+ export const inboundSchema =
708
+ RetrieveDatapointMessagesToolMessage$inboundSchema;
709
+ /** @deprecated use `RetrieveDatapointMessagesToolMessage$outboundSchema` instead. */
710
+ export const outboundSchema =
711
+ RetrieveDatapointMessagesToolMessage$outboundSchema;
712
+ /** @deprecated use `RetrieveDatapointMessagesToolMessage$Outbound` instead. */
713
+ export type Outbound = RetrieveDatapointMessagesToolMessage$Outbound;
714
+ }
715
+
716
+ export function retrieveDatapointMessagesToolMessageToJSON(
717
+ retrieveDatapointMessagesToolMessage: RetrieveDatapointMessagesToolMessage,
718
+ ): string {
719
+ return JSON.stringify(
720
+ RetrieveDatapointMessagesToolMessage$outboundSchema.parse(
721
+ retrieveDatapointMessagesToolMessage,
722
+ ),
723
+ );
724
+ }
725
+
726
+ export function retrieveDatapointMessagesToolMessageFromJSON(
727
+ jsonString: string,
728
+ ): SafeParseResult<RetrieveDatapointMessagesToolMessage, SDKValidationError> {
729
+ return safeParse(
730
+ jsonString,
731
+ (x) =>
732
+ RetrieveDatapointMessagesToolMessage$inboundSchema.parse(JSON.parse(x)),
733
+ `Failed to parse 'RetrieveDatapointMessagesToolMessage' from JSON`,
734
+ );
735
+ }
736
+
737
+ /** @internal */
738
+ export const RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$inboundSchema:
739
+ z.ZodNativeEnum<
740
+ typeof RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType
741
+ > = z.nativeEnum(
742
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType,
743
+ );
744
+
745
+ /** @internal */
746
+ export const RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$outboundSchema:
747
+ z.ZodNativeEnum<
748
+ typeof RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType
749
+ > =
750
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$inboundSchema;
751
+
752
+ /**
753
+ * @internal
754
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
755
+ */
756
+ export namespace RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$ {
757
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$inboundSchema` instead. */
758
+ export const inboundSchema =
759
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$inboundSchema;
760
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$outboundSchema` instead. */
761
+ export const outboundSchema =
762
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$outboundSchema;
763
+ }
764
+
765
+ /** @internal */
766
+ export const RetrieveDatapoint2RefusalContentPart$inboundSchema: z.ZodType<
767
+ RetrieveDatapoint2RefusalContentPart,
768
+ z.ZodTypeDef,
769
+ unknown
770
+ > = z.object({
771
+ type:
772
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$inboundSchema,
773
+ refusal: z.string(),
774
+ });
775
+
776
+ /** @internal */
777
+ export type RetrieveDatapoint2RefusalContentPart$Outbound = {
778
+ type: string;
779
+ refusal: string;
780
+ };
781
+
782
+ /** @internal */
783
+ export const RetrieveDatapoint2RefusalContentPart$outboundSchema: z.ZodType<
784
+ RetrieveDatapoint2RefusalContentPart$Outbound,
785
+ z.ZodTypeDef,
786
+ RetrieveDatapoint2RefusalContentPart
787
+ > = z.object({
788
+ type:
789
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONResponseBodyType$outboundSchema,
790
+ refusal: z.string(),
791
+ });
792
+
793
+ /**
794
+ * @internal
795
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
796
+ */
797
+ export namespace RetrieveDatapoint2RefusalContentPart$ {
798
+ /** @deprecated use `RetrieveDatapoint2RefusalContentPart$inboundSchema` instead. */
799
+ export const inboundSchema =
800
+ RetrieveDatapoint2RefusalContentPart$inboundSchema;
801
+ /** @deprecated use `RetrieveDatapoint2RefusalContentPart$outboundSchema` instead. */
802
+ export const outboundSchema =
803
+ RetrieveDatapoint2RefusalContentPart$outboundSchema;
804
+ /** @deprecated use `RetrieveDatapoint2RefusalContentPart$Outbound` instead. */
805
+ export type Outbound = RetrieveDatapoint2RefusalContentPart$Outbound;
806
+ }
807
+
808
+ export function retrieveDatapoint2RefusalContentPartToJSON(
809
+ retrieveDatapoint2RefusalContentPart: RetrieveDatapoint2RefusalContentPart,
810
+ ): string {
811
+ return JSON.stringify(
812
+ RetrieveDatapoint2RefusalContentPart$outboundSchema.parse(
813
+ retrieveDatapoint2RefusalContentPart,
814
+ ),
815
+ );
816
+ }
817
+
818
+ export function retrieveDatapoint2RefusalContentPartFromJSON(
819
+ jsonString: string,
820
+ ): SafeParseResult<RetrieveDatapoint2RefusalContentPart, SDKValidationError> {
821
+ return safeParse(
822
+ jsonString,
823
+ (x) =>
824
+ RetrieveDatapoint2RefusalContentPart$inboundSchema.parse(JSON.parse(x)),
825
+ `Failed to parse 'RetrieveDatapoint2RefusalContentPart' from JSON`,
826
+ );
827
+ }
828
+
829
+ /** @internal */
830
+ export const RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema:
831
+ z.ZodNativeEnum<
832
+ typeof RetrieveDatapoint2DatasetsResponse200ApplicationJSONType
833
+ > = z.nativeEnum(RetrieveDatapoint2DatasetsResponse200ApplicationJSONType);
834
+
835
+ /** @internal */
836
+ export const RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema:
837
+ z.ZodNativeEnum<
838
+ typeof RetrieveDatapoint2DatasetsResponse200ApplicationJSONType
839
+ > = RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema;
840
+
841
+ /**
842
+ * @internal
843
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
844
+ */
845
+ export namespace RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$ {
846
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema` instead. */
847
+ export const inboundSchema =
848
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema;
849
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema` instead. */
850
+ export const outboundSchema =
851
+ RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema;
852
+ }
853
+
854
+ /** @internal */
855
+ export const RetrieveDatapoint2TextContentPart$inboundSchema: z.ZodType<
856
+ RetrieveDatapoint2TextContentPart,
857
+ z.ZodTypeDef,
858
+ unknown
859
+ > = z.object({
860
+ type: RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$inboundSchema,
861
+ text: z.string(),
862
+ });
863
+
864
+ /** @internal */
865
+ export type RetrieveDatapoint2TextContentPart$Outbound = {
866
+ type: string;
867
+ text: string;
868
+ };
869
+
870
+ /** @internal */
871
+ export const RetrieveDatapoint2TextContentPart$outboundSchema: z.ZodType<
872
+ RetrieveDatapoint2TextContentPart$Outbound,
873
+ z.ZodTypeDef,
874
+ RetrieveDatapoint2TextContentPart
875
+ > = z.object({
876
+ type: RetrieveDatapoint2DatasetsResponse200ApplicationJSONType$outboundSchema,
877
+ text: z.string(),
878
+ });
879
+
880
+ /**
881
+ * @internal
882
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
883
+ */
884
+ export namespace RetrieveDatapoint2TextContentPart$ {
885
+ /** @deprecated use `RetrieveDatapoint2TextContentPart$inboundSchema` instead. */
886
+ export const inboundSchema = RetrieveDatapoint2TextContentPart$inboundSchema;
887
+ /** @deprecated use `RetrieveDatapoint2TextContentPart$outboundSchema` instead. */
888
+ export const outboundSchema =
889
+ RetrieveDatapoint2TextContentPart$outboundSchema;
890
+ /** @deprecated use `RetrieveDatapoint2TextContentPart$Outbound` instead. */
891
+ export type Outbound = RetrieveDatapoint2TextContentPart$Outbound;
892
+ }
893
+
894
+ export function retrieveDatapoint2TextContentPartToJSON(
895
+ retrieveDatapoint2TextContentPart: RetrieveDatapoint2TextContentPart,
896
+ ): string {
897
+ return JSON.stringify(
898
+ RetrieveDatapoint2TextContentPart$outboundSchema.parse(
899
+ retrieveDatapoint2TextContentPart,
900
+ ),
901
+ );
902
+ }
903
+
904
+ export function retrieveDatapoint2TextContentPartFromJSON(
905
+ jsonString: string,
906
+ ): SafeParseResult<RetrieveDatapoint2TextContentPart, SDKValidationError> {
907
+ return safeParse(
908
+ jsonString,
909
+ (x) => RetrieveDatapoint2TextContentPart$inboundSchema.parse(JSON.parse(x)),
910
+ `Failed to parse 'RetrieveDatapoint2TextContentPart' from JSON`,
911
+ );
912
+ }
913
+
914
+ /** @internal */
915
+ export const RetrieveDatapointContentDatasets2$inboundSchema: z.ZodType<
916
+ RetrieveDatapointContentDatasets2,
917
+ z.ZodTypeDef,
918
+ unknown
919
+ > = z.union([
920
+ z.lazy(() => RetrieveDatapoint2TextContentPart$inboundSchema),
921
+ z.lazy(() => RetrieveDatapoint2RefusalContentPart$inboundSchema),
922
+ ]);
923
+
924
+ /** @internal */
925
+ export type RetrieveDatapointContentDatasets2$Outbound =
926
+ | RetrieveDatapoint2TextContentPart$Outbound
927
+ | RetrieveDatapoint2RefusalContentPart$Outbound;
928
+
929
+ /** @internal */
930
+ export const RetrieveDatapointContentDatasets2$outboundSchema: z.ZodType<
931
+ RetrieveDatapointContentDatasets2$Outbound,
932
+ z.ZodTypeDef,
933
+ RetrieveDatapointContentDatasets2
934
+ > = z.union([
935
+ z.lazy(() => RetrieveDatapoint2TextContentPart$outboundSchema),
936
+ z.lazy(() => RetrieveDatapoint2RefusalContentPart$outboundSchema),
937
+ ]);
938
+
939
+ /**
940
+ * @internal
941
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
942
+ */
943
+ export namespace RetrieveDatapointContentDatasets2$ {
944
+ /** @deprecated use `RetrieveDatapointContentDatasets2$inboundSchema` instead. */
945
+ export const inboundSchema = RetrieveDatapointContentDatasets2$inboundSchema;
946
+ /** @deprecated use `RetrieveDatapointContentDatasets2$outboundSchema` instead. */
947
+ export const outboundSchema =
948
+ RetrieveDatapointContentDatasets2$outboundSchema;
949
+ /** @deprecated use `RetrieveDatapointContentDatasets2$Outbound` instead. */
950
+ export type Outbound = RetrieveDatapointContentDatasets2$Outbound;
951
+ }
952
+
953
+ export function retrieveDatapointContentDatasets2ToJSON(
954
+ retrieveDatapointContentDatasets2: RetrieveDatapointContentDatasets2,
955
+ ): string {
956
+ return JSON.stringify(
957
+ RetrieveDatapointContentDatasets2$outboundSchema.parse(
958
+ retrieveDatapointContentDatasets2,
959
+ ),
960
+ );
961
+ }
962
+
963
+ export function retrieveDatapointContentDatasets2FromJSON(
964
+ jsonString: string,
965
+ ): SafeParseResult<RetrieveDatapointContentDatasets2, SDKValidationError> {
966
+ return safeParse(
967
+ jsonString,
968
+ (x) => RetrieveDatapointContentDatasets2$inboundSchema.parse(JSON.parse(x)),
969
+ `Failed to parse 'RetrieveDatapointContentDatasets2' from JSON`,
970
+ );
971
+ }
972
+
973
+ /** @internal */
974
+ export const RetrieveDatapointMessagesDatasetsContent$inboundSchema: z.ZodType<
975
+ RetrieveDatapointMessagesDatasetsContent,
976
+ z.ZodTypeDef,
977
+ unknown
978
+ > = z.union([
979
+ z.string(),
980
+ z.array(z.union([
981
+ z.lazy(() => RetrieveDatapoint2TextContentPart$inboundSchema),
982
+ z.lazy(() => RetrieveDatapoint2RefusalContentPart$inboundSchema),
983
+ ])),
984
+ ]);
985
+
986
+ /** @internal */
987
+ export type RetrieveDatapointMessagesDatasetsContent$Outbound =
988
+ | string
989
+ | Array<
990
+ | RetrieveDatapoint2TextContentPart$Outbound
991
+ | RetrieveDatapoint2RefusalContentPart$Outbound
992
+ >;
993
+
994
+ /** @internal */
995
+ export const RetrieveDatapointMessagesDatasetsContent$outboundSchema: z.ZodType<
996
+ RetrieveDatapointMessagesDatasetsContent$Outbound,
997
+ z.ZodTypeDef,
998
+ RetrieveDatapointMessagesDatasetsContent
999
+ > = z.union([
1000
+ z.string(),
1001
+ z.array(z.union([
1002
+ z.lazy(() => RetrieveDatapoint2TextContentPart$outboundSchema),
1003
+ z.lazy(() => RetrieveDatapoint2RefusalContentPart$outboundSchema),
1004
+ ])),
1005
+ ]);
1006
+
1007
+ /**
1008
+ * @internal
1009
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1010
+ */
1011
+ export namespace RetrieveDatapointMessagesDatasetsContent$ {
1012
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsContent$inboundSchema` instead. */
1013
+ export const inboundSchema =
1014
+ RetrieveDatapointMessagesDatasetsContent$inboundSchema;
1015
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsContent$outboundSchema` instead. */
1016
+ export const outboundSchema =
1017
+ RetrieveDatapointMessagesDatasetsContent$outboundSchema;
1018
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsContent$Outbound` instead. */
1019
+ export type Outbound = RetrieveDatapointMessagesDatasetsContent$Outbound;
1020
+ }
1021
+
1022
+ export function retrieveDatapointMessagesDatasetsContentToJSON(
1023
+ retrieveDatapointMessagesDatasetsContent:
1024
+ RetrieveDatapointMessagesDatasetsContent,
1025
+ ): string {
1026
+ return JSON.stringify(
1027
+ RetrieveDatapointMessagesDatasetsContent$outboundSchema.parse(
1028
+ retrieveDatapointMessagesDatasetsContent,
1029
+ ),
1030
+ );
1031
+ }
1032
+
1033
+ export function retrieveDatapointMessagesDatasetsContentFromJSON(
1034
+ jsonString: string,
1035
+ ): SafeParseResult<
1036
+ RetrieveDatapointMessagesDatasetsContent,
1037
+ SDKValidationError
1038
+ > {
1039
+ return safeParse(
1040
+ jsonString,
1041
+ (x) =>
1042
+ RetrieveDatapointMessagesDatasetsContent$inboundSchema.parse(
1043
+ JSON.parse(x),
1044
+ ),
1045
+ `Failed to parse 'RetrieveDatapointMessagesDatasetsContent' from JSON`,
1046
+ );
1047
+ }
1048
+
1049
+ /** @internal */
1050
+ export const RetrieveDatapointMessagesDatasetsResponse200Role$inboundSchema:
1051
+ z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsResponse200Role> = z
1052
+ .nativeEnum(RetrieveDatapointMessagesDatasetsResponse200Role);
1053
+
1054
+ /** @internal */
1055
+ export const RetrieveDatapointMessagesDatasetsResponse200Role$outboundSchema:
1056
+ z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsResponse200Role> =
1057
+ RetrieveDatapointMessagesDatasetsResponse200Role$inboundSchema;
1058
+
1059
+ /**
1060
+ * @internal
1061
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1062
+ */
1063
+ export namespace RetrieveDatapointMessagesDatasetsResponse200Role$ {
1064
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponse200Role$inboundSchema` instead. */
1065
+ export const inboundSchema =
1066
+ RetrieveDatapointMessagesDatasetsResponse200Role$inboundSchema;
1067
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponse200Role$outboundSchema` instead. */
1068
+ export const outboundSchema =
1069
+ RetrieveDatapointMessagesDatasetsResponse200Role$outboundSchema;
1070
+ }
1071
+
1072
+ /** @internal */
1073
+ export const RetrieveDatapointMessagesAudio$inboundSchema: z.ZodType<
1074
+ RetrieveDatapointMessagesAudio,
1075
+ z.ZodTypeDef,
1076
+ unknown
1077
+ > = z.object({
1078
+ id: z.string(),
1079
+ });
1080
+
1081
+ /** @internal */
1082
+ export type RetrieveDatapointMessagesAudio$Outbound = {
1083
+ id: string;
1084
+ };
1085
+
1086
+ /** @internal */
1087
+ export const RetrieveDatapointMessagesAudio$outboundSchema: z.ZodType<
1088
+ RetrieveDatapointMessagesAudio$Outbound,
1089
+ z.ZodTypeDef,
1090
+ RetrieveDatapointMessagesAudio
1091
+ > = z.object({
1092
+ id: z.string(),
1093
+ });
1094
+
1095
+ /**
1096
+ * @internal
1097
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1098
+ */
1099
+ export namespace RetrieveDatapointMessagesAudio$ {
1100
+ /** @deprecated use `RetrieveDatapointMessagesAudio$inboundSchema` instead. */
1101
+ export const inboundSchema = RetrieveDatapointMessagesAudio$inboundSchema;
1102
+ /** @deprecated use `RetrieveDatapointMessagesAudio$outboundSchema` instead. */
1103
+ export const outboundSchema = RetrieveDatapointMessagesAudio$outboundSchema;
1104
+ /** @deprecated use `RetrieveDatapointMessagesAudio$Outbound` instead. */
1105
+ export type Outbound = RetrieveDatapointMessagesAudio$Outbound;
1106
+ }
1107
+
1108
+ export function retrieveDatapointMessagesAudioToJSON(
1109
+ retrieveDatapointMessagesAudio: RetrieveDatapointMessagesAudio,
1110
+ ): string {
1111
+ return JSON.stringify(
1112
+ RetrieveDatapointMessagesAudio$outboundSchema.parse(
1113
+ retrieveDatapointMessagesAudio,
1114
+ ),
1115
+ );
1116
+ }
1117
+
1118
+ export function retrieveDatapointMessagesAudioFromJSON(
1119
+ jsonString: string,
1120
+ ): SafeParseResult<RetrieveDatapointMessagesAudio, SDKValidationError> {
1121
+ return safeParse(
1122
+ jsonString,
1123
+ (x) => RetrieveDatapointMessagesAudio$inboundSchema.parse(JSON.parse(x)),
1124
+ `Failed to parse 'RetrieveDatapointMessagesAudio' from JSON`,
1125
+ );
1126
+ }
1127
+
1128
+ /** @internal */
1129
+ export const RetrieveDatapointMessagesType$inboundSchema: z.ZodNativeEnum<
1130
+ typeof RetrieveDatapointMessagesType
1131
+ > = z.nativeEnum(RetrieveDatapointMessagesType);
1132
+
1133
+ /** @internal */
1134
+ export const RetrieveDatapointMessagesType$outboundSchema: z.ZodNativeEnum<
1135
+ typeof RetrieveDatapointMessagesType
1136
+ > = RetrieveDatapointMessagesType$inboundSchema;
1137
+
1138
+ /**
1139
+ * @internal
1140
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1141
+ */
1142
+ export namespace RetrieveDatapointMessagesType$ {
1143
+ /** @deprecated use `RetrieveDatapointMessagesType$inboundSchema` instead. */
1144
+ export const inboundSchema = RetrieveDatapointMessagesType$inboundSchema;
1145
+ /** @deprecated use `RetrieveDatapointMessagesType$outboundSchema` instead. */
1146
+ export const outboundSchema = RetrieveDatapointMessagesType$outboundSchema;
1147
+ }
1148
+
1149
+ /** @internal */
1150
+ export const RetrieveDatapointMessagesFunction$inboundSchema: z.ZodType<
1151
+ RetrieveDatapointMessagesFunction,
1152
+ z.ZodTypeDef,
1153
+ unknown
1154
+ > = z.object({
1155
+ name: z.string().optional(),
1156
+ arguments: z.string().optional(),
1157
+ });
1158
+
1159
+ /** @internal */
1160
+ export type RetrieveDatapointMessagesFunction$Outbound = {
1161
+ name?: string | undefined;
1162
+ arguments?: string | undefined;
1163
+ };
1164
+
1165
+ /** @internal */
1166
+ export const RetrieveDatapointMessagesFunction$outboundSchema: z.ZodType<
1167
+ RetrieveDatapointMessagesFunction$Outbound,
1168
+ z.ZodTypeDef,
1169
+ RetrieveDatapointMessagesFunction
1170
+ > = z.object({
1171
+ name: z.string().optional(),
1172
+ arguments: z.string().optional(),
1173
+ });
1174
+
1175
+ /**
1176
+ * @internal
1177
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1178
+ */
1179
+ export namespace RetrieveDatapointMessagesFunction$ {
1180
+ /** @deprecated use `RetrieveDatapointMessagesFunction$inboundSchema` instead. */
1181
+ export const inboundSchema = RetrieveDatapointMessagesFunction$inboundSchema;
1182
+ /** @deprecated use `RetrieveDatapointMessagesFunction$outboundSchema` instead. */
1183
+ export const outboundSchema =
1184
+ RetrieveDatapointMessagesFunction$outboundSchema;
1185
+ /** @deprecated use `RetrieveDatapointMessagesFunction$Outbound` instead. */
1186
+ export type Outbound = RetrieveDatapointMessagesFunction$Outbound;
1187
+ }
1188
+
1189
+ export function retrieveDatapointMessagesFunctionToJSON(
1190
+ retrieveDatapointMessagesFunction: RetrieveDatapointMessagesFunction,
1191
+ ): string {
1192
+ return JSON.stringify(
1193
+ RetrieveDatapointMessagesFunction$outboundSchema.parse(
1194
+ retrieveDatapointMessagesFunction,
1195
+ ),
1196
+ );
1197
+ }
1198
+
1199
+ export function retrieveDatapointMessagesFunctionFromJSON(
1200
+ jsonString: string,
1201
+ ): SafeParseResult<RetrieveDatapointMessagesFunction, SDKValidationError> {
1202
+ return safeParse(
1203
+ jsonString,
1204
+ (x) => RetrieveDatapointMessagesFunction$inboundSchema.parse(JSON.parse(x)),
1205
+ `Failed to parse 'RetrieveDatapointMessagesFunction' from JSON`,
1206
+ );
1207
+ }
1208
+
1209
+ /** @internal */
1210
+ export const RetrieveDatapointMessagesToolCalls$inboundSchema: z.ZodType<
1211
+ RetrieveDatapointMessagesToolCalls,
1212
+ z.ZodTypeDef,
1213
+ unknown
1214
+ > = z.object({
1215
+ id: z.string(),
1216
+ type: RetrieveDatapointMessagesType$inboundSchema,
1217
+ function: z.lazy(() => RetrieveDatapointMessagesFunction$inboundSchema),
1218
+ });
1219
+
1220
+ /** @internal */
1221
+ export type RetrieveDatapointMessagesToolCalls$Outbound = {
1222
+ id: string;
1223
+ type: string;
1224
+ function: RetrieveDatapointMessagesFunction$Outbound;
1225
+ };
1226
+
1227
+ /** @internal */
1228
+ export const RetrieveDatapointMessagesToolCalls$outboundSchema: z.ZodType<
1229
+ RetrieveDatapointMessagesToolCalls$Outbound,
1230
+ z.ZodTypeDef,
1231
+ RetrieveDatapointMessagesToolCalls
1232
+ > = z.object({
1233
+ id: z.string(),
1234
+ type: RetrieveDatapointMessagesType$outboundSchema,
1235
+ function: z.lazy(() => RetrieveDatapointMessagesFunction$outboundSchema),
1236
+ });
1237
+
1238
+ /**
1239
+ * @internal
1240
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1241
+ */
1242
+ export namespace RetrieveDatapointMessagesToolCalls$ {
1243
+ /** @deprecated use `RetrieveDatapointMessagesToolCalls$inboundSchema` instead. */
1244
+ export const inboundSchema = RetrieveDatapointMessagesToolCalls$inboundSchema;
1245
+ /** @deprecated use `RetrieveDatapointMessagesToolCalls$outboundSchema` instead. */
1246
+ export const outboundSchema =
1247
+ RetrieveDatapointMessagesToolCalls$outboundSchema;
1248
+ /** @deprecated use `RetrieveDatapointMessagesToolCalls$Outbound` instead. */
1249
+ export type Outbound = RetrieveDatapointMessagesToolCalls$Outbound;
1250
+ }
1251
+
1252
+ export function retrieveDatapointMessagesToolCallsToJSON(
1253
+ retrieveDatapointMessagesToolCalls: RetrieveDatapointMessagesToolCalls,
1254
+ ): string {
1255
+ return JSON.stringify(
1256
+ RetrieveDatapointMessagesToolCalls$outboundSchema.parse(
1257
+ retrieveDatapointMessagesToolCalls,
1258
+ ),
1259
+ );
1260
+ }
1261
+
1262
+ export function retrieveDatapointMessagesToolCallsFromJSON(
1263
+ jsonString: string,
1264
+ ): SafeParseResult<RetrieveDatapointMessagesToolCalls, SDKValidationError> {
1265
+ return safeParse(
1266
+ jsonString,
1267
+ (x) =>
1268
+ RetrieveDatapointMessagesToolCalls$inboundSchema.parse(JSON.parse(x)),
1269
+ `Failed to parse 'RetrieveDatapointMessagesToolCalls' from JSON`,
1270
+ );
1271
+ }
1272
+
1273
+ /** @internal */
1274
+ export const RetrieveDatapointMessagesAssistantMessage$inboundSchema: z.ZodType<
1275
+ RetrieveDatapointMessagesAssistantMessage,
1276
+ z.ZodTypeDef,
1277
+ unknown
1278
+ > = z.object({
1279
+ content: z.nullable(
1280
+ z.union([
1281
+ z.string(),
1282
+ z.array(
1283
+ z.union([
1284
+ z.lazy(() => RetrieveDatapoint2TextContentPart$inboundSchema),
1285
+ z.lazy(() => RetrieveDatapoint2RefusalContentPart$inboundSchema),
1286
+ ]),
1287
+ ),
1288
+ ]),
1289
+ ).optional(),
1290
+ refusal: z.nullable(z.string()).optional(),
1291
+ role: RetrieveDatapointMessagesDatasetsResponse200Role$inboundSchema,
1292
+ name: z.string().optional(),
1293
+ audio: z.nullable(z.lazy(() => RetrieveDatapointMessagesAudio$inboundSchema))
1294
+ .optional(),
1295
+ tool_calls: z.array(
1296
+ z.lazy(() => RetrieveDatapointMessagesToolCalls$inboundSchema),
1297
+ ).optional(),
1298
+ reasoning: z.string().optional(),
1299
+ reasoning_signature: z.string().optional(),
1300
+ redacted_reasoning: z.string().optional(),
1301
+ }).transform((v) => {
1302
+ return remap$(v, {
1303
+ "tool_calls": "toolCalls",
1304
+ "reasoning_signature": "reasoningSignature",
1305
+ "redacted_reasoning": "redactedReasoning",
1306
+ });
1307
+ });
1308
+
1309
+ /** @internal */
1310
+ export type RetrieveDatapointMessagesAssistantMessage$Outbound = {
1311
+ content?:
1312
+ | string
1313
+ | Array<
1314
+ | RetrieveDatapoint2TextContentPart$Outbound
1315
+ | RetrieveDatapoint2RefusalContentPart$Outbound
1316
+ >
1317
+ | null
1318
+ | undefined;
1319
+ refusal?: string | null | undefined;
1320
+ role: string;
1321
+ name?: string | undefined;
1322
+ audio?: RetrieveDatapointMessagesAudio$Outbound | null | undefined;
1323
+ tool_calls?: Array<RetrieveDatapointMessagesToolCalls$Outbound> | undefined;
1324
+ reasoning?: string | undefined;
1325
+ reasoning_signature?: string | undefined;
1326
+ redacted_reasoning?: string | undefined;
1327
+ };
1328
+
1329
+ /** @internal */
1330
+ export const RetrieveDatapointMessagesAssistantMessage$outboundSchema:
1331
+ z.ZodType<
1332
+ RetrieveDatapointMessagesAssistantMessage$Outbound,
1333
+ z.ZodTypeDef,
1334
+ RetrieveDatapointMessagesAssistantMessage
1335
+ > = z.object({
1336
+ content: z.nullable(
1337
+ z.union([
1338
+ z.string(),
1339
+ z.array(
1340
+ z.union([
1341
+ z.lazy(() => RetrieveDatapoint2TextContentPart$outboundSchema),
1342
+ z.lazy(() => RetrieveDatapoint2RefusalContentPart$outboundSchema),
1343
+ ]),
1344
+ ),
1345
+ ]),
1346
+ ).optional(),
1347
+ refusal: z.nullable(z.string()).optional(),
1348
+ role: RetrieveDatapointMessagesDatasetsResponse200Role$outboundSchema,
1349
+ name: z.string().optional(),
1350
+ audio: z.nullable(
1351
+ z.lazy(() => RetrieveDatapointMessagesAudio$outboundSchema),
1352
+ ).optional(),
1353
+ toolCalls: z.array(
1354
+ z.lazy(() => RetrieveDatapointMessagesToolCalls$outboundSchema),
1355
+ ).optional(),
1356
+ reasoning: z.string().optional(),
1357
+ reasoningSignature: z.string().optional(),
1358
+ redactedReasoning: z.string().optional(),
1359
+ }).transform((v) => {
1360
+ return remap$(v, {
1361
+ toolCalls: "tool_calls",
1362
+ reasoningSignature: "reasoning_signature",
1363
+ redactedReasoning: "redacted_reasoning",
1364
+ });
1365
+ });
1366
+
1367
+ /**
1368
+ * @internal
1369
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1370
+ */
1371
+ export namespace RetrieveDatapointMessagesAssistantMessage$ {
1372
+ /** @deprecated use `RetrieveDatapointMessagesAssistantMessage$inboundSchema` instead. */
1373
+ export const inboundSchema =
1374
+ RetrieveDatapointMessagesAssistantMessage$inboundSchema;
1375
+ /** @deprecated use `RetrieveDatapointMessagesAssistantMessage$outboundSchema` instead. */
1376
+ export const outboundSchema =
1377
+ RetrieveDatapointMessagesAssistantMessage$outboundSchema;
1378
+ /** @deprecated use `RetrieveDatapointMessagesAssistantMessage$Outbound` instead. */
1379
+ export type Outbound = RetrieveDatapointMessagesAssistantMessage$Outbound;
1380
+ }
1381
+
1382
+ export function retrieveDatapointMessagesAssistantMessageToJSON(
1383
+ retrieveDatapointMessagesAssistantMessage:
1384
+ RetrieveDatapointMessagesAssistantMessage,
1385
+ ): string {
1386
+ return JSON.stringify(
1387
+ RetrieveDatapointMessagesAssistantMessage$outboundSchema.parse(
1388
+ retrieveDatapointMessagesAssistantMessage,
1389
+ ),
1390
+ );
1391
+ }
1392
+
1393
+ export function retrieveDatapointMessagesAssistantMessageFromJSON(
1394
+ jsonString: string,
1395
+ ): SafeParseResult<
1396
+ RetrieveDatapointMessagesAssistantMessage,
1397
+ SDKValidationError
1398
+ > {
1399
+ return safeParse(
1400
+ jsonString,
1401
+ (x) =>
1402
+ RetrieveDatapointMessagesAssistantMessage$inboundSchema.parse(
1403
+ JSON.parse(x),
1404
+ ),
1405
+ `Failed to parse 'RetrieveDatapointMessagesAssistantMessage' from JSON`,
1406
+ );
1407
+ }
1408
+
1409
+ /** @internal */
1410
+ export const RetrieveDatapointMessagesDatasetsResponseRole$inboundSchema:
1411
+ z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsResponseRole> = z
1412
+ .nativeEnum(RetrieveDatapointMessagesDatasetsResponseRole);
1413
+
1414
+ /** @internal */
1415
+ export const RetrieveDatapointMessagesDatasetsResponseRole$outboundSchema:
1416
+ z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsResponseRole> =
1417
+ RetrieveDatapointMessagesDatasetsResponseRole$inboundSchema;
1418
+
1419
+ /**
1420
+ * @internal
1421
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1422
+ */
1423
+ export namespace RetrieveDatapointMessagesDatasetsResponseRole$ {
1424
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponseRole$inboundSchema` instead. */
1425
+ export const inboundSchema =
1426
+ RetrieveDatapointMessagesDatasetsResponseRole$inboundSchema;
1427
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsResponseRole$outboundSchema` instead. */
1428
+ export const outboundSchema =
1429
+ RetrieveDatapointMessagesDatasetsResponseRole$outboundSchema;
1430
+ }
1431
+
1432
+ /** @internal */
1433
+ export const RetrieveDatapoint2DatasetsResponse200Type$inboundSchema:
1434
+ z.ZodNativeEnum<typeof RetrieveDatapoint2DatasetsResponse200Type> = z
1435
+ .nativeEnum(RetrieveDatapoint2DatasetsResponse200Type);
1436
+
1437
+ /** @internal */
1438
+ export const RetrieveDatapoint2DatasetsResponse200Type$outboundSchema:
1439
+ z.ZodNativeEnum<typeof RetrieveDatapoint2DatasetsResponse200Type> =
1440
+ RetrieveDatapoint2DatasetsResponse200Type$inboundSchema;
1441
+
1442
+ /**
1443
+ * @internal
1444
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1445
+ */
1446
+ export namespace RetrieveDatapoint2DatasetsResponse200Type$ {
1447
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponse200Type$inboundSchema` instead. */
1448
+ export const inboundSchema =
1449
+ RetrieveDatapoint2DatasetsResponse200Type$inboundSchema;
1450
+ /** @deprecated use `RetrieveDatapoint2DatasetsResponse200Type$outboundSchema` instead. */
1451
+ export const outboundSchema =
1452
+ RetrieveDatapoint2DatasetsResponse200Type$outboundSchema;
1453
+ }
1454
+
1455
+ /** @internal */
1456
+ export const RetrieveDatapoint2File$inboundSchema: z.ZodType<
1457
+ RetrieveDatapoint2File,
1458
+ z.ZodTypeDef,
1459
+ unknown
1460
+ > = z.object({
1461
+ file_data: z.string(),
1462
+ filename: z.string().optional(),
1463
+ }).transform((v) => {
1464
+ return remap$(v, {
1465
+ "file_data": "fileData",
1466
+ });
1467
+ });
1468
+
1469
+ /** @internal */
1470
+ export type RetrieveDatapoint2File$Outbound = {
1471
+ file_data: string;
1472
+ filename?: string | undefined;
1473
+ };
1474
+
1475
+ /** @internal */
1476
+ export const RetrieveDatapoint2File$outboundSchema: z.ZodType<
1477
+ RetrieveDatapoint2File$Outbound,
1478
+ z.ZodTypeDef,
1479
+ RetrieveDatapoint2File
1480
+ > = z.object({
1481
+ fileData: z.string(),
1482
+ filename: z.string().optional(),
229
1483
  }).transform((v) => {
230
1484
  return remap$(v, {
231
- datasetId: "dataset_id",
232
- datapointId: "datapoint_id",
1485
+ fileData: "file_data",
233
1486
  });
234
1487
  });
235
1488
 
@@ -237,52 +1490,88 @@ export const RetrieveDatapointRequest$outboundSchema: z.ZodType<
237
1490
  * @internal
238
1491
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
239
1492
  */
240
- export namespace RetrieveDatapointRequest$ {
241
- /** @deprecated use `RetrieveDatapointRequest$inboundSchema` instead. */
242
- export const inboundSchema = RetrieveDatapointRequest$inboundSchema;
243
- /** @deprecated use `RetrieveDatapointRequest$outboundSchema` instead. */
244
- export const outboundSchema = RetrieveDatapointRequest$outboundSchema;
245
- /** @deprecated use `RetrieveDatapointRequest$Outbound` instead. */
246
- export type Outbound = RetrieveDatapointRequest$Outbound;
1493
+ export namespace RetrieveDatapoint2File$ {
1494
+ /** @deprecated use `RetrieveDatapoint2File$inboundSchema` instead. */
1495
+ export const inboundSchema = RetrieveDatapoint2File$inboundSchema;
1496
+ /** @deprecated use `RetrieveDatapoint2File$outboundSchema` instead. */
1497
+ export const outboundSchema = RetrieveDatapoint2File$outboundSchema;
1498
+ /** @deprecated use `RetrieveDatapoint2File$Outbound` instead. */
1499
+ export type Outbound = RetrieveDatapoint2File$Outbound;
247
1500
  }
248
1501
 
249
- export function retrieveDatapointRequestToJSON(
250
- retrieveDatapointRequest: RetrieveDatapointRequest,
1502
+ export function retrieveDatapoint2FileToJSON(
1503
+ retrieveDatapoint2File: RetrieveDatapoint2File,
251
1504
  ): string {
252
1505
  return JSON.stringify(
253
- RetrieveDatapointRequest$outboundSchema.parse(retrieveDatapointRequest),
1506
+ RetrieveDatapoint2File$outboundSchema.parse(retrieveDatapoint2File),
254
1507
  );
255
1508
  }
256
1509
 
257
- export function retrieveDatapointRequestFromJSON(
1510
+ export function retrieveDatapoint2FileFromJSON(
258
1511
  jsonString: string,
259
- ): SafeParseResult<RetrieveDatapointRequest, SDKValidationError> {
1512
+ ): SafeParseResult<RetrieveDatapoint2File, SDKValidationError> {
260
1513
  return safeParse(
261
1514
  jsonString,
262
- (x) => RetrieveDatapointRequest$inboundSchema.parse(JSON.parse(x)),
263
- `Failed to parse 'RetrieveDatapointRequest' from JSON`,
1515
+ (x) => RetrieveDatapoint2File$inboundSchema.parse(JSON.parse(x)),
1516
+ `Failed to parse 'RetrieveDatapoint2File' from JSON`,
264
1517
  );
265
1518
  }
266
1519
 
267
1520
  /** @internal */
268
- export const RetrieveDatapointRole$inboundSchema: z.ZodNativeEnum<
269
- typeof RetrieveDatapointRole
270
- > = z.nativeEnum(RetrieveDatapointRole);
1521
+ export const RetrieveDatapoint24$inboundSchema: z.ZodType<
1522
+ RetrieveDatapoint24,
1523
+ z.ZodTypeDef,
1524
+ unknown
1525
+ > = z.object({
1526
+ type: RetrieveDatapoint2DatasetsResponse200Type$inboundSchema,
1527
+ file: z.lazy(() => RetrieveDatapoint2File$inboundSchema),
1528
+ });
1529
+
1530
+ /** @internal */
1531
+ export type RetrieveDatapoint24$Outbound = {
1532
+ type: string;
1533
+ file: RetrieveDatapoint2File$Outbound;
1534
+ };
271
1535
 
272
1536
  /** @internal */
273
- export const RetrieveDatapointRole$outboundSchema: z.ZodNativeEnum<
274
- typeof RetrieveDatapointRole
275
- > = RetrieveDatapointRole$inboundSchema;
1537
+ export const RetrieveDatapoint24$outboundSchema: z.ZodType<
1538
+ RetrieveDatapoint24$Outbound,
1539
+ z.ZodTypeDef,
1540
+ RetrieveDatapoint24
1541
+ > = z.object({
1542
+ type: RetrieveDatapoint2DatasetsResponse200Type$outboundSchema,
1543
+ file: z.lazy(() => RetrieveDatapoint2File$outboundSchema),
1544
+ });
276
1545
 
277
1546
  /**
278
1547
  * @internal
279
1548
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
280
1549
  */
281
- export namespace RetrieveDatapointRole$ {
282
- /** @deprecated use `RetrieveDatapointRole$inboundSchema` instead. */
283
- export const inboundSchema = RetrieveDatapointRole$inboundSchema;
284
- /** @deprecated use `RetrieveDatapointRole$outboundSchema` instead. */
285
- export const outboundSchema = RetrieveDatapointRole$outboundSchema;
1550
+ export namespace RetrieveDatapoint24$ {
1551
+ /** @deprecated use `RetrieveDatapoint24$inboundSchema` instead. */
1552
+ export const inboundSchema = RetrieveDatapoint24$inboundSchema;
1553
+ /** @deprecated use `RetrieveDatapoint24$outboundSchema` instead. */
1554
+ export const outboundSchema = RetrieveDatapoint24$outboundSchema;
1555
+ /** @deprecated use `RetrieveDatapoint24$Outbound` instead. */
1556
+ export type Outbound = RetrieveDatapoint24$Outbound;
1557
+ }
1558
+
1559
+ export function retrieveDatapoint24ToJSON(
1560
+ retrieveDatapoint24: RetrieveDatapoint24,
1561
+ ): string {
1562
+ return JSON.stringify(
1563
+ RetrieveDatapoint24$outboundSchema.parse(retrieveDatapoint24),
1564
+ );
1565
+ }
1566
+
1567
+ export function retrieveDatapoint24FromJSON(
1568
+ jsonString: string,
1569
+ ): SafeParseResult<RetrieveDatapoint24, SDKValidationError> {
1570
+ return safeParse(
1571
+ jsonString,
1572
+ (x) => RetrieveDatapoint24$inboundSchema.parse(JSON.parse(x)),
1573
+ `Failed to parse 'RetrieveDatapoint24' from JSON`,
1574
+ );
286
1575
  }
287
1576
 
288
1577
  /** @internal */
@@ -310,67 +1599,82 @@ export namespace RetrieveDatapoint2DatasetsResponseType$ {
310
1599
  }
311
1600
 
312
1601
  /** @internal */
313
- export const RetrieveDatapoint2File$inboundSchema: z.ZodType<
314
- RetrieveDatapoint2File,
1602
+ export const RetrieveDatapoint2Format$inboundSchema: z.ZodNativeEnum<
1603
+ typeof RetrieveDatapoint2Format
1604
+ > = z.nativeEnum(RetrieveDatapoint2Format);
1605
+
1606
+ /** @internal */
1607
+ export const RetrieveDatapoint2Format$outboundSchema: z.ZodNativeEnum<
1608
+ typeof RetrieveDatapoint2Format
1609
+ > = RetrieveDatapoint2Format$inboundSchema;
1610
+
1611
+ /**
1612
+ * @internal
1613
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1614
+ */
1615
+ export namespace RetrieveDatapoint2Format$ {
1616
+ /** @deprecated use `RetrieveDatapoint2Format$inboundSchema` instead. */
1617
+ export const inboundSchema = RetrieveDatapoint2Format$inboundSchema;
1618
+ /** @deprecated use `RetrieveDatapoint2Format$outboundSchema` instead. */
1619
+ export const outboundSchema = RetrieveDatapoint2Format$outboundSchema;
1620
+ }
1621
+
1622
+ /** @internal */
1623
+ export const RetrieveDatapoint2InputAudio$inboundSchema: z.ZodType<
1624
+ RetrieveDatapoint2InputAudio,
315
1625
  z.ZodTypeDef,
316
1626
  unknown
317
1627
  > = z.object({
318
- file_data: z.string(),
319
- filename: z.string().optional(),
320
- }).transform((v) => {
321
- return remap$(v, {
322
- "file_data": "fileData",
323
- });
1628
+ data: z.string(),
1629
+ format: RetrieveDatapoint2Format$inboundSchema,
324
1630
  });
325
1631
 
326
1632
  /** @internal */
327
- export type RetrieveDatapoint2File$Outbound = {
328
- file_data: string;
329
- filename?: string | undefined;
1633
+ export type RetrieveDatapoint2InputAudio$Outbound = {
1634
+ data: string;
1635
+ format: string;
330
1636
  };
331
1637
 
332
1638
  /** @internal */
333
- export const RetrieveDatapoint2File$outboundSchema: z.ZodType<
334
- RetrieveDatapoint2File$Outbound,
1639
+ export const RetrieveDatapoint2InputAudio$outboundSchema: z.ZodType<
1640
+ RetrieveDatapoint2InputAudio$Outbound,
335
1641
  z.ZodTypeDef,
336
- RetrieveDatapoint2File
1642
+ RetrieveDatapoint2InputAudio
337
1643
  > = z.object({
338
- fileData: z.string(),
339
- filename: z.string().optional(),
340
- }).transform((v) => {
341
- return remap$(v, {
342
- fileData: "file_data",
343
- });
1644
+ data: z.string(),
1645
+ format: RetrieveDatapoint2Format$outboundSchema,
344
1646
  });
345
1647
 
346
1648
  /**
347
1649
  * @internal
348
1650
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
349
1651
  */
350
- export namespace RetrieveDatapoint2File$ {
351
- /** @deprecated use `RetrieveDatapoint2File$inboundSchema` instead. */
352
- export const inboundSchema = RetrieveDatapoint2File$inboundSchema;
353
- /** @deprecated use `RetrieveDatapoint2File$outboundSchema` instead. */
354
- export const outboundSchema = RetrieveDatapoint2File$outboundSchema;
355
- /** @deprecated use `RetrieveDatapoint2File$Outbound` instead. */
356
- export type Outbound = RetrieveDatapoint2File$Outbound;
1652
+ export namespace RetrieveDatapoint2InputAudio$ {
1653
+ /** @deprecated use `RetrieveDatapoint2InputAudio$inboundSchema` instead. */
1654
+ export const inboundSchema = RetrieveDatapoint2InputAudio$inboundSchema;
1655
+ /** @deprecated use `RetrieveDatapoint2InputAudio$outboundSchema` instead. */
1656
+ export const outboundSchema = RetrieveDatapoint2InputAudio$outboundSchema;
1657
+ /** @deprecated use `RetrieveDatapoint2InputAudio$Outbound` instead. */
1658
+ export type Outbound = RetrieveDatapoint2InputAudio$Outbound;
357
1659
  }
358
1660
 
359
- export function retrieveDatapoint2FileToJSON(
360
- retrieveDatapoint2File: RetrieveDatapoint2File,
1661
+ export function retrieveDatapoint2InputAudioToJSON(
1662
+ retrieveDatapoint2InputAudio: RetrieveDatapoint2InputAudio,
361
1663
  ): string {
362
1664
  return JSON.stringify(
363
- RetrieveDatapoint2File$outboundSchema.parse(retrieveDatapoint2File),
1665
+ RetrieveDatapoint2InputAudio$outboundSchema.parse(
1666
+ retrieveDatapoint2InputAudio,
1667
+ ),
364
1668
  );
365
1669
  }
366
1670
 
367
- export function retrieveDatapoint2FileFromJSON(
1671
+ export function retrieveDatapoint2InputAudioFromJSON(
368
1672
  jsonString: string,
369
- ): SafeParseResult<RetrieveDatapoint2File, SDKValidationError> {
1673
+ ): SafeParseResult<RetrieveDatapoint2InputAudio, SDKValidationError> {
370
1674
  return safeParse(
371
1675
  jsonString,
372
- (x) => RetrieveDatapoint2File$inboundSchema.parse(JSON.parse(x)),
373
- `Failed to parse 'RetrieveDatapoint2File' from JSON`,
1676
+ (x) => RetrieveDatapoint2InputAudio$inboundSchema.parse(JSON.parse(x)),
1677
+ `Failed to parse 'RetrieveDatapoint2InputAudio' from JSON`,
374
1678
  );
375
1679
  }
376
1680
 
@@ -381,13 +1685,17 @@ export const RetrieveDatapoint23$inboundSchema: z.ZodType<
381
1685
  unknown
382
1686
  > = z.object({
383
1687
  type: RetrieveDatapoint2DatasetsResponseType$inboundSchema,
384
- file: z.lazy(() => RetrieveDatapoint2File$inboundSchema),
1688
+ input_audio: z.lazy(() => RetrieveDatapoint2InputAudio$inboundSchema),
1689
+ }).transform((v) => {
1690
+ return remap$(v, {
1691
+ "input_audio": "inputAudio",
1692
+ });
385
1693
  });
386
1694
 
387
1695
  /** @internal */
388
1696
  export type RetrieveDatapoint23$Outbound = {
389
1697
  type: string;
390
- file: RetrieveDatapoint2File$Outbound;
1698
+ input_audio: RetrieveDatapoint2InputAudio$Outbound;
391
1699
  };
392
1700
 
393
1701
  /** @internal */
@@ -397,7 +1705,11 @@ export const RetrieveDatapoint23$outboundSchema: z.ZodType<
397
1705
  RetrieveDatapoint23
398
1706
  > = z.object({
399
1707
  type: RetrieveDatapoint2DatasetsResponseType$outboundSchema,
400
- file: z.lazy(() => RetrieveDatapoint2File$outboundSchema),
1708
+ inputAudio: z.lazy(() => RetrieveDatapoint2InputAudio$outboundSchema),
1709
+ }).transform((v) => {
1710
+ return remap$(v, {
1711
+ inputAudio: "input_audio",
1712
+ });
401
1713
  });
402
1714
 
403
1715
  /**
@@ -452,20 +1764,39 @@ export namespace RetrieveDatapoint2DatasetsType$ {
452
1764
  export const outboundSchema = RetrieveDatapoint2DatasetsType$outboundSchema;
453
1765
  }
454
1766
 
1767
+ /** @internal */
1768
+ export const RetrieveDatapoint2Detail$inboundSchema: z.ZodNativeEnum<
1769
+ typeof RetrieveDatapoint2Detail
1770
+ > = z.nativeEnum(RetrieveDatapoint2Detail);
1771
+
1772
+ /** @internal */
1773
+ export const RetrieveDatapoint2Detail$outboundSchema: z.ZodNativeEnum<
1774
+ typeof RetrieveDatapoint2Detail
1775
+ > = RetrieveDatapoint2Detail$inboundSchema;
1776
+
1777
+ /**
1778
+ * @internal
1779
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1780
+ */
1781
+ export namespace RetrieveDatapoint2Detail$ {
1782
+ /** @deprecated use `RetrieveDatapoint2Detail$inboundSchema` instead. */
1783
+ export const inboundSchema = RetrieveDatapoint2Detail$inboundSchema;
1784
+ /** @deprecated use `RetrieveDatapoint2Detail$outboundSchema` instead. */
1785
+ export const outboundSchema = RetrieveDatapoint2Detail$outboundSchema;
1786
+ }
1787
+
455
1788
  /** @internal */
456
1789
  export const RetrieveDatapoint2ImageUrl$inboundSchema: z.ZodType<
457
1790
  RetrieveDatapoint2ImageUrl,
458
1791
  z.ZodTypeDef,
459
1792
  unknown
460
1793
  > = z.object({
461
- id: z.string().optional(),
462
1794
  url: z.string(),
463
- detail: z.string().optional(),
1795
+ detail: RetrieveDatapoint2Detail$inboundSchema.optional(),
464
1796
  });
465
1797
 
466
1798
  /** @internal */
467
1799
  export type RetrieveDatapoint2ImageUrl$Outbound = {
468
- id?: string | undefined;
469
1800
  url: string;
470
1801
  detail?: string | undefined;
471
1802
  };
@@ -476,9 +1807,8 @@ export const RetrieveDatapoint2ImageUrl$outboundSchema: z.ZodType<
476
1807
  z.ZodTypeDef,
477
1808
  RetrieveDatapoint2ImageUrl
478
1809
  > = z.object({
479
- id: z.string().optional(),
480
1810
  url: z.string(),
481
- detail: z.string().optional(),
1811
+ detail: RetrieveDatapoint2Detail$outboundSchema.optional(),
482
1812
  });
483
1813
 
484
1814
  /**
@@ -664,13 +1994,15 @@ export const RetrieveDatapointContent2$inboundSchema: z.ZodType<
664
1994
  z.lazy(() => RetrieveDatapoint21$inboundSchema),
665
1995
  z.lazy(() => RetrieveDatapoint22$inboundSchema),
666
1996
  z.lazy(() => RetrieveDatapoint23$inboundSchema),
1997
+ z.lazy(() => RetrieveDatapoint24$inboundSchema),
667
1998
  ]);
668
1999
 
669
2000
  /** @internal */
670
2001
  export type RetrieveDatapointContent2$Outbound =
671
2002
  | RetrieveDatapoint21$Outbound
672
2003
  | RetrieveDatapoint22$Outbound
673
- | RetrieveDatapoint23$Outbound;
2004
+ | RetrieveDatapoint23$Outbound
2005
+ | RetrieveDatapoint24$Outbound;
674
2006
 
675
2007
  /** @internal */
676
2008
  export const RetrieveDatapointContent2$outboundSchema: z.ZodType<
@@ -681,6 +2013,7 @@ export const RetrieveDatapointContent2$outboundSchema: z.ZodType<
681
2013
  z.lazy(() => RetrieveDatapoint21$outboundSchema),
682
2014
  z.lazy(() => RetrieveDatapoint22$outboundSchema),
683
2015
  z.lazy(() => RetrieveDatapoint23$outboundSchema),
2016
+ z.lazy(() => RetrieveDatapoint24$outboundSchema),
684
2017
  ]);
685
2018
 
686
2019
  /**
@@ -715,8 +2048,8 @@ export function retrieveDatapointContent2FromJSON(
715
2048
  }
716
2049
 
717
2050
  /** @internal */
718
- export const RetrieveDatapointContent$inboundSchema: z.ZodType<
719
- RetrieveDatapointContent,
2051
+ export const RetrieveDatapointMessagesContent$inboundSchema: z.ZodType<
2052
+ RetrieveDatapointMessagesContent,
720
2053
  z.ZodTypeDef,
721
2054
  unknown
722
2055
  > = z.union([
@@ -725,29 +2058,32 @@ export const RetrieveDatapointContent$inboundSchema: z.ZodType<
725
2058
  z.lazy(() => RetrieveDatapoint21$inboundSchema),
726
2059
  z.lazy(() => RetrieveDatapoint22$inboundSchema),
727
2060
  z.lazy(() => RetrieveDatapoint23$inboundSchema),
2061
+ z.lazy(() => RetrieveDatapoint24$inboundSchema),
728
2062
  ])),
729
2063
  ]);
730
2064
 
731
2065
  /** @internal */
732
- export type RetrieveDatapointContent$Outbound =
2066
+ export type RetrieveDatapointMessagesContent$Outbound =
733
2067
  | string
734
2068
  | Array<
735
2069
  | RetrieveDatapoint21$Outbound
736
2070
  | RetrieveDatapoint22$Outbound
737
2071
  | RetrieveDatapoint23$Outbound
2072
+ | RetrieveDatapoint24$Outbound
738
2073
  >;
739
2074
 
740
2075
  /** @internal */
741
- export const RetrieveDatapointContent$outboundSchema: z.ZodType<
742
- RetrieveDatapointContent$Outbound,
2076
+ export const RetrieveDatapointMessagesContent$outboundSchema: z.ZodType<
2077
+ RetrieveDatapointMessagesContent$Outbound,
743
2078
  z.ZodTypeDef,
744
- RetrieveDatapointContent
2079
+ RetrieveDatapointMessagesContent
745
2080
  > = z.union([
746
2081
  z.string(),
747
2082
  z.array(z.union([
748
2083
  z.lazy(() => RetrieveDatapoint21$outboundSchema),
749
2084
  z.lazy(() => RetrieveDatapoint22$outboundSchema),
750
2085
  z.lazy(() => RetrieveDatapoint23$outboundSchema),
2086
+ z.lazy(() => RetrieveDatapoint24$outboundSchema),
751
2087
  ])),
752
2088
  ]);
753
2089
 
@@ -755,171 +2091,303 @@ export const RetrieveDatapointContent$outboundSchema: z.ZodType<
755
2091
  * @internal
756
2092
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
757
2093
  */
758
- export namespace RetrieveDatapointContent$ {
759
- /** @deprecated use `RetrieveDatapointContent$inboundSchema` instead. */
760
- export const inboundSchema = RetrieveDatapointContent$inboundSchema;
761
- /** @deprecated use `RetrieveDatapointContent$outboundSchema` instead. */
762
- export const outboundSchema = RetrieveDatapointContent$outboundSchema;
763
- /** @deprecated use `RetrieveDatapointContent$Outbound` instead. */
764
- export type Outbound = RetrieveDatapointContent$Outbound;
2094
+ export namespace RetrieveDatapointMessagesContent$ {
2095
+ /** @deprecated use `RetrieveDatapointMessagesContent$inboundSchema` instead. */
2096
+ export const inboundSchema = RetrieveDatapointMessagesContent$inboundSchema;
2097
+ /** @deprecated use `RetrieveDatapointMessagesContent$outboundSchema` instead. */
2098
+ export const outboundSchema = RetrieveDatapointMessagesContent$outboundSchema;
2099
+ /** @deprecated use `RetrieveDatapointMessagesContent$Outbound` instead. */
2100
+ export type Outbound = RetrieveDatapointMessagesContent$Outbound;
2101
+ }
2102
+
2103
+ export function retrieveDatapointMessagesContentToJSON(
2104
+ retrieveDatapointMessagesContent: RetrieveDatapointMessagesContent,
2105
+ ): string {
2106
+ return JSON.stringify(
2107
+ RetrieveDatapointMessagesContent$outboundSchema.parse(
2108
+ retrieveDatapointMessagesContent,
2109
+ ),
2110
+ );
2111
+ }
2112
+
2113
+ export function retrieveDatapointMessagesContentFromJSON(
2114
+ jsonString: string,
2115
+ ): SafeParseResult<RetrieveDatapointMessagesContent, SDKValidationError> {
2116
+ return safeParse(
2117
+ jsonString,
2118
+ (x) => RetrieveDatapointMessagesContent$inboundSchema.parse(JSON.parse(x)),
2119
+ `Failed to parse 'RetrieveDatapointMessagesContent' from JSON`,
2120
+ );
2121
+ }
2122
+
2123
+ /** @internal */
2124
+ export const RetrieveDatapointMessagesUserMessage$inboundSchema: z.ZodType<
2125
+ RetrieveDatapointMessagesUserMessage,
2126
+ z.ZodTypeDef,
2127
+ unknown
2128
+ > = z.object({
2129
+ role: RetrieveDatapointMessagesDatasetsResponseRole$inboundSchema,
2130
+ name: z.string().optional(),
2131
+ content: z.union([
2132
+ z.string(),
2133
+ z.array(z.union([
2134
+ z.lazy(() => RetrieveDatapoint21$inboundSchema),
2135
+ z.lazy(() => RetrieveDatapoint22$inboundSchema),
2136
+ z.lazy(() => RetrieveDatapoint23$inboundSchema),
2137
+ z.lazy(() => RetrieveDatapoint24$inboundSchema),
2138
+ ])),
2139
+ ]),
2140
+ });
2141
+
2142
+ /** @internal */
2143
+ export type RetrieveDatapointMessagesUserMessage$Outbound = {
2144
+ role: string;
2145
+ name?: string | undefined;
2146
+ content:
2147
+ | string
2148
+ | Array<
2149
+ | RetrieveDatapoint21$Outbound
2150
+ | RetrieveDatapoint22$Outbound
2151
+ | RetrieveDatapoint23$Outbound
2152
+ | RetrieveDatapoint24$Outbound
2153
+ >;
2154
+ };
2155
+
2156
+ /** @internal */
2157
+ export const RetrieveDatapointMessagesUserMessage$outboundSchema: z.ZodType<
2158
+ RetrieveDatapointMessagesUserMessage$Outbound,
2159
+ z.ZodTypeDef,
2160
+ RetrieveDatapointMessagesUserMessage
2161
+ > = z.object({
2162
+ role: RetrieveDatapointMessagesDatasetsResponseRole$outboundSchema,
2163
+ name: z.string().optional(),
2164
+ content: z.union([
2165
+ z.string(),
2166
+ z.array(z.union([
2167
+ z.lazy(() => RetrieveDatapoint21$outboundSchema),
2168
+ z.lazy(() => RetrieveDatapoint22$outboundSchema),
2169
+ z.lazy(() => RetrieveDatapoint23$outboundSchema),
2170
+ z.lazy(() => RetrieveDatapoint24$outboundSchema),
2171
+ ])),
2172
+ ]),
2173
+ });
2174
+
2175
+ /**
2176
+ * @internal
2177
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2178
+ */
2179
+ export namespace RetrieveDatapointMessagesUserMessage$ {
2180
+ /** @deprecated use `RetrieveDatapointMessagesUserMessage$inboundSchema` instead. */
2181
+ export const inboundSchema =
2182
+ RetrieveDatapointMessagesUserMessage$inboundSchema;
2183
+ /** @deprecated use `RetrieveDatapointMessagesUserMessage$outboundSchema` instead. */
2184
+ export const outboundSchema =
2185
+ RetrieveDatapointMessagesUserMessage$outboundSchema;
2186
+ /** @deprecated use `RetrieveDatapointMessagesUserMessage$Outbound` instead. */
2187
+ export type Outbound = RetrieveDatapointMessagesUserMessage$Outbound;
765
2188
  }
766
2189
 
767
- export function retrieveDatapointContentToJSON(
768
- retrieveDatapointContent: RetrieveDatapointContent,
2190
+ export function retrieveDatapointMessagesUserMessageToJSON(
2191
+ retrieveDatapointMessagesUserMessage: RetrieveDatapointMessagesUserMessage,
769
2192
  ): string {
770
2193
  return JSON.stringify(
771
- RetrieveDatapointContent$outboundSchema.parse(retrieveDatapointContent),
2194
+ RetrieveDatapointMessagesUserMessage$outboundSchema.parse(
2195
+ retrieveDatapointMessagesUserMessage,
2196
+ ),
772
2197
  );
773
2198
  }
774
2199
 
775
- export function retrieveDatapointContentFromJSON(
2200
+ export function retrieveDatapointMessagesUserMessageFromJSON(
776
2201
  jsonString: string,
777
- ): SafeParseResult<RetrieveDatapointContent, SDKValidationError> {
2202
+ ): SafeParseResult<RetrieveDatapointMessagesUserMessage, SDKValidationError> {
778
2203
  return safeParse(
779
2204
  jsonString,
780
- (x) => RetrieveDatapointContent$inboundSchema.parse(JSON.parse(x)),
781
- `Failed to parse 'RetrieveDatapointContent' from JSON`,
2205
+ (x) =>
2206
+ RetrieveDatapointMessagesUserMessage$inboundSchema.parse(JSON.parse(x)),
2207
+ `Failed to parse 'RetrieveDatapointMessagesUserMessage' from JSON`,
782
2208
  );
783
2209
  }
784
2210
 
785
2211
  /** @internal */
786
- export const RetrieveDatapointType$inboundSchema: z.ZodNativeEnum<
787
- typeof RetrieveDatapointType
788
- > = z.nativeEnum(RetrieveDatapointType);
2212
+ export const RetrieveDatapointMessagesDatasetsRole$inboundSchema:
2213
+ z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsRole> = z.nativeEnum(
2214
+ RetrieveDatapointMessagesDatasetsRole,
2215
+ );
789
2216
 
790
2217
  /** @internal */
791
- export const RetrieveDatapointType$outboundSchema: z.ZodNativeEnum<
792
- typeof RetrieveDatapointType
793
- > = RetrieveDatapointType$inboundSchema;
2218
+ export const RetrieveDatapointMessagesDatasetsRole$outboundSchema:
2219
+ z.ZodNativeEnum<typeof RetrieveDatapointMessagesDatasetsRole> =
2220
+ RetrieveDatapointMessagesDatasetsRole$inboundSchema;
794
2221
 
795
2222
  /**
796
2223
  * @internal
797
2224
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
798
2225
  */
799
- export namespace RetrieveDatapointType$ {
800
- /** @deprecated use `RetrieveDatapointType$inboundSchema` instead. */
801
- export const inboundSchema = RetrieveDatapointType$inboundSchema;
802
- /** @deprecated use `RetrieveDatapointType$outboundSchema` instead. */
803
- export const outboundSchema = RetrieveDatapointType$outboundSchema;
2226
+ export namespace RetrieveDatapointMessagesDatasetsRole$ {
2227
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsRole$inboundSchema` instead. */
2228
+ export const inboundSchema =
2229
+ RetrieveDatapointMessagesDatasetsRole$inboundSchema;
2230
+ /** @deprecated use `RetrieveDatapointMessagesDatasetsRole$outboundSchema` instead. */
2231
+ export const outboundSchema =
2232
+ RetrieveDatapointMessagesDatasetsRole$outboundSchema;
804
2233
  }
805
2234
 
806
2235
  /** @internal */
807
- export const RetrieveDatapointFunction$inboundSchema: z.ZodType<
808
- RetrieveDatapointFunction,
2236
+ export const RetrieveDatapointMessagesSystemMessage$inboundSchema: z.ZodType<
2237
+ RetrieveDatapointMessagesSystemMessage,
809
2238
  z.ZodTypeDef,
810
2239
  unknown
811
2240
  > = z.object({
812
- name: z.string(),
813
- arguments: z.string(),
2241
+ role: RetrieveDatapointMessagesDatasetsRole$inboundSchema,
2242
+ content: z.string(),
2243
+ name: z.string().optional(),
814
2244
  });
815
2245
 
816
2246
  /** @internal */
817
- export type RetrieveDatapointFunction$Outbound = {
818
- name: string;
819
- arguments: string;
2247
+ export type RetrieveDatapointMessagesSystemMessage$Outbound = {
2248
+ role: string;
2249
+ content: string;
2250
+ name?: string | undefined;
820
2251
  };
821
2252
 
822
2253
  /** @internal */
823
- export const RetrieveDatapointFunction$outboundSchema: z.ZodType<
824
- RetrieveDatapointFunction$Outbound,
2254
+ export const RetrieveDatapointMessagesSystemMessage$outboundSchema: z.ZodType<
2255
+ RetrieveDatapointMessagesSystemMessage$Outbound,
825
2256
  z.ZodTypeDef,
826
- RetrieveDatapointFunction
2257
+ RetrieveDatapointMessagesSystemMessage
827
2258
  > = z.object({
828
- name: z.string(),
829
- arguments: z.string(),
2259
+ role: RetrieveDatapointMessagesDatasetsRole$outboundSchema,
2260
+ content: z.string(),
2261
+ name: z.string().optional(),
830
2262
  });
831
2263
 
832
2264
  /**
833
2265
  * @internal
834
2266
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
835
2267
  */
836
- export namespace RetrieveDatapointFunction$ {
837
- /** @deprecated use `RetrieveDatapointFunction$inboundSchema` instead. */
838
- export const inboundSchema = RetrieveDatapointFunction$inboundSchema;
839
- /** @deprecated use `RetrieveDatapointFunction$outboundSchema` instead. */
840
- export const outboundSchema = RetrieveDatapointFunction$outboundSchema;
841
- /** @deprecated use `RetrieveDatapointFunction$Outbound` instead. */
842
- export type Outbound = RetrieveDatapointFunction$Outbound;
2268
+ export namespace RetrieveDatapointMessagesSystemMessage$ {
2269
+ /** @deprecated use `RetrieveDatapointMessagesSystemMessage$inboundSchema` instead. */
2270
+ export const inboundSchema =
2271
+ RetrieveDatapointMessagesSystemMessage$inboundSchema;
2272
+ /** @deprecated use `RetrieveDatapointMessagesSystemMessage$outboundSchema` instead. */
2273
+ export const outboundSchema =
2274
+ RetrieveDatapointMessagesSystemMessage$outboundSchema;
2275
+ /** @deprecated use `RetrieveDatapointMessagesSystemMessage$Outbound` instead. */
2276
+ export type Outbound = RetrieveDatapointMessagesSystemMessage$Outbound;
843
2277
  }
844
2278
 
845
- export function retrieveDatapointFunctionToJSON(
846
- retrieveDatapointFunction: RetrieveDatapointFunction,
2279
+ export function retrieveDatapointMessagesSystemMessageToJSON(
2280
+ retrieveDatapointMessagesSystemMessage:
2281
+ RetrieveDatapointMessagesSystemMessage,
847
2282
  ): string {
848
2283
  return JSON.stringify(
849
- RetrieveDatapointFunction$outboundSchema.parse(retrieveDatapointFunction),
2284
+ RetrieveDatapointMessagesSystemMessage$outboundSchema.parse(
2285
+ retrieveDatapointMessagesSystemMessage,
2286
+ ),
850
2287
  );
851
2288
  }
852
2289
 
853
- export function retrieveDatapointFunctionFromJSON(
2290
+ export function retrieveDatapointMessagesSystemMessageFromJSON(
854
2291
  jsonString: string,
855
- ): SafeParseResult<RetrieveDatapointFunction, SDKValidationError> {
2292
+ ): SafeParseResult<RetrieveDatapointMessagesSystemMessage, SDKValidationError> {
856
2293
  return safeParse(
857
2294
  jsonString,
858
- (x) => RetrieveDatapointFunction$inboundSchema.parse(JSON.parse(x)),
859
- `Failed to parse 'RetrieveDatapointFunction' from JSON`,
2295
+ (x) =>
2296
+ RetrieveDatapointMessagesSystemMessage$inboundSchema.parse(JSON.parse(x)),
2297
+ `Failed to parse 'RetrieveDatapointMessagesSystemMessage' from JSON`,
860
2298
  );
861
2299
  }
862
2300
 
863
2301
  /** @internal */
864
- export const RetrieveDatapointToolCalls$inboundSchema: z.ZodType<
865
- RetrieveDatapointToolCalls,
2302
+ export const RetrieveDatapointMessagesRole$inboundSchema: z.ZodNativeEnum<
2303
+ typeof RetrieveDatapointMessagesRole
2304
+ > = z.nativeEnum(RetrieveDatapointMessagesRole);
2305
+
2306
+ /** @internal */
2307
+ export const RetrieveDatapointMessagesRole$outboundSchema: z.ZodNativeEnum<
2308
+ typeof RetrieveDatapointMessagesRole
2309
+ > = RetrieveDatapointMessagesRole$inboundSchema;
2310
+
2311
+ /**
2312
+ * @internal
2313
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2314
+ */
2315
+ export namespace RetrieveDatapointMessagesRole$ {
2316
+ /** @deprecated use `RetrieveDatapointMessagesRole$inboundSchema` instead. */
2317
+ export const inboundSchema = RetrieveDatapointMessagesRole$inboundSchema;
2318
+ /** @deprecated use `RetrieveDatapointMessagesRole$outboundSchema` instead. */
2319
+ export const outboundSchema = RetrieveDatapointMessagesRole$outboundSchema;
2320
+ }
2321
+
2322
+ /** @internal */
2323
+ export const RetrieveDatapointMessagesDeveloperMessage$inboundSchema: z.ZodType<
2324
+ RetrieveDatapointMessagesDeveloperMessage,
866
2325
  z.ZodTypeDef,
867
2326
  unknown
868
2327
  > = z.object({
869
- id: z.string().optional(),
870
- index: z.number().optional(),
871
- type: RetrieveDatapointType$inboundSchema,
872
- function: z.lazy(() => RetrieveDatapointFunction$inboundSchema),
2328
+ role: RetrieveDatapointMessagesRole$inboundSchema,
2329
+ content: z.string(),
2330
+ name: z.string().optional(),
873
2331
  });
874
2332
 
875
2333
  /** @internal */
876
- export type RetrieveDatapointToolCalls$Outbound = {
877
- id?: string | undefined;
878
- index?: number | undefined;
879
- type: string;
880
- function: RetrieveDatapointFunction$Outbound;
2334
+ export type RetrieveDatapointMessagesDeveloperMessage$Outbound = {
2335
+ role: string;
2336
+ content: string;
2337
+ name?: string | undefined;
881
2338
  };
882
2339
 
883
2340
  /** @internal */
884
- export const RetrieveDatapointToolCalls$outboundSchema: z.ZodType<
885
- RetrieveDatapointToolCalls$Outbound,
886
- z.ZodTypeDef,
887
- RetrieveDatapointToolCalls
888
- > = z.object({
889
- id: z.string().optional(),
890
- index: z.number().optional(),
891
- type: RetrieveDatapointType$outboundSchema,
892
- function: z.lazy(() => RetrieveDatapointFunction$outboundSchema),
893
- });
2341
+ export const RetrieveDatapointMessagesDeveloperMessage$outboundSchema:
2342
+ z.ZodType<
2343
+ RetrieveDatapointMessagesDeveloperMessage$Outbound,
2344
+ z.ZodTypeDef,
2345
+ RetrieveDatapointMessagesDeveloperMessage
2346
+ > = z.object({
2347
+ role: RetrieveDatapointMessagesRole$outboundSchema,
2348
+ content: z.string(),
2349
+ name: z.string().optional(),
2350
+ });
894
2351
 
895
2352
  /**
896
2353
  * @internal
897
2354
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
898
2355
  */
899
- export namespace RetrieveDatapointToolCalls$ {
900
- /** @deprecated use `RetrieveDatapointToolCalls$inboundSchema` instead. */
901
- export const inboundSchema = RetrieveDatapointToolCalls$inboundSchema;
902
- /** @deprecated use `RetrieveDatapointToolCalls$outboundSchema` instead. */
903
- export const outboundSchema = RetrieveDatapointToolCalls$outboundSchema;
904
- /** @deprecated use `RetrieveDatapointToolCalls$Outbound` instead. */
905
- export type Outbound = RetrieveDatapointToolCalls$Outbound;
2356
+ export namespace RetrieveDatapointMessagesDeveloperMessage$ {
2357
+ /** @deprecated use `RetrieveDatapointMessagesDeveloperMessage$inboundSchema` instead. */
2358
+ export const inboundSchema =
2359
+ RetrieveDatapointMessagesDeveloperMessage$inboundSchema;
2360
+ /** @deprecated use `RetrieveDatapointMessagesDeveloperMessage$outboundSchema` instead. */
2361
+ export const outboundSchema =
2362
+ RetrieveDatapointMessagesDeveloperMessage$outboundSchema;
2363
+ /** @deprecated use `RetrieveDatapointMessagesDeveloperMessage$Outbound` instead. */
2364
+ export type Outbound = RetrieveDatapointMessagesDeveloperMessage$Outbound;
906
2365
  }
907
2366
 
908
- export function retrieveDatapointToolCallsToJSON(
909
- retrieveDatapointToolCalls: RetrieveDatapointToolCalls,
2367
+ export function retrieveDatapointMessagesDeveloperMessageToJSON(
2368
+ retrieveDatapointMessagesDeveloperMessage:
2369
+ RetrieveDatapointMessagesDeveloperMessage,
910
2370
  ): string {
911
2371
  return JSON.stringify(
912
- RetrieveDatapointToolCalls$outboundSchema.parse(retrieveDatapointToolCalls),
2372
+ RetrieveDatapointMessagesDeveloperMessage$outboundSchema.parse(
2373
+ retrieveDatapointMessagesDeveloperMessage,
2374
+ ),
913
2375
  );
914
2376
  }
915
2377
 
916
- export function retrieveDatapointToolCallsFromJSON(
2378
+ export function retrieveDatapointMessagesDeveloperMessageFromJSON(
917
2379
  jsonString: string,
918
- ): SafeParseResult<RetrieveDatapointToolCalls, SDKValidationError> {
2380
+ ): SafeParseResult<
2381
+ RetrieveDatapointMessagesDeveloperMessage,
2382
+ SDKValidationError
2383
+ > {
919
2384
  return safeParse(
920
2385
  jsonString,
921
- (x) => RetrieveDatapointToolCalls$inboundSchema.parse(JSON.parse(x)),
922
- `Failed to parse 'RetrieveDatapointToolCalls' from JSON`,
2386
+ (x) =>
2387
+ RetrieveDatapointMessagesDeveloperMessage$inboundSchema.parse(
2388
+ JSON.parse(x),
2389
+ ),
2390
+ `Failed to parse 'RetrieveDatapointMessagesDeveloperMessage' from JSON`,
923
2391
  );
924
2392
  }
925
2393
 
@@ -928,64 +2396,34 @@ export const RetrieveDatapointMessages$inboundSchema: z.ZodType<
928
2396
  RetrieveDatapointMessages,
929
2397
  z.ZodTypeDef,
930
2398
  unknown
931
- > = z.object({
932
- role: RetrieveDatapointRole$inboundSchema,
933
- content: z.union([
934
- z.string(),
935
- z.array(z.union([
936
- z.lazy(() => RetrieveDatapoint21$inboundSchema),
937
- z.lazy(() => RetrieveDatapoint22$inboundSchema),
938
- z.lazy(() => RetrieveDatapoint23$inboundSchema),
939
- ])),
940
- ]),
941
- tool_calls: z.array(z.lazy(() => RetrieveDatapointToolCalls$inboundSchema))
942
- .optional(),
943
- tool_call_id: z.string().optional(),
944
- }).transform((v) => {
945
- return remap$(v, {
946
- "tool_calls": "toolCalls",
947
- "tool_call_id": "toolCallId",
948
- });
949
- });
2399
+ > = z.union([
2400
+ z.lazy(() => RetrieveDatapointMessagesDeveloperMessage$inboundSchema),
2401
+ z.lazy(() => RetrieveDatapointMessagesSystemMessage$inboundSchema),
2402
+ z.lazy(() => RetrieveDatapointMessagesUserMessage$inboundSchema),
2403
+ z.lazy(() => RetrieveDatapointMessagesToolMessage$inboundSchema),
2404
+ z.lazy(() => RetrieveDatapointMessagesAssistantMessage$inboundSchema),
2405
+ ]);
950
2406
 
951
2407
  /** @internal */
952
- export type RetrieveDatapointMessages$Outbound = {
953
- role: string;
954
- content:
955
- | string
956
- | Array<
957
- | RetrieveDatapoint21$Outbound
958
- | RetrieveDatapoint22$Outbound
959
- | RetrieveDatapoint23$Outbound
960
- >;
961
- tool_calls?: Array<RetrieveDatapointToolCalls$Outbound> | undefined;
962
- tool_call_id?: string | undefined;
963
- };
2408
+ export type RetrieveDatapointMessages$Outbound =
2409
+ | RetrieveDatapointMessagesDeveloperMessage$Outbound
2410
+ | RetrieveDatapointMessagesSystemMessage$Outbound
2411
+ | RetrieveDatapointMessagesUserMessage$Outbound
2412
+ | RetrieveDatapointMessagesToolMessage$Outbound
2413
+ | RetrieveDatapointMessagesAssistantMessage$Outbound;
964
2414
 
965
2415
  /** @internal */
966
2416
  export const RetrieveDatapointMessages$outboundSchema: z.ZodType<
967
2417
  RetrieveDatapointMessages$Outbound,
968
2418
  z.ZodTypeDef,
969
2419
  RetrieveDatapointMessages
970
- > = z.object({
971
- role: RetrieveDatapointRole$outboundSchema,
972
- content: z.union([
973
- z.string(),
974
- z.array(z.union([
975
- z.lazy(() => RetrieveDatapoint21$outboundSchema),
976
- z.lazy(() => RetrieveDatapoint22$outboundSchema),
977
- z.lazy(() => RetrieveDatapoint23$outboundSchema),
978
- ])),
979
- ]),
980
- toolCalls: z.array(z.lazy(() => RetrieveDatapointToolCalls$outboundSchema))
981
- .optional(),
982
- toolCallId: z.string().optional(),
983
- }).transform((v) => {
984
- return remap$(v, {
985
- toolCalls: "tool_calls",
986
- toolCallId: "tool_call_id",
987
- });
988
- });
2420
+ > = z.union([
2421
+ z.lazy(() => RetrieveDatapointMessagesDeveloperMessage$outboundSchema),
2422
+ z.lazy(() => RetrieveDatapointMessagesSystemMessage$outboundSchema),
2423
+ z.lazy(() => RetrieveDatapointMessagesUserMessage$outboundSchema),
2424
+ z.lazy(() => RetrieveDatapointMessagesToolMessage$outboundSchema),
2425
+ z.lazy(() => RetrieveDatapointMessagesAssistantMessage$outboundSchema),
2426
+ ]);
989
2427
 
990
2428
  /**
991
2429
  * @internal
@@ -1027,8 +2465,15 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
1027
2465
  _id: z.string(),
1028
2466
  workspace_id: z.string(),
1029
2467
  inputs: z.record(z.any()).optional(),
1030
- messages: z.array(z.lazy(() => RetrieveDatapointMessages$inboundSchema))
1031
- .optional(),
2468
+ messages: z.array(
2469
+ z.union([
2470
+ z.lazy(() => RetrieveDatapointMessagesDeveloperMessage$inboundSchema),
2471
+ z.lazy(() => RetrieveDatapointMessagesSystemMessage$inboundSchema),
2472
+ z.lazy(() => RetrieveDatapointMessagesUserMessage$inboundSchema),
2473
+ z.lazy(() => RetrieveDatapointMessagesToolMessage$inboundSchema),
2474
+ z.lazy(() => RetrieveDatapointMessagesAssistantMessage$inboundSchema),
2475
+ ]),
2476
+ ).optional(),
1032
2477
  expected_output: z.string().optional(),
1033
2478
  dataset_id: z.string(),
1034
2479
  created_by_id: z.string().optional(),
@@ -1036,7 +2481,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
1036
2481
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1037
2482
  .optional(),
1038
2483
  updated: z.string().datetime({ offset: true }).default(
1039
- "2025-05-30T11:01:20.758Z",
2484
+ "2025-06-03T12:31:41.205Z",
1040
2485
  ).transform(v => new Date(v)),
1041
2486
  }).transform((v) => {
1042
2487
  return remap$(v, {
@@ -1054,7 +2499,15 @@ export type RetrieveDatapointResponseBody$Outbound = {
1054
2499
  _id: string;
1055
2500
  workspace_id: string;
1056
2501
  inputs?: { [k: string]: any } | undefined;
1057
- messages?: Array<RetrieveDatapointMessages$Outbound> | undefined;
2502
+ messages?:
2503
+ | Array<
2504
+ | RetrieveDatapointMessagesDeveloperMessage$Outbound
2505
+ | RetrieveDatapointMessagesSystemMessage$Outbound
2506
+ | RetrieveDatapointMessagesUserMessage$Outbound
2507
+ | RetrieveDatapointMessagesToolMessage$Outbound
2508
+ | RetrieveDatapointMessagesAssistantMessage$Outbound
2509
+ >
2510
+ | undefined;
1058
2511
  expected_output?: string | undefined;
1059
2512
  dataset_id: string;
1060
2513
  created_by_id?: string | undefined;
@@ -1072,14 +2525,21 @@ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
1072
2525
  id: z.string(),
1073
2526
  workspaceId: z.string(),
1074
2527
  inputs: z.record(z.any()).optional(),
1075
- messages: z.array(z.lazy(() => RetrieveDatapointMessages$outboundSchema))
1076
- .optional(),
2528
+ messages: z.array(
2529
+ z.union([
2530
+ z.lazy(() => RetrieveDatapointMessagesDeveloperMessage$outboundSchema),
2531
+ z.lazy(() => RetrieveDatapointMessagesSystemMessage$outboundSchema),
2532
+ z.lazy(() => RetrieveDatapointMessagesUserMessage$outboundSchema),
2533
+ z.lazy(() => RetrieveDatapointMessagesToolMessage$outboundSchema),
2534
+ z.lazy(() => RetrieveDatapointMessagesAssistantMessage$outboundSchema),
2535
+ ]),
2536
+ ).optional(),
1077
2537
  expectedOutput: z.string().optional(),
1078
2538
  datasetId: z.string(),
1079
2539
  createdById: z.string().optional(),
1080
2540
  updatedById: z.string().optional(),
1081
2541
  created: z.date().transform(v => v.toISOString()).optional(),
1082
- updated: z.date().default(() => new Date("2025-05-30T11:01:20.758Z"))
2542
+ updated: z.date().default(() => new Date("2025-06-03T12:31:41.205Z"))
1083
2543
  .transform(v => v.toISOString()),
1084
2544
  }).transform((v) => {
1085
2545
  return remap$(v, {