@orq-ai/node 4.14.3 → 4.14.6

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 (217) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/lib/encodings.d.ts +10 -9
  5. package/lib/encodings.d.ts.map +1 -1
  6. package/lib/encodings.js +29 -13
  7. package/lib/encodings.js.map +1 -1
  8. package/models/components/evaluatorresponsefunction.js +2 -2
  9. package/models/components/evaluatorresponsehttp.js +2 -2
  10. package/models/components/evaluatorresponsejsonschema.js +2 -2
  11. package/models/components/evaluatorresponsellm.js +2 -2
  12. package/models/components/evaluatorresponsepython.js +2 -2
  13. package/models/components/evaluatorresponseragas.js +2 -2
  14. package/models/components/evaluatorresponsetypescript.js +2 -2
  15. package/models/components/reasoningpart.js +1 -1
  16. package/models/operations/createannotationqueue.js +1 -1
  17. package/models/operations/createdataset.js +1 -1
  18. package/models/operations/createdatasetitem.js +5 -5
  19. package/models/operations/createtool.js +4 -4
  20. package/models/operations/getalltools.js +4 -4
  21. package/models/operations/geteval.js +16 -16
  22. package/models/operations/getv2humanevalsets.js +2 -2
  23. package/models/operations/getv2humanevalsetsid.js +2 -2
  24. package/models/operations/listannotationqueues.js +1 -1
  25. package/models/operations/listdatasetdatapoints.js +5 -5
  26. package/models/operations/listdatasets.js +1 -1
  27. package/models/operations/patchv2humanevalsetsid.js +2 -2
  28. package/models/operations/postv2feedbackevaluation.js +4 -4
  29. package/models/operations/postv2humanevalsets.js +2 -2
  30. package/models/operations/retrieveannotationqueue.js +1 -1
  31. package/models/operations/retrievedatapoint.js +5 -5
  32. package/models/operations/retrievedataset.js +1 -1
  33. package/models/operations/retrievetool.js +4 -4
  34. package/models/operations/runagent.js +1 -1
  35. package/models/operations/streamrunagent.js +1 -1
  36. package/models/operations/updateannotationqueue.js +1 -1
  37. package/models/operations/updatedatapoint.js +5 -5
  38. package/models/operations/updatedataset.js +1 -1
  39. package/models/operations/updatetool.js +4 -4
  40. package/package.json +3 -3
  41. package/packages/orq-rc/examples/{evalsAll.example.ts → deploymentsList.example.ts} +2 -2
  42. package/packages/orq-rc/src/funcs/annotationQueuesAddItems.ts +9 -10
  43. package/packages/orq-rc/src/funcs/annotationQueuesClear.ts +8 -8
  44. package/packages/orq-rc/src/funcs/annotationQueuesCreate.ts +10 -13
  45. package/packages/orq-rc/src/funcs/annotationQueuesDelete.ts +8 -8
  46. package/packages/orq-rc/src/funcs/annotationQueuesList.ts +6 -5
  47. package/packages/orq-rc/src/funcs/annotationQueuesListItems.ts +6 -5
  48. package/packages/orq-rc/src/funcs/annotationQueuesRemoveItems.ts +12 -10
  49. package/packages/orq-rc/src/funcs/annotationQueuesRetrieve.ts +6 -5
  50. package/packages/orq-rc/src/funcs/annotationQueuesRetrieveItem.ts +8 -6
  51. package/packages/orq-rc/src/funcs/annotationQueuesUpdate.ts +10 -7
  52. package/packages/orq-rc/src/funcs/auditLogsQuery.ts +162 -0
  53. package/packages/orq-rc/src/funcs/evalsAll.ts +6 -14
  54. package/packages/orq-rc/src/funcs/evalsCreate.ts +10 -35
  55. package/packages/orq-rc/src/funcs/evalsDelete.ts +6 -19
  56. package/packages/orq-rc/src/funcs/evalsGet.ts +6 -14
  57. package/packages/orq-rc/src/funcs/evalsGetVersion.ts +174 -0
  58. package/packages/orq-rc/src/funcs/evalsListVersions.ts +11 -20
  59. package/packages/orq-rc/src/funcs/evalsUpdate.ts +6 -14
  60. package/packages/orq-rc/src/funcs/workspacesGet.ts +168 -0
  61. package/packages/orq-rc/src/funcs/workspacesList.ts +170 -0
  62. package/packages/orq-rc/src/funcs/workspacesUpdate.ts +171 -0
  63. package/packages/orq-rc/src/lib/config.ts +3 -3
  64. package/packages/orq-rc/src/lib/encodings.ts +58 -23
  65. package/packages/orq-rc/src/models/components/addannotationqueueitemsrequest.ts +41 -0
  66. package/packages/orq-rc/src/models/components/addannotationqueueitemsresponse.ts +38 -0
  67. package/packages/orq-rc/src/models/components/agentresponserequest.ts +17 -10
  68. package/packages/orq-rc/src/models/components/annotationqueue.ts +101 -0
  69. package/packages/orq-rc/src/models/components/annotationqueueitem.ts +80 -0
  70. package/packages/orq-rc/src/models/components/annotationqueueitemref.ts +43 -0
  71. package/packages/orq-rc/src/models/components/annotationqueuemetadata.ts +42 -0
  72. package/packages/orq-rc/src/models/components/auditlog.ts +122 -0
  73. package/packages/orq-rc/src/models/components/auditlogfilter.ts +51 -0
  74. package/packages/orq-rc/src/models/components/auditlogfilterquery.ts +54 -0
  75. package/packages/orq-rc/src/models/components/auditlogpagination.ts +55 -0
  76. package/packages/orq-rc/src/models/components/auditlogsort.ts +39 -0
  77. package/packages/orq-rc/src/models/components/budgetmatch.ts +1 -7
  78. package/packages/orq-rc/src/models/components/budgetscope.ts +1 -5
  79. package/packages/orq-rc/src/models/components/budgetscoperestresponse.ts +1 -5
  80. package/packages/orq-rc/src/models/components/clearannotationqueueresponse.ts +27 -0
  81. package/packages/orq-rc/src/models/components/createannotationqueuerequest.ts +54 -0
  82. package/packages/orq-rc/src/models/components/createapikeyrequest.ts +9 -0
  83. package/packages/orq-rc/src/models/components/deleteannotationqueueresponse.ts +27 -0
  84. package/packages/orq-rc/src/models/components/deleteevaluatorresponse.ts +27 -0
  85. package/packages/orq-rc/src/models/components/evaluatordocumentresponse.ts +50 -0
  86. package/packages/orq-rc/src/models/components/filesystemtoolinput.ts +63 -6
  87. package/packages/orq-rc/src/models/components/getevaluatorversionresponse.ts +58 -0
  88. package/packages/orq-rc/src/models/components/getworkspaceresponse.ts +32 -0
  89. package/packages/orq-rc/src/models/components/index.ts +35 -8
  90. package/packages/orq-rc/src/models/components/listannotationqueueitemsresponse.ts +53 -0
  91. package/packages/orq-rc/src/models/components/listannotationqueuesresponse.ts +53 -0
  92. package/packages/orq-rc/src/models/components/listevaluatorsresponse.ts +59 -0
  93. package/packages/orq-rc/src/models/components/listevaluatorversionsresponse.ts +59 -0
  94. package/packages/orq-rc/src/models/components/listworkspacesresponse.ts +41 -0
  95. package/packages/orq-rc/src/models/components/modelmetadata.ts +6 -0
  96. package/packages/orq-rc/src/models/components/modelsconfig.ts +10 -11
  97. package/packages/orq-rc/src/models/components/piiredactionconfig.ts +7 -9
  98. package/packages/orq-rc/src/models/components/pricing.ts +12 -0
  99. package/packages/orq-rc/src/models/components/pricingvariant.ts +12 -0
  100. package/packages/orq-rc/src/models/components/queryauditlogsrequest.ts +64 -0
  101. package/packages/orq-rc/src/models/components/queryauditlogsresponse.ts +55 -0
  102. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  103. package/packages/orq-rc/src/models/components/removeannotationqueueitemsrequest.ts +41 -0
  104. package/packages/orq-rc/src/models/components/removeannotationqueueitemsresponse.ts +28 -0
  105. package/packages/orq-rc/src/models/components/searchknowledgerequest.ts +37 -58
  106. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +19 -23
  107. package/packages/orq-rc/src/models/components/updateannotationqueuerequest.ts +61 -0
  108. package/packages/orq-rc/src/models/components/updateworkspacerequest.ts +81 -0
  109. package/packages/orq-rc/src/models/components/updateworkspaceresponse.ts +32 -0
  110. package/packages/orq-rc/src/models/components/value.ts +20 -0
  111. package/packages/orq-rc/src/models/components/workspace.ts +116 -0
  112. package/packages/orq-rc/src/models/components/workspacecapabilities.ts +33 -0
  113. package/packages/orq-rc/src/models/components/workspaceorganization.ts +33 -0
  114. package/packages/orq-rc/src/models/components/workspacesettingsfields.ts +135 -0
  115. package/packages/orq-rc/src/models/errors/index.ts +0 -6
  116. package/packages/orq-rc/src/models/operations/addannotationqueueitems.ts +7 -139
  117. package/packages/orq-rc/src/models/operations/createagentrequest.ts +20 -31
  118. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  119. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
  120. package/packages/orq-rc/src/models/operations/createeval.ts +3 -644
  121. package/packages/orq-rc/src/models/operations/createprompt.ts +19 -22
  122. package/packages/orq-rc/src/models/operations/createtool.ts +55 -56
  123. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +16 -18
  124. package/packages/orq-rc/src/models/operations/deployments.ts +43 -46
  125. package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
  126. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  127. package/packages/orq-rc/src/models/operations/geteval.ts +0 -2770
  128. package/packages/orq-rc/src/models/operations/getevals.ts +5 -119
  129. package/packages/orq-rc/src/models/operations/getevalversion.ts +39 -0
  130. package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
  131. package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
  132. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  133. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/index.ts +5 -2
  135. package/packages/orq-rc/src/models/operations/listannotationqueueitems.ts +5 -183
  136. package/packages/orq-rc/src/models/operations/listannotationqueues.ts +7 -173
  137. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
  138. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  139. package/packages/orq-rc/src/models/operations/listevalversions.ts +49 -0
  140. package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
  141. package/packages/orq-rc/src/models/operations/parse.ts +7 -7
  142. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  143. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +14 -20
  144. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  145. package/packages/orq-rc/src/models/operations/removeannotationqueueitems.ts +8 -41
  146. package/packages/orq-rc/src/models/operations/retrieveannotationqueue.ts +0 -123
  147. package/packages/orq-rc/src/models/operations/retrieveannotationqueueitem.ts +31 -0
  148. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
  149. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  150. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  151. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  152. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  153. package/packages/orq-rc/src/models/operations/updateagent.ts +31 -40
  154. package/packages/orq-rc/src/models/operations/updateannotationqueue.ts +7 -182
  155. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
  156. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  157. package/packages/orq-rc/src/models/operations/updateeval.ts +6 -404
  158. package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -0
  159. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  160. package/packages/orq-rc/src/models/operations/workspaceget.ts +31 -0
  161. package/packages/orq-rc/src/models/operations/workspacelist.ts +43 -0
  162. package/packages/orq-rc/src/models/operations/workspaceupdate.ts +40 -0
  163. package/packages/orq-rc/src/sdk/annotationqueues.ts +31 -31
  164. package/packages/orq-rc/src/sdk/auditlogs.ts +27 -0
  165. package/packages/orq-rc/src/sdk/evals.ts +41 -23
  166. package/packages/orq-rc/src/sdk/sdk.ts +22 -10
  167. package/packages/orq-rc/src/sdk/workspaces.ts +64 -0
  168. package/src/lib/config.ts +3 -3
  169. package/src/lib/encodings.ts +58 -23
  170. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  171. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  172. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  173. package/src/models/components/evaluatorresponsellm.ts +2 -2
  174. package/src/models/components/evaluatorresponsepython.ts +2 -2
  175. package/src/models/components/evaluatorresponseragas.ts +2 -2
  176. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  177. package/src/models/components/reasoningpart.ts +1 -1
  178. package/src/models/operations/createannotationqueue.ts +1 -1
  179. package/src/models/operations/createdataset.ts +1 -1
  180. package/src/models/operations/createdatasetitem.ts +5 -5
  181. package/src/models/operations/createtool.ts +4 -4
  182. package/src/models/operations/getalltools.ts +4 -4
  183. package/src/models/operations/geteval.ts +16 -16
  184. package/src/models/operations/getv2humanevalsets.ts +2 -2
  185. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  186. package/src/models/operations/listannotationqueues.ts +1 -1
  187. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  188. package/src/models/operations/listdatasets.ts +1 -1
  189. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  190. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  191. package/src/models/operations/postv2humanevalsets.ts +2 -2
  192. package/src/models/operations/retrieveannotationqueue.ts +1 -1
  193. package/src/models/operations/retrievedatapoint.ts +5 -5
  194. package/src/models/operations/retrievedataset.ts +1 -1
  195. package/src/models/operations/retrievetool.ts +4 -4
  196. package/src/models/operations/runagent.ts +1 -1
  197. package/src/models/operations/streamrunagent.ts +1 -1
  198. package/src/models/operations/updateannotationqueue.ts +1 -1
  199. package/src/models/operations/updatedatapoint.ts +5 -5
  200. package/src/models/operations/updatedataset.ts +1 -1
  201. package/src/models/operations/updatetool.ts +4 -4
  202. package/packages/orq-rc/src/models/components/evaluatorresponsefunction.ts +0 -922
  203. package/packages/orq-rc/src/models/components/evaluatorresponsehttp.ts +0 -77
  204. package/packages/orq-rc/src/models/components/evaluatorresponsejsonschema.ts +0 -60
  205. package/packages/orq-rc/src/models/components/evaluatorresponsellm.ts +0 -310
  206. package/packages/orq-rc/src/models/components/evaluatorresponsepython.ts +0 -60
  207. package/packages/orq-rc/src/models/components/evaluatorresponseragas.ts +0 -84
  208. package/packages/orq-rc/src/models/components/evaluatorresponsetypescript.ts +0 -60
  209. package/packages/orq-rc/src/models/components/publicspan.ts +0 -135
  210. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  211. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -96
  212. package/packages/orq-rc/src/models/errors/geteval.ts +0 -51
  213. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  214. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  215. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  216. package/packages/orq-rc/src/models/operations/createannotationqueue.ts +0 -176
  217. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
@@ -3,634 +3,18 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
6
 
13
- export const OutputType = {
14
- Boolean: "boolean",
15
- Number: "number",
16
- } as const;
17
- export type OutputType = ClosedEnum<typeof OutputType>;
18
-
19
- export const RequestBodyType = {
20
- PythonEval: "python_eval",
21
- } as const;
22
- export type RequestBodyType = ClosedEnum<typeof RequestBodyType>;
23
-
24
- export type Python = {
25
- guardrailConfig?: any | undefined;
26
- outputType?: OutputType | undefined;
27
- code: string;
28
- type: RequestBodyType;
29
- /**
30
- * Legacy alternative to `project_id`. Storage path whose first segment names the project that owns the evaluator. Mutually exclusive with `project_id`.
31
- */
32
- path?: string | undefined;
33
- /**
34
- * Unique identifier of the project that owns the evaluator, as returned by `GET /v2/projects`. Mutually exclusive with `path`.
35
- */
36
- projectId?: string | undefined;
37
- description?: string | undefined;
38
- key: string;
39
- };
40
-
41
- /**
42
- * The type of output expected from the evaluator
43
- */
44
- export const OneOutputType = {
45
- Boolean: "boolean",
46
- Categorical: "categorical",
47
- Number: "number",
48
- String: "string",
49
- } as const;
50
- /**
51
- * The type of output expected from the evaluator
52
- */
53
- export type OneOutputType = ClosedEnum<typeof OneOutputType>;
54
-
55
- export const OneType = {
56
- LlmEval: "llm_eval",
57
- } as const;
58
- export type OneType = ClosedEnum<typeof OneType>;
59
-
60
- export type OneCategoricalLabels = {
61
- value: string;
62
- description?: string | undefined;
63
- };
64
-
65
- export type CreateEval1Retry = {
66
- count?: number | undefined;
67
- onCodes?: Array<number> | undefined;
68
- };
69
-
70
- export type CreateEval1Fallbacks = {
71
- model: string;
72
- };
73
-
74
- export type OneJudges = {
75
- model: string;
76
- retry?: CreateEval1Retry | undefined;
77
- fallbacks?: Array<CreateEval1Fallbacks> | undefined;
78
- };
79
-
80
- export type OneRetry = {
81
- count?: number | undefined;
82
- onCodes?: Array<number> | undefined;
83
- };
84
-
85
- export type OneFallbacks = {
86
- model: string;
87
- };
88
-
89
- export type OneReplacementJudges = {
90
- model: string;
91
- retry?: OneRetry | undefined;
92
- fallbacks?: Array<OneFallbacks> | undefined;
93
- };
94
-
95
- export const OneTieValue = {
96
- Tie: "Tie",
97
- } as const;
98
- export type OneTieValue = ClosedEnum<typeof OneTieValue>;
99
-
100
- export type OneJury = {
101
- judges: Array<OneJudges>;
102
- replacementJudges?: Array<OneReplacementJudges> | undefined;
103
- minSuccessfulJudges?: number | undefined;
104
- tieValue?: OneTieValue | undefined;
105
- };
106
-
107
- export type LLMJury = {
108
- guardrailConfig?: any | undefined;
109
- /**
110
- * The type of output expected from the evaluator
111
- */
112
- outputType?: OneOutputType | undefined;
113
- type: OneType;
114
- repetitions?: number | null | undefined;
115
- prompt: string;
116
- categories?: Array<string> | null | undefined;
117
- categoricalLabels?: Array<OneCategoricalLabels> | null | undefined;
118
- datasetId?: string | null | undefined;
119
- /**
120
- * Legacy alternative to `project_id`. Storage path whose first segment names the project that owns the evaluator. Mutually exclusive with `project_id`.
121
- */
122
- path?: string | undefined;
123
- /**
124
- * Unique identifier of the project that owns the evaluator, as returned by `GET /v2/projects`. Mutually exclusive with `path`.
125
- */
126
- projectId?: string | undefined;
127
- description?: string | undefined;
128
- key: string;
129
- mode: "jury";
130
- jury: OneJury;
131
- };
132
-
133
- /**
134
- * The type of output expected from the evaluator
135
- */
136
- export const CreateEval1OutputType = {
137
- Boolean: "boolean",
138
- Categorical: "categorical",
139
- Number: "number",
140
- String: "string",
141
- } as const;
142
- /**
143
- * The type of output expected from the evaluator
144
- */
145
- export type CreateEval1OutputType = ClosedEnum<typeof CreateEval1OutputType>;
146
-
147
- export const CreateEval1Type = {
148
- LlmEval: "llm_eval",
149
- } as const;
150
- export type CreateEval1Type = ClosedEnum<typeof CreateEval1Type>;
151
-
152
- export type CreateEval1CategoricalLabels = {
153
- value: string;
154
- description?: string | undefined;
155
- };
156
-
157
- export type Llm = {
158
- guardrailConfig?: any | undefined;
159
- /**
160
- * The type of output expected from the evaluator
161
- */
162
- outputType?: CreateEval1OutputType | undefined;
163
- type: CreateEval1Type;
164
- repetitions?: number | null | undefined;
165
- prompt: string;
166
- categories?: Array<string> | null | undefined;
167
- categoricalLabels?: Array<CreateEval1CategoricalLabels> | null | undefined;
168
- datasetId?: string | null | undefined;
169
- /**
170
- * Legacy alternative to `project_id`. Storage path whose first segment names the project that owns the evaluator. Mutually exclusive with `project_id`.
171
- */
172
- path?: string | undefined;
173
- /**
174
- * Unique identifier of the project that owns the evaluator, as returned by `GET /v2/projects`. Mutually exclusive with `path`.
175
- */
176
- projectId?: string | undefined;
177
- description?: string | undefined;
178
- key: string;
179
- mode: "single";
180
- model: string;
181
- };
182
-
183
- export type RequestBody1 = Llm | LLMJury;
184
-
185
- export type CreateEvalRequestBody = Python | Llm | LLMJury;
186
-
187
- /**
188
- * Successfully created an evaluator
189
- */
190
- export type CreateEvalResponseBody =
191
- | components.EvaluatorResponseLlm
192
- | components.EvaluatorResponseJsonSchema
193
- | components.EvaluatorResponseHttp
194
- | components.EvaluatorResponsePython
195
- | components.EvaluatorResponseFunction
196
- | components.EvaluatorResponseRagas
197
- | components.EvaluatorResponseTypescript;
198
-
199
- /** @internal */
200
- export const OutputType$outboundSchema: z.ZodNativeEnum<typeof OutputType> = z
201
- .nativeEnum(OutputType);
202
-
203
- /** @internal */
204
- export const RequestBodyType$outboundSchema: z.ZodNativeEnum<
205
- typeof RequestBodyType
206
- > = z.nativeEnum(RequestBodyType);
207
-
208
- /** @internal */
209
- export type Python$Outbound = {
210
- guardrail_config?: any | undefined;
211
- output_type?: string | undefined;
212
- code: string;
213
- type: string;
214
- path?: string | undefined;
215
- project_id?: string | undefined;
216
- description: string;
217
- key: string;
218
- };
219
-
220
- /** @internal */
221
- export const Python$outboundSchema: z.ZodType<
222
- Python$Outbound,
223
- z.ZodTypeDef,
224
- Python
225
- > = z.object({
226
- guardrailConfig: z.any().optional(),
227
- outputType: OutputType$outboundSchema.optional(),
228
- code: z.string(),
229
- type: RequestBodyType$outboundSchema,
230
- path: z.string().optional(),
231
- projectId: z.string().optional(),
232
- description: z.string().default(""),
233
- key: z.string(),
234
- }).transform((v) => {
235
- return remap$(v, {
236
- guardrailConfig: "guardrail_config",
237
- outputType: "output_type",
238
- projectId: "project_id",
239
- });
240
- });
241
-
242
- export function pythonToJSON(python: Python): string {
243
- return JSON.stringify(Python$outboundSchema.parse(python));
244
- }
245
-
246
- /** @internal */
247
- export const OneOutputType$outboundSchema: z.ZodNativeEnum<
248
- typeof OneOutputType
249
- > = z.nativeEnum(OneOutputType);
250
-
251
- /** @internal */
252
- export const OneType$outboundSchema: z.ZodNativeEnum<typeof OneType> = z
253
- .nativeEnum(OneType);
254
-
255
- /** @internal */
256
- export type OneCategoricalLabels$Outbound = {
257
- value: string;
258
- description?: string | undefined;
259
- };
260
-
261
- /** @internal */
262
- export const OneCategoricalLabels$outboundSchema: z.ZodType<
263
- OneCategoricalLabels$Outbound,
264
- z.ZodTypeDef,
265
- OneCategoricalLabels
266
- > = z.object({
267
- value: z.string(),
268
- description: z.string().optional(),
269
- });
270
-
271
- export function oneCategoricalLabelsToJSON(
272
- oneCategoricalLabels: OneCategoricalLabels,
273
- ): string {
274
- return JSON.stringify(
275
- OneCategoricalLabels$outboundSchema.parse(oneCategoricalLabels),
276
- );
277
- }
278
-
279
- /** @internal */
280
- export type CreateEval1Retry$Outbound = {
281
- count: number;
282
- on_codes?: Array<number> | undefined;
283
- };
284
-
285
- /** @internal */
286
- export const CreateEval1Retry$outboundSchema: z.ZodType<
287
- CreateEval1Retry$Outbound,
288
- z.ZodTypeDef,
289
- CreateEval1Retry
290
- > = z.object({
291
- count: z.number().int().default(2),
292
- onCodes: z.array(z.number().int()).optional(),
293
- }).transform((v) => {
294
- return remap$(v, {
295
- onCodes: "on_codes",
296
- });
297
- });
298
-
299
- export function createEval1RetryToJSON(
300
- createEval1Retry: CreateEval1Retry,
301
- ): string {
302
- return JSON.stringify(
303
- CreateEval1Retry$outboundSchema.parse(createEval1Retry),
304
- );
305
- }
306
-
307
- /** @internal */
308
- export type CreateEval1Fallbacks$Outbound = {
309
- model: string;
310
- };
7
+ export type CreateEvalRequestBody = {};
311
8
 
312
9
  /** @internal */
313
- export const CreateEval1Fallbacks$outboundSchema: z.ZodType<
314
- CreateEval1Fallbacks$Outbound,
315
- z.ZodTypeDef,
316
- CreateEval1Fallbacks
317
- > = z.object({
318
- model: z.string(),
319
- });
320
-
321
- export function createEval1FallbacksToJSON(
322
- createEval1Fallbacks: CreateEval1Fallbacks,
323
- ): string {
324
- return JSON.stringify(
325
- CreateEval1Fallbacks$outboundSchema.parse(createEval1Fallbacks),
326
- );
327
- }
328
-
329
- /** @internal */
330
- export type OneJudges$Outbound = {
331
- model: string;
332
- retry?: CreateEval1Retry$Outbound | undefined;
333
- fallbacks?: Array<CreateEval1Fallbacks$Outbound> | undefined;
334
- };
335
-
336
- /** @internal */
337
- export const OneJudges$outboundSchema: z.ZodType<
338
- OneJudges$Outbound,
339
- z.ZodTypeDef,
340
- OneJudges
341
- > = z.object({
342
- model: z.string(),
343
- retry: z.lazy(() => CreateEval1Retry$outboundSchema).optional(),
344
- fallbacks: z.array(z.lazy(() => CreateEval1Fallbacks$outboundSchema))
345
- .optional(),
346
- });
347
-
348
- export function oneJudgesToJSON(oneJudges: OneJudges): string {
349
- return JSON.stringify(OneJudges$outboundSchema.parse(oneJudges));
350
- }
351
-
352
- /** @internal */
353
- export type OneRetry$Outbound = {
354
- count: number;
355
- on_codes?: Array<number> | undefined;
356
- };
357
-
358
- /** @internal */
359
- export const OneRetry$outboundSchema: z.ZodType<
360
- OneRetry$Outbound,
361
- z.ZodTypeDef,
362
- OneRetry
363
- > = z.object({
364
- count: z.number().int().default(2),
365
- onCodes: z.array(z.number().int()).optional(),
366
- }).transform((v) => {
367
- return remap$(v, {
368
- onCodes: "on_codes",
369
- });
370
- });
371
-
372
- export function oneRetryToJSON(oneRetry: OneRetry): string {
373
- return JSON.stringify(OneRetry$outboundSchema.parse(oneRetry));
374
- }
375
-
376
- /** @internal */
377
- export type OneFallbacks$Outbound = {
378
- model: string;
379
- };
380
-
381
- /** @internal */
382
- export const OneFallbacks$outboundSchema: z.ZodType<
383
- OneFallbacks$Outbound,
384
- z.ZodTypeDef,
385
- OneFallbacks
386
- > = z.object({
387
- model: z.string(),
388
- });
389
-
390
- export function oneFallbacksToJSON(oneFallbacks: OneFallbacks): string {
391
- return JSON.stringify(OneFallbacks$outboundSchema.parse(oneFallbacks));
392
- }
393
-
394
- /** @internal */
395
- export type OneReplacementJudges$Outbound = {
396
- model: string;
397
- retry?: OneRetry$Outbound | undefined;
398
- fallbacks?: Array<OneFallbacks$Outbound> | undefined;
399
- };
400
-
401
- /** @internal */
402
- export const OneReplacementJudges$outboundSchema: z.ZodType<
403
- OneReplacementJudges$Outbound,
404
- z.ZodTypeDef,
405
- OneReplacementJudges
406
- > = z.object({
407
- model: z.string(),
408
- retry: z.lazy(() => OneRetry$outboundSchema).optional(),
409
- fallbacks: z.array(z.lazy(() => OneFallbacks$outboundSchema)).optional(),
410
- });
411
-
412
- export function oneReplacementJudgesToJSON(
413
- oneReplacementJudges: OneReplacementJudges,
414
- ): string {
415
- return JSON.stringify(
416
- OneReplacementJudges$outboundSchema.parse(oneReplacementJudges),
417
- );
418
- }
419
-
420
- /** @internal */
421
- export const OneTieValue$outboundSchema: z.ZodNativeEnum<typeof OneTieValue> = z
422
- .nativeEnum(OneTieValue);
423
-
424
- /** @internal */
425
- export type OneJury$Outbound = {
426
- judges: Array<OneJudges$Outbound>;
427
- replacement_judges?: Array<OneReplacementJudges$Outbound> | undefined;
428
- min_successful_judges: number;
429
- tie_value: string;
430
- };
431
-
432
- /** @internal */
433
- export const OneJury$outboundSchema: z.ZodType<
434
- OneJury$Outbound,
435
- z.ZodTypeDef,
436
- OneJury
437
- > = z.object({
438
- judges: z.array(z.lazy(() => OneJudges$outboundSchema)),
439
- replacementJudges: z.array(z.lazy(() => OneReplacementJudges$outboundSchema))
440
- .optional(),
441
- minSuccessfulJudges: z.number().int().default(2),
442
- tieValue: OneTieValue$outboundSchema.default("Tie"),
443
- }).transform((v) => {
444
- return remap$(v, {
445
- replacementJudges: "replacement_judges",
446
- minSuccessfulJudges: "min_successful_judges",
447
- tieValue: "tie_value",
448
- });
449
- });
450
-
451
- export function oneJuryToJSON(oneJury: OneJury): string {
452
- return JSON.stringify(OneJury$outboundSchema.parse(oneJury));
453
- }
454
-
455
- /** @internal */
456
- export type LLMJury$Outbound = {
457
- guardrail_config?: any | undefined;
458
- output_type?: string | undefined;
459
- type: string;
460
- repetitions?: number | null | undefined;
461
- prompt: string;
462
- categories?: Array<string> | null | undefined;
463
- categorical_labels?: Array<OneCategoricalLabels$Outbound> | null | undefined;
464
- dataset_id?: string | null | undefined;
465
- path?: string | undefined;
466
- project_id?: string | undefined;
467
- description: string;
468
- key: string;
469
- mode: "jury";
470
- jury: OneJury$Outbound;
471
- };
472
-
473
- /** @internal */
474
- export const LLMJury$outboundSchema: z.ZodType<
475
- LLMJury$Outbound,
476
- z.ZodTypeDef,
477
- LLMJury
478
- > = z.object({
479
- guardrailConfig: z.any().optional(),
480
- outputType: OneOutputType$outboundSchema.optional(),
481
- type: OneType$outboundSchema,
482
- repetitions: z.nullable(z.number().int()).optional(),
483
- prompt: z.string(),
484
- categories: z.nullable(z.array(z.string())).optional(),
485
- categoricalLabels: z.nullable(
486
- z.array(z.lazy(() => OneCategoricalLabels$outboundSchema)),
487
- ).optional(),
488
- datasetId: z.nullable(z.string()).optional(),
489
- path: z.string().optional(),
490
- projectId: z.string().optional(),
491
- description: z.string().default(""),
492
- key: z.string(),
493
- mode: z.literal("jury"),
494
- jury: z.lazy(() => OneJury$outboundSchema),
495
- }).transform((v) => {
496
- return remap$(v, {
497
- guardrailConfig: "guardrail_config",
498
- outputType: "output_type",
499
- categoricalLabels: "categorical_labels",
500
- datasetId: "dataset_id",
501
- projectId: "project_id",
502
- });
503
- });
504
-
505
- export function llmJuryToJSON(llmJury: LLMJury): string {
506
- return JSON.stringify(LLMJury$outboundSchema.parse(llmJury));
507
- }
508
-
509
- /** @internal */
510
- export const CreateEval1OutputType$outboundSchema: z.ZodNativeEnum<
511
- typeof CreateEval1OutputType
512
- > = z.nativeEnum(CreateEval1OutputType);
513
-
514
- /** @internal */
515
- export const CreateEval1Type$outboundSchema: z.ZodNativeEnum<
516
- typeof CreateEval1Type
517
- > = z.nativeEnum(CreateEval1Type);
518
-
519
- /** @internal */
520
- export type CreateEval1CategoricalLabels$Outbound = {
521
- value: string;
522
- description?: string | undefined;
523
- };
524
-
525
- /** @internal */
526
- export const CreateEval1CategoricalLabels$outboundSchema: z.ZodType<
527
- CreateEval1CategoricalLabels$Outbound,
528
- z.ZodTypeDef,
529
- CreateEval1CategoricalLabels
530
- > = z.object({
531
- value: z.string(),
532
- description: z.string().optional(),
533
- });
534
-
535
- export function createEval1CategoricalLabelsToJSON(
536
- createEval1CategoricalLabels: CreateEval1CategoricalLabels,
537
- ): string {
538
- return JSON.stringify(
539
- CreateEval1CategoricalLabels$outboundSchema.parse(
540
- createEval1CategoricalLabels,
541
- ),
542
- );
543
- }
544
-
545
- /** @internal */
546
- export type Llm$Outbound = {
547
- guardrail_config?: any | undefined;
548
- output_type?: string | undefined;
549
- type: string;
550
- repetitions?: number | null | undefined;
551
- prompt: string;
552
- categories?: Array<string> | null | undefined;
553
- categorical_labels?:
554
- | Array<CreateEval1CategoricalLabels$Outbound>
555
- | null
556
- | undefined;
557
- dataset_id?: string | null | undefined;
558
- path?: string | undefined;
559
- project_id?: string | undefined;
560
- description: string;
561
- key: string;
562
- mode: "single";
563
- model: string;
564
- };
565
-
566
- /** @internal */
567
- export const Llm$outboundSchema: z.ZodType<Llm$Outbound, z.ZodTypeDef, Llm> = z
568
- .object({
569
- guardrailConfig: z.any().optional(),
570
- outputType: CreateEval1OutputType$outboundSchema.optional(),
571
- type: CreateEval1Type$outboundSchema,
572
- repetitions: z.nullable(z.number().int()).optional(),
573
- prompt: z.string(),
574
- categories: z.nullable(z.array(z.string())).optional(),
575
- categoricalLabels: z.nullable(
576
- z.array(z.lazy(() => CreateEval1CategoricalLabels$outboundSchema)),
577
- ).optional(),
578
- datasetId: z.nullable(z.string()).optional(),
579
- path: z.string().optional(),
580
- projectId: z.string().optional(),
581
- description: z.string().default(""),
582
- key: z.string(),
583
- mode: z.literal("single"),
584
- model: z.string(),
585
- }).transform((v) => {
586
- return remap$(v, {
587
- guardrailConfig: "guardrail_config",
588
- outputType: "output_type",
589
- categoricalLabels: "categorical_labels",
590
- datasetId: "dataset_id",
591
- projectId: "project_id",
592
- });
593
- });
594
-
595
- export function llmToJSON(llm: Llm): string {
596
- return JSON.stringify(Llm$outboundSchema.parse(llm));
597
- }
598
-
599
- /** @internal */
600
- export type RequestBody1$Outbound = Llm$Outbound | LLMJury$Outbound;
601
-
602
- /** @internal */
603
- export const RequestBody1$outboundSchema: z.ZodType<
604
- RequestBody1$Outbound,
605
- z.ZodTypeDef,
606
- RequestBody1
607
- > = z.union([
608
- z.lazy(() => Llm$outboundSchema),
609
- z.lazy(() => LLMJury$outboundSchema),
610
- ]);
611
-
612
- export function requestBody1ToJSON(requestBody1: RequestBody1): string {
613
- return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
614
- }
615
-
616
- /** @internal */
617
- export type CreateEvalRequestBody$Outbound =
618
- | Python$Outbound
619
- | Llm$Outbound
620
- | LLMJury$Outbound;
10
+ export type CreateEvalRequestBody$Outbound = {};
621
11
 
622
12
  /** @internal */
623
13
  export const CreateEvalRequestBody$outboundSchema: z.ZodType<
624
14
  CreateEvalRequestBody$Outbound,
625
15
  z.ZodTypeDef,
626
16
  CreateEvalRequestBody
627
- > = z.union([
628
- z.lazy(() => Python$outboundSchema),
629
- z.union([
630
- z.lazy(() => Llm$outboundSchema),
631
- z.lazy(() => LLMJury$outboundSchema),
632
- ]),
633
- ]);
17
+ > = z.object({});
634
18
 
635
19
  export function createEvalRequestBodyToJSON(
636
20
  createEvalRequestBody: CreateEvalRequestBody,
@@ -639,28 +23,3 @@ export function createEvalRequestBodyToJSON(
639
23
  CreateEvalRequestBody$outboundSchema.parse(createEvalRequestBody),
640
24
  );
641
25
  }
642
-
643
- /** @internal */
644
- export const CreateEvalResponseBody$inboundSchema: z.ZodType<
645
- CreateEvalResponseBody,
646
- z.ZodTypeDef,
647
- unknown
648
- > = z.union([
649
- components.EvaluatorResponseLlm$inboundSchema,
650
- components.EvaluatorResponseJsonSchema$inboundSchema,
651
- components.EvaluatorResponseHttp$inboundSchema,
652
- components.EvaluatorResponsePython$inboundSchema,
653
- components.EvaluatorResponseFunction$inboundSchema,
654
- components.EvaluatorResponseRagas$inboundSchema,
655
- components.EvaluatorResponseTypescript$inboundSchema,
656
- ]);
657
-
658
- export function createEvalResponseBodyFromJSON(
659
- jsonString: string,
660
- ): SafeParseResult<CreateEvalResponseBody, SDKValidationError> {
661
- return safeParse(
662
- jsonString,
663
- (x) => CreateEvalResponseBody$inboundSchema.parse(JSON.parse(x)),
664
- `Failed to parse 'CreateEvalResponseBody' from JSON`,
665
- );
666
- }