honeyhive 0.6.0 → 0.6.1

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 (124) hide show
  1. package/README.md +106 -52
  2. package/dist/models/components/createdatapointrequest.d.ts +1 -1
  3. package/dist/models/components/createdatasetrequest.d.ts +1 -1
  4. package/dist/models/components/createmodelevent.d.ts +71 -0
  5. package/dist/models/components/createmodelevent.js +125 -0
  6. package/dist/models/components/createrunrequest.d.ts +42 -0
  7. package/dist/models/components/createrunrequest.js +88 -0
  8. package/dist/models/components/createrunresponse.d.ts +6 -0
  9. package/dist/models/components/createrunresponse.js +52 -0
  10. package/dist/models/components/deleterunresponse.d.ts +5 -0
  11. package/dist/models/components/deleterunresponse.js +50 -0
  12. package/dist/models/components/evaluationrun.d.ts +50 -0
  13. package/dist/models/components/evaluationrun.js +116 -0
  14. package/dist/models/components/event.d.ts +1 -1
  15. package/dist/models/components/getrunresponse.d.ts +5 -0
  16. package/dist/models/components/getrunresponse.js +47 -0
  17. package/dist/models/components/getrunsresponse.d.ts +5 -0
  18. package/dist/models/components/getrunsresponse.js +47 -0
  19. package/dist/models/components/index.d.ts +9 -0
  20. package/dist/models/components/index.js +9 -0
  21. package/dist/models/components/postconfigurationrequest.d.ts +1 -1
  22. package/dist/models/components/putconfigurationrequest.d.ts +1 -1
  23. package/dist/models/components/updaterunrequest.d.ts +32 -0
  24. package/dist/models/components/updaterunrequest.js +80 -0
  25. package/dist/models/components/updaterunresponse.d.ts +11 -0
  26. package/dist/models/components/updaterunresponse.js +50 -0
  27. package/dist/models/errors/createeventbatch.d.ts +14 -0
  28. package/dist/models/errors/createeventbatch.js +70 -0
  29. package/dist/models/errors/createmodeleventbatch.d.ts +14 -0
  30. package/dist/models/errors/createmodeleventbatch.js +70 -0
  31. package/dist/models/errors/index.d.ts +2 -0
  32. package/dist/models/errors/index.js +2 -0
  33. package/dist/models/operations/adddatapoints.d.ts +68 -0
  34. package/dist/models/operations/adddatapoints.js +143 -0
  35. package/dist/models/operations/createeventbatch.d.ts +36 -0
  36. package/dist/models/operations/createeventbatch.js +125 -0
  37. package/dist/models/operations/createmodelevent.d.ts +31 -0
  38. package/dist/models/operations/createmodelevent.js +115 -0
  39. package/dist/models/operations/createmodeleventbatch.d.ts +31 -0
  40. package/dist/models/operations/createmodeleventbatch.js +115 -0
  41. package/dist/models/operations/createrun.d.ts +21 -0
  42. package/dist/models/operations/createrun.js +79 -0
  43. package/dist/models/operations/deleterun.d.ts +24 -0
  44. package/dist/models/operations/deleterun.js +91 -0
  45. package/dist/models/operations/getconfigurations.d.ts +1 -1
  46. package/dist/models/operations/getconfigurations.js +2 -2
  47. package/dist/models/operations/getdatapoints.d.ts +1 -1
  48. package/dist/models/operations/getdatasets.d.ts +1 -1
  49. package/dist/models/operations/getevents.d.ts +1 -1
  50. package/dist/models/operations/getrun.d.ts +24 -0
  51. package/dist/models/operations/getrun.js +91 -0
  52. package/dist/models/operations/getruns.d.ts +24 -0
  53. package/dist/models/operations/getruns.js +91 -0
  54. package/dist/models/operations/index.d.ts +9 -0
  55. package/dist/models/operations/index.js +9 -0
  56. package/dist/models/operations/updaterun.d.ts +25 -0
  57. package/dist/models/operations/updaterun.js +95 -0
  58. package/dist/sdk/configurations.d.ts +1 -1
  59. package/dist/sdk/configurations.js +2 -2
  60. package/dist/sdk/datasets.d.ts +4 -0
  61. package/dist/sdk/datasets.js +74 -0
  62. package/dist/sdk/events.d.ts +21 -0
  63. package/dist/sdk/events.js +248 -0
  64. package/dist/sdk/runs.d.ts +28 -0
  65. package/dist/sdk/runs.js +439 -0
  66. package/dist/sdk/sdk.d.ts +2 -0
  67. package/dist/sdk/sdk.js +5 -3
  68. package/dist/sdk/tracer.d.ts +6 -1
  69. package/dist/sdk/tracer.js +44 -19
  70. package/docs/models/components/createdatapointrequest.md +1 -1
  71. package/docs/models/components/createdatasetrequest.md +1 -1
  72. package/docs/models/components/createmodelevent.md +24 -0
  73. package/docs/models/components/createrunrequest.md +15 -0
  74. package/docs/models/components/createrunresponse.md +9 -0
  75. package/docs/models/components/deleterunresponse.md +9 -0
  76. package/docs/models/components/evaluationrun.md +18 -0
  77. package/docs/models/components/evaluationrunstatus.md +9 -0
  78. package/docs/models/components/event.md +1 -1
  79. package/docs/models/components/getrunresponse.md +8 -0
  80. package/docs/models/components/getrunsresponse.md +8 -0
  81. package/docs/models/components/postconfigurationrequest.md +1 -1
  82. package/docs/models/components/putconfigurationrequest.md +1 -1
  83. package/docs/models/components/results.md +9 -0
  84. package/docs/models/components/status.md +11 -0
  85. package/docs/models/components/updaterunrequest.md +14 -0
  86. package/docs/models/components/updaterunrequeststatus.md +9 -0
  87. package/docs/models/components/updaterunresponse.md +9 -0
  88. package/docs/models/errors/createeventbatchresponsebody.md +13 -0
  89. package/docs/models/errors/createmodeleventbatchresponsebody.md +13 -0
  90. package/docs/models/operations/adddatapointsrequest.md +9 -0
  91. package/docs/models/operations/adddatapointsrequestbody.md +10 -0
  92. package/docs/models/operations/adddatapointsresponse.md +11 -0
  93. package/docs/models/operations/adddatapointsresponsebody.md +11 -0
  94. package/docs/models/operations/createeventbatchrequestbody.md +9 -0
  95. package/docs/models/operations/createeventbatchresponse.md +11 -0
  96. package/docs/models/operations/createeventbatchresponsebody.md +12 -0
  97. package/docs/models/operations/createmodeleventbatchrequestbody.md +8 -0
  98. package/docs/models/operations/createmodeleventbatchresponse.md +11 -0
  99. package/docs/models/operations/createmodeleventbatchresponsebody.md +11 -0
  100. package/docs/models/operations/createmodeleventrequestbody.md +8 -0
  101. package/docs/models/operations/createmodeleventresponse.md +11 -0
  102. package/docs/models/operations/createmodeleventresponsebody.md +11 -0
  103. package/docs/models/operations/createrunresponse.md +11 -0
  104. package/docs/models/operations/deleterunrequest.md +8 -0
  105. package/docs/models/operations/deleterunresponse.md +11 -0
  106. package/docs/models/operations/getconfigurationsrequest.md +1 -1
  107. package/docs/models/operations/getdatapointsrequest.md +1 -1
  108. package/docs/models/operations/getdatasetsrequest.md +1 -1
  109. package/docs/models/operations/geteventsrequestbody.md +7 -7
  110. package/docs/models/operations/getrunrequest.md +8 -0
  111. package/docs/models/operations/getrunresponse.md +11 -0
  112. package/docs/models/operations/getrunsrequest.md +8 -0
  113. package/docs/models/operations/getrunsresponse.md +11 -0
  114. package/docs/models/operations/getsessionresponse.md +6 -6
  115. package/docs/models/operations/mapping.md +12 -0
  116. package/docs/models/operations/updateconfigurationrequest.md +4 -4
  117. package/docs/models/operations/updaterunrequest.md +9 -0
  118. package/docs/models/operations/updaterunresponse.md +11 -0
  119. package/docs/sdks/configurations/README.md +9 -9
  120. package/docs/sdks/datapoints/README.md +2 -2
  121. package/docs/sdks/datasets/README.md +65 -2
  122. package/docs/sdks/events/README.md +326 -0
  123. package/docs/sdks/runs/README.md +255 -0
  124. package/package.json +1 -1
package/README.md CHANGED
@@ -102,6 +102,9 @@ run();
102
102
  * [createEvent](docs/sdks/events/README.md#createevent) - Create a new event
103
103
  * [updateEvent](docs/sdks/events/README.md#updateevent) - Update an event
104
104
  * [getEvents](docs/sdks/events/README.md#getevents) - Retrieve events based on filters
105
+ * [createModelEvent](docs/sdks/events/README.md#createmodelevent) - Create a new model event
106
+ * [createEventBatch](docs/sdks/events/README.md#createeventbatch) - Create a batch of events
107
+ * [createModelEventBatch](docs/sdks/events/README.md#createmodeleventbatch) - Create a batch of model events
105
108
 
106
109
  ### [metrics](docs/sdks/metrics/README.md)
107
110
 
@@ -131,6 +134,7 @@ run();
131
134
  * [createDataset](docs/sdks/datasets/README.md#createdataset) - Create a dataset
132
135
  * [updateDataset](docs/sdks/datasets/README.md#updatedataset) - Update a dataset
133
136
  * [deleteDataset](docs/sdks/datasets/README.md#deletedataset) - Delete a dataset
137
+ * [addDatapoints](docs/sdks/datasets/README.md#adddatapoints) - Add datapoints to a dataset
134
138
 
135
139
  ### [projects](docs/sdks/projects/README.md)
136
140
 
@@ -139,6 +143,14 @@ run();
139
143
  * [updateProject](docs/sdks/projects/README.md#updateproject) - Update an existing project
140
144
  * [deleteProject](docs/sdks/projects/README.md#deleteproject) - Delete a project
141
145
 
146
+ ### [runs](docs/sdks/runs/README.md)
147
+
148
+ * [createRun](docs/sdks/runs/README.md#createrun) - Create a new evaluation run
149
+ * [getRuns](docs/sdks/runs/README.md#getruns) - Get a list of evaluation runs
150
+ * [getRun](docs/sdks/runs/README.md#getrun) - Get details of an evaluation run
151
+ * [updateRun](docs/sdks/runs/README.md#updaterun) - Update an evaluation run
152
+ * [deleteRun](docs/sdks/runs/README.md#deleterun) - Delete an evaluation run
153
+
142
154
  ### [configurations](docs/sdks/configurations/README.md)
143
155
 
144
156
  * [getConfigurations](docs/sdks/configurations/README.md#getconfigurations) - Retrieve a list of configurations
@@ -152,14 +164,16 @@ run();
152
164
 
153
165
  Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
154
166
 
155
- | Error Object | Status Code | Content Type |
156
- | --------------- | --------------- | --------------- |
157
- | errors.SDKError | 4xx-5xx | */* |
167
+ | Error Object | Status Code | Content Type |
168
+ | ----------------------------------- | ----------------------------------- | ----------------------------------- |
169
+ | errors.CreateEventBatchResponseBody | 500 | application/json |
170
+ | errors.SDKError | 4xx-5xx | */* |
158
171
 
159
172
  Example
160
173
 
161
174
  ```typescript
162
175
  import { HoneyHive } from "honeyhive";
176
+ import { CreateEventRequestEventType } from "honeyhive/dist/models/components";
163
177
 
164
178
  async function run() {
165
179
  const sdk = new HoneyHive({
@@ -169,58 +183,98 @@ async function run() {
169
183
 
170
184
  let res;
171
185
  try {
172
- res = await sdk.session.startSession({
173
- session: {
174
- project: "Simple RAG Project",
175
- sessionName: "Playground Session",
176
- source: "playground",
177
- sessionId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
178
- childrenIds: [
179
- "7f22137a-6911-4ed3-bc36-110f1dde6b66",
180
- ],
181
- config: {
182
- "key": "<value>",
183
- },
184
- inputs: {
185
- "context": "Hello world",
186
- "question": "What is in the context?",
187
- "chat_history": [
188
- {
189
- "role": "system",
190
- "content": "Answer the user's question only using provided context.
191
-
192
- Context: Hello world",
193
- },
194
- {
195
- "role": "user",
196
- "content": "What is in the context?",
197
- },
186
+ res = await sdk.events.createEventBatch({
187
+ events: [
188
+ {
189
+ project: "Simple RAG",
190
+ source: "playground",
191
+ eventName: "Model Completion",
192
+ eventType: CreateEventRequestEventType.Model,
193
+ eventId: "7f22137a-6911-4ed3-bc36-110f1dde6b66",
194
+ sessionId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
195
+ parentId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
196
+ childrenIds: [
197
+ "<value>",
198
198
  ],
199
- },
200
- outputs: {
201
- "role": "assistant",
202
- "content": "Hello world",
203
- },
204
- error: null,
205
- duration: 824.8056,
206
- userProperties: {
207
- "user": "google-oauth2|111840237613341303366",
208
- },
209
- metrics: {
210
-
211
- },
212
- feedback: {
213
-
214
- },
215
- metadata: {
216
-
217
- },
218
- startTime: 1712025501605,
219
- endTime: 1712025499832,
220
- },
199
+ config: {
200
+ "model": "gpt-3.5-turbo",
201
+ "version": "v0.1",
202
+ "provider": "openai",
203
+ "hyperparameters": {
204
+ "temperature": 0,
205
+ "top_p": 1,
206
+ "max_tokens": 1000,
207
+ "presence_penalty": 0,
208
+ "frequency_penalty": 0,
209
+ "stop": [
210
+ "<value>",
211
+ ],
212
+ "n": 1,
213
+ },
214
+ "template": [
215
+ {
216
+ "role": "system",
217
+ "content": "Answer the user's question only using provided context.
218
+
219
+ Context: {{ context }}",
220
+ },
221
+ {
222
+ "role": "user",
223
+ "content": "{{question}}",
224
+ },
225
+ ],
226
+ "type": "chat",
227
+ },
228
+ inputs: {
229
+ "context": "Hello world",
230
+ "question": "What is in the context?",
231
+ "chat_history": [
232
+ {
233
+ "role": "system",
234
+ "content": "Answer the user's question only using provided context.
235
+
236
+ Context: Hello world",
237
+ },
238
+ {
239
+ "role": "user",
240
+ "content": "What is in the context?",
241
+ },
242
+ ],
243
+ },
244
+ outputs: {
245
+ "role": "assistant",
246
+ "content": "Hello world",
247
+ },
248
+ error: null,
249
+ startTime: 1714978764301,
250
+ endTime: 1714978765301,
251
+ duration: 999.8056,
252
+ metadata: {
253
+ "cost": 0.00008,
254
+ "completion_tokens": 23,
255
+ "prompt_tokens": 35,
256
+ "total_tokens": 58,
257
+ },
258
+ feedback: {
259
+
260
+ },
261
+ metrics: {
262
+ "Answer Faithfulness": 5,
263
+ "Answer Faithfulness_explanation": "The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.",
264
+ "Number of words": 18,
265
+ },
266
+ userProperties: {
267
+ "user": "google-oauth2|111840237613341303366",
268
+ },
269
+ },
270
+ ],
221
271
  });
222
272
  } catch (err) {
223
- if (err instanceof errors.SDKError) {
273
+ if (err instanceof errors.CreateEventBatchResponseBody) {
274
+ console.error(err) // handle exception
275
+ throw err;
276
+ }
277
+ else if (err instanceof errors.SDKError) {
224
278
  console.error(err) // handle exception
225
279
  throw err;
226
280
  }
@@ -1,7 +1,7 @@
1
1
  import { SpeakeasyBase } from "../../internal/utils";
2
2
  export declare class CreateDatapointRequest extends SpeakeasyBase {
3
3
  /**
4
- * UUID for the project to which the datapoint belongs
4
+ * Name for the project to which the datapoint belongs
5
5
  */
6
6
  project: string;
7
7
  /**
@@ -15,7 +15,7 @@ export declare enum CreateDatasetRequestPipelineType {
15
15
  }
16
16
  export declare class CreateDatasetRequest extends SpeakeasyBase {
17
17
  /**
18
- * UUID of the project associated with this dataset like `65e0fc2d6a2eb95f55a92cbc`
18
+ * Name of the project associated with this dataset like `New Project`
19
19
  */
20
20
  project: string;
21
21
  /**
@@ -0,0 +1,71 @@
1
+ import { SpeakeasyBase } from "../../internal/utils";
2
+ export declare class CreateModelEvent extends SpeakeasyBase {
3
+ /**
4
+ * Project associated with the event
5
+ */
6
+ project: string;
7
+ /**
8
+ * Model name
9
+ */
10
+ model: string;
11
+ /**
12
+ * Model provider
13
+ */
14
+ provider: string;
15
+ /**
16
+ * Messages passed to the model
17
+ */
18
+ messages: Record<string, any>[];
19
+ /**
20
+ * Final output JSON of the event
21
+ */
22
+ response: Record<string, any>;
23
+ /**
24
+ * How long the event took in milliseconds
25
+ */
26
+ duration: number;
27
+ /**
28
+ * Usage statistics of the model
29
+ */
30
+ usage: Record<string, any>;
31
+ /**
32
+ * Cost of the model completion
33
+ */
34
+ cost?: number;
35
+ /**
36
+ * Any error description if event failed
37
+ */
38
+ error?: string;
39
+ /**
40
+ * Source of the event - production, staging, etc
41
+ */
42
+ source?: string;
43
+ /**
44
+ * Name of the event
45
+ */
46
+ eventName?: string;
47
+ /**
48
+ * Hyperparameters used for the model
49
+ */
50
+ hyperparameters?: Record<string, any>;
51
+ /**
52
+ * Template used for the model
53
+ */
54
+ template?: Record<string, any>[];
55
+ /**
56
+ * Inputs for the template
57
+ */
58
+ templateInputs?: Record<string, any>;
59
+ /**
60
+ * Tools used for the model
61
+ */
62
+ tools?: Record<string, any>[];
63
+ /**
64
+ * Tool choice for the model
65
+ */
66
+ toolChoice?: string;
67
+ /**
68
+ * Response format for the model
69
+ */
70
+ responseFormat?: Record<string, any>;
71
+ }
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __extends = (this && this.__extends) || (function () {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics = Object.setPrototypeOf ||
8
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10
+ return extendStatics(d, b);
11
+ };
12
+ return function (d, b) {
13
+ if (typeof b !== "function" && b !== null)
14
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
15
+ extendStatics(d, b);
16
+ function __() { this.constructor = d; }
17
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
+ };
19
+ })();
20
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ var __metadata = (this && this.__metadata) || function (k, v) {
27
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.CreateModelEvent = void 0;
31
+ var utils_1 = require("../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ var CreateModelEvent = /** @class */ (function (_super) {
34
+ __extends(CreateModelEvent, _super);
35
+ function CreateModelEvent() {
36
+ return _super !== null && _super.apply(this, arguments) || this;
37
+ }
38
+ __decorate([
39
+ (0, utils_1.SpeakeasyMetadata)(),
40
+ (0, class_transformer_1.Expose)({ name: "project" }),
41
+ __metadata("design:type", String)
42
+ ], CreateModelEvent.prototype, "project", void 0);
43
+ __decorate([
44
+ (0, utils_1.SpeakeasyMetadata)(),
45
+ (0, class_transformer_1.Expose)({ name: "model" }),
46
+ __metadata("design:type", String)
47
+ ], CreateModelEvent.prototype, "model", void 0);
48
+ __decorate([
49
+ (0, utils_1.SpeakeasyMetadata)(),
50
+ (0, class_transformer_1.Expose)({ name: "provider" }),
51
+ __metadata("design:type", String)
52
+ ], CreateModelEvent.prototype, "provider", void 0);
53
+ __decorate([
54
+ (0, utils_1.SpeakeasyMetadata)(),
55
+ (0, class_transformer_1.Expose)({ name: "messages" }),
56
+ __metadata("design:type", Array)
57
+ ], CreateModelEvent.prototype, "messages", void 0);
58
+ __decorate([
59
+ (0, utils_1.SpeakeasyMetadata)(),
60
+ (0, class_transformer_1.Expose)({ name: "response" }),
61
+ __metadata("design:type", Object)
62
+ ], CreateModelEvent.prototype, "response", void 0);
63
+ __decorate([
64
+ (0, utils_1.SpeakeasyMetadata)(),
65
+ (0, class_transformer_1.Expose)({ name: "duration" }),
66
+ __metadata("design:type", Number)
67
+ ], CreateModelEvent.prototype, "duration", void 0);
68
+ __decorate([
69
+ (0, utils_1.SpeakeasyMetadata)(),
70
+ (0, class_transformer_1.Expose)({ name: "usage" }),
71
+ __metadata("design:type", Object)
72
+ ], CreateModelEvent.prototype, "usage", void 0);
73
+ __decorate([
74
+ (0, utils_1.SpeakeasyMetadata)(),
75
+ (0, class_transformer_1.Expose)({ name: "cost" }),
76
+ __metadata("design:type", Number)
77
+ ], CreateModelEvent.prototype, "cost", void 0);
78
+ __decorate([
79
+ (0, utils_1.SpeakeasyMetadata)(),
80
+ (0, class_transformer_1.Expose)({ name: "error" }),
81
+ __metadata("design:type", String)
82
+ ], CreateModelEvent.prototype, "error", void 0);
83
+ __decorate([
84
+ (0, utils_1.SpeakeasyMetadata)(),
85
+ (0, class_transformer_1.Expose)({ name: "source" }),
86
+ __metadata("design:type", String)
87
+ ], CreateModelEvent.prototype, "source", void 0);
88
+ __decorate([
89
+ (0, utils_1.SpeakeasyMetadata)(),
90
+ (0, class_transformer_1.Expose)({ name: "event_name" }),
91
+ __metadata("design:type", String)
92
+ ], CreateModelEvent.prototype, "eventName", void 0);
93
+ __decorate([
94
+ (0, utils_1.SpeakeasyMetadata)(),
95
+ (0, class_transformer_1.Expose)({ name: "hyperparameters" }),
96
+ __metadata("design:type", Object)
97
+ ], CreateModelEvent.prototype, "hyperparameters", void 0);
98
+ __decorate([
99
+ (0, utils_1.SpeakeasyMetadata)(),
100
+ (0, class_transformer_1.Expose)({ name: "template" }),
101
+ __metadata("design:type", Array)
102
+ ], CreateModelEvent.prototype, "template", void 0);
103
+ __decorate([
104
+ (0, utils_1.SpeakeasyMetadata)(),
105
+ (0, class_transformer_1.Expose)({ name: "template_inputs" }),
106
+ __metadata("design:type", Object)
107
+ ], CreateModelEvent.prototype, "templateInputs", void 0);
108
+ __decorate([
109
+ (0, utils_1.SpeakeasyMetadata)(),
110
+ (0, class_transformer_1.Expose)({ name: "tools" }),
111
+ __metadata("design:type", Array)
112
+ ], CreateModelEvent.prototype, "tools", void 0);
113
+ __decorate([
114
+ (0, utils_1.SpeakeasyMetadata)(),
115
+ (0, class_transformer_1.Expose)({ name: "tool_choice" }),
116
+ __metadata("design:type", String)
117
+ ], CreateModelEvent.prototype, "toolChoice", void 0);
118
+ __decorate([
119
+ (0, utils_1.SpeakeasyMetadata)(),
120
+ (0, class_transformer_1.Expose)({ name: "response_format" }),
121
+ __metadata("design:type", Object)
122
+ ], CreateModelEvent.prototype, "responseFormat", void 0);
123
+ return CreateModelEvent;
124
+ }(utils_1.SpeakeasyBase));
125
+ exports.CreateModelEvent = CreateModelEvent;
@@ -0,0 +1,42 @@
1
+ import { SpeakeasyBase } from "../../internal/utils";
2
+ /**
3
+ * The status of the run
4
+ */
5
+ export declare enum Status {
6
+ Pending = "pending",
7
+ Completed = "completed"
8
+ }
9
+ export declare class CreateRunRequest extends SpeakeasyBase {
10
+ /**
11
+ * The UUID of the project this run is associated with
12
+ */
13
+ project: string;
14
+ /**
15
+ * The name of the run to be displayed
16
+ */
17
+ name: string;
18
+ /**
19
+ * The UUIDs of the sessions/events this run is associated with
20
+ */
21
+ eventIds: string[];
22
+ /**
23
+ * The UUID of the dataset this run is associated with
24
+ */
25
+ datasetId?: string;
26
+ /**
27
+ * The UUIDs of the datapoints from the original dataset this run is associated with
28
+ */
29
+ datapointIds?: string[];
30
+ /**
31
+ * The configuration being used for this run
32
+ */
33
+ configuration?: Record<string, any>;
34
+ /**
35
+ * Additional metadata for the run
36
+ */
37
+ metadata?: Record<string, any>;
38
+ /**
39
+ * The status of the run
40
+ */
41
+ status?: Status;
42
+ }
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __extends = (this && this.__extends) || (function () {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics = Object.setPrototypeOf ||
8
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10
+ return extendStatics(d, b);
11
+ };
12
+ return function (d, b) {
13
+ if (typeof b !== "function" && b !== null)
14
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
15
+ extendStatics(d, b);
16
+ function __() { this.constructor = d; }
17
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
+ };
19
+ })();
20
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ var __metadata = (this && this.__metadata) || function (k, v) {
27
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.CreateRunRequest = exports.Status = void 0;
31
+ var utils_1 = require("../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ /**
34
+ * The status of the run
35
+ */
36
+ var Status;
37
+ (function (Status) {
38
+ Status["Pending"] = "pending";
39
+ Status["Completed"] = "completed";
40
+ })(Status = exports.Status || (exports.Status = {}));
41
+ var CreateRunRequest = /** @class */ (function (_super) {
42
+ __extends(CreateRunRequest, _super);
43
+ function CreateRunRequest() {
44
+ return _super !== null && _super.apply(this, arguments) || this;
45
+ }
46
+ __decorate([
47
+ (0, utils_1.SpeakeasyMetadata)(),
48
+ (0, class_transformer_1.Expose)({ name: "project" }),
49
+ __metadata("design:type", String)
50
+ ], CreateRunRequest.prototype, "project", void 0);
51
+ __decorate([
52
+ (0, utils_1.SpeakeasyMetadata)(),
53
+ (0, class_transformer_1.Expose)({ name: "name" }),
54
+ __metadata("design:type", String)
55
+ ], CreateRunRequest.prototype, "name", void 0);
56
+ __decorate([
57
+ (0, utils_1.SpeakeasyMetadata)(),
58
+ (0, class_transformer_1.Expose)({ name: "event_ids" }),
59
+ __metadata("design:type", Array)
60
+ ], CreateRunRequest.prototype, "eventIds", void 0);
61
+ __decorate([
62
+ (0, utils_1.SpeakeasyMetadata)(),
63
+ (0, class_transformer_1.Expose)({ name: "dataset_id" }),
64
+ __metadata("design:type", String)
65
+ ], CreateRunRequest.prototype, "datasetId", void 0);
66
+ __decorate([
67
+ (0, utils_1.SpeakeasyMetadata)(),
68
+ (0, class_transformer_1.Expose)({ name: "datapoint_ids" }),
69
+ __metadata("design:type", Array)
70
+ ], CreateRunRequest.prototype, "datapointIds", void 0);
71
+ __decorate([
72
+ (0, utils_1.SpeakeasyMetadata)(),
73
+ (0, class_transformer_1.Expose)({ name: "configuration" }),
74
+ __metadata("design:type", Object)
75
+ ], CreateRunRequest.prototype, "configuration", void 0);
76
+ __decorate([
77
+ (0, utils_1.SpeakeasyMetadata)(),
78
+ (0, class_transformer_1.Expose)({ name: "metadata" }),
79
+ __metadata("design:type", Object)
80
+ ], CreateRunRequest.prototype, "metadata", void 0);
81
+ __decorate([
82
+ (0, utils_1.SpeakeasyMetadata)(),
83
+ (0, class_transformer_1.Expose)({ name: "status" }),
84
+ __metadata("design:type", String)
85
+ ], CreateRunRequest.prototype, "status", void 0);
86
+ return CreateRunRequest;
87
+ }(utils_1.SpeakeasyBase));
88
+ exports.CreateRunRequest = CreateRunRequest;
@@ -0,0 +1,6 @@
1
+ import { SpeakeasyBase } from "../../internal/utils";
2
+ import { EvaluationRun } from "./evaluationrun";
3
+ export declare class CreateRunResponse extends SpeakeasyBase {
4
+ evaluation?: EvaluationRun;
5
+ runId?: string;
6
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __extends = (this && this.__extends) || (function () {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics = Object.setPrototypeOf ||
8
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10
+ return extendStatics(d, b);
11
+ };
12
+ return function (d, b) {
13
+ if (typeof b !== "function" && b !== null)
14
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
15
+ extendStatics(d, b);
16
+ function __() { this.constructor = d; }
17
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
+ };
19
+ })();
20
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ var __metadata = (this && this.__metadata) || function (k, v) {
27
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.CreateRunResponse = void 0;
31
+ var utils_1 = require("../../internal/utils");
32
+ var evaluationrun_1 = require("./evaluationrun");
33
+ var class_transformer_1 = require("class-transformer");
34
+ var CreateRunResponse = /** @class */ (function (_super) {
35
+ __extends(CreateRunResponse, _super);
36
+ function CreateRunResponse() {
37
+ return _super !== null && _super.apply(this, arguments) || this;
38
+ }
39
+ __decorate([
40
+ (0, utils_1.SpeakeasyMetadata)(),
41
+ (0, class_transformer_1.Expose)({ name: "evaluation" }),
42
+ (0, class_transformer_1.Type)(function () { return evaluationrun_1.EvaluationRun; }),
43
+ __metadata("design:type", evaluationrun_1.EvaluationRun)
44
+ ], CreateRunResponse.prototype, "evaluation", void 0);
45
+ __decorate([
46
+ (0, utils_1.SpeakeasyMetadata)(),
47
+ (0, class_transformer_1.Expose)({ name: "run_id" }),
48
+ __metadata("design:type", String)
49
+ ], CreateRunResponse.prototype, "runId", void 0);
50
+ return CreateRunResponse;
51
+ }(utils_1.SpeakeasyBase));
52
+ exports.CreateRunResponse = CreateRunResponse;
@@ -0,0 +1,5 @@
1
+ import { SpeakeasyBase } from "../../internal/utils";
2
+ export declare class DeleteRunResponse extends SpeakeasyBase {
3
+ id?: string;
4
+ deleted?: boolean;
5
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __extends = (this && this.__extends) || (function () {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics = Object.setPrototypeOf ||
8
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10
+ return extendStatics(d, b);
11
+ };
12
+ return function (d, b) {
13
+ if (typeof b !== "function" && b !== null)
14
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
15
+ extendStatics(d, b);
16
+ function __() { this.constructor = d; }
17
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
+ };
19
+ })();
20
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ var __metadata = (this && this.__metadata) || function (k, v) {
27
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.DeleteRunResponse = void 0;
31
+ var utils_1 = require("../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ var DeleteRunResponse = /** @class */ (function (_super) {
34
+ __extends(DeleteRunResponse, _super);
35
+ function DeleteRunResponse() {
36
+ return _super !== null && _super.apply(this, arguments) || this;
37
+ }
38
+ __decorate([
39
+ (0, utils_1.SpeakeasyMetadata)(),
40
+ (0, class_transformer_1.Expose)({ name: "id" }),
41
+ __metadata("design:type", String)
42
+ ], DeleteRunResponse.prototype, "id", void 0);
43
+ __decorate([
44
+ (0, utils_1.SpeakeasyMetadata)(),
45
+ (0, class_transformer_1.Expose)({ name: "deleted" }),
46
+ __metadata("design:type", Boolean)
47
+ ], DeleteRunResponse.prototype, "deleted", void 0);
48
+ return DeleteRunResponse;
49
+ }(utils_1.SpeakeasyBase));
50
+ exports.DeleteRunResponse = DeleteRunResponse;