honeyhive 0.6.2 → 0.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.
@@ -1,11 +1,4 @@
1
1
  import { SpeakeasyBase } from "../../internal/utils";
2
- /**
3
- * Arbitrary JSON object containing the inputs for the datapoint
4
- */
5
- export declare class Inputs extends SpeakeasyBase {
6
- }
7
- export declare class History extends SpeakeasyBase {
8
- }
9
2
  export declare class Datapoint extends SpeakeasyBase {
10
3
  /**
11
4
  * UUID for the datapoint
@@ -21,11 +14,11 @@ export declare class Datapoint extends SpeakeasyBase {
21
14
  /**
22
15
  * Arbitrary JSON object containing the inputs for the datapoint
23
16
  */
24
- inputs?: Inputs;
17
+ inputs?: Record<string, any>;
25
18
  /**
26
19
  * Conversation history associated with the datapoint
27
20
  */
28
- history?: History[];
21
+ history?: Record<string, any>[];
29
22
  groundTruth?: Record<string, any>;
30
23
  /**
31
24
  * Event id for the event from which the datapoint was created
@@ -27,28 +27,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
27
27
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.Datapoint = exports.History = exports.Inputs = void 0;
30
+ exports.Datapoint = void 0;
31
31
  var utils_1 = require("../../internal/utils");
32
32
  var class_transformer_1 = require("class-transformer");
33
- /**
34
- * Arbitrary JSON object containing the inputs for the datapoint
35
- */
36
- var Inputs = /** @class */ (function (_super) {
37
- __extends(Inputs, _super);
38
- function Inputs() {
39
- return _super !== null && _super.apply(this, arguments) || this;
40
- }
41
- return Inputs;
42
- }(utils_1.SpeakeasyBase));
43
- exports.Inputs = Inputs;
44
- var History = /** @class */ (function (_super) {
45
- __extends(History, _super);
46
- function History() {
47
- return _super !== null && _super.apply(this, arguments) || this;
48
- }
49
- return History;
50
- }(utils_1.SpeakeasyBase));
51
- exports.History = History;
52
33
  var Datapoint = /** @class */ (function (_super) {
53
34
  __extends(Datapoint, _super);
54
35
  function Datapoint() {
@@ -90,13 +71,11 @@ var Datapoint = /** @class */ (function (_super) {
90
71
  __decorate([
91
72
  (0, utils_1.SpeakeasyMetadata)(),
92
73
  (0, class_transformer_1.Expose)({ name: "inputs" }),
93
- (0, class_transformer_1.Type)(function () { return Inputs; }),
94
- __metadata("design:type", Inputs)
74
+ __metadata("design:type", Object)
95
75
  ], Datapoint.prototype, "inputs", void 0);
96
76
  __decorate([
97
- (0, utils_1.SpeakeasyMetadata)({ elemType: History }),
77
+ (0, utils_1.SpeakeasyMetadata)(),
98
78
  (0, class_transformer_1.Expose)({ name: "history" }),
99
- (0, class_transformer_1.Type)(function () { return History; }),
100
79
  __metadata("design:type", Array)
101
80
  ], Datapoint.prototype, "history", void 0);
102
81
  __decorate([
@@ -1,6 +1,4 @@
1
1
  import { SpeakeasyBase } from "../../internal/utils";
2
- export declare class UpdateDatapointRequestHistory extends SpeakeasyBase {
3
- }
4
2
  export declare class UpdateDatapointRequest extends SpeakeasyBase {
5
3
  /**
6
4
  * Arbitrary JSON object containing the inputs for the datapoint
@@ -9,7 +7,7 @@ export declare class UpdateDatapointRequest extends SpeakeasyBase {
9
7
  /**
10
8
  * Conversation history associated with the datapoint
11
9
  */
12
- history?: UpdateDatapointRequestHistory[];
10
+ history?: Record<string, any>[];
13
11
  /**
14
12
  * Expected output JSON object for the datapoint
15
13
  */
@@ -27,17 +27,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
27
27
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.UpdateDatapointRequest = exports.UpdateDatapointRequestHistory = void 0;
30
+ exports.UpdateDatapointRequest = void 0;
31
31
  var utils_1 = require("../../internal/utils");
32
32
  var class_transformer_1 = require("class-transformer");
33
- var UpdateDatapointRequestHistory = /** @class */ (function (_super) {
34
- __extends(UpdateDatapointRequestHistory, _super);
35
- function UpdateDatapointRequestHistory() {
36
- return _super !== null && _super.apply(this, arguments) || this;
37
- }
38
- return UpdateDatapointRequestHistory;
39
- }(utils_1.SpeakeasyBase));
40
- exports.UpdateDatapointRequestHistory = UpdateDatapointRequestHistory;
41
33
  var UpdateDatapointRequest = /** @class */ (function (_super) {
42
34
  __extends(UpdateDatapointRequest, _super);
43
35
  function UpdateDatapointRequest() {
@@ -49,9 +41,8 @@ var UpdateDatapointRequest = /** @class */ (function (_super) {
49
41
  __metadata("design:type", Object)
50
42
  ], UpdateDatapointRequest.prototype, "inputs", void 0);
51
43
  __decorate([
52
- (0, utils_1.SpeakeasyMetadata)({ elemType: UpdateDatapointRequestHistory }),
44
+ (0, utils_1.SpeakeasyMetadata)(),
53
45
  (0, class_transformer_1.Expose)({ name: "history" }),
54
- (0, class_transformer_1.Type)(function () { return UpdateDatapointRequestHistory; }),
55
46
  __metadata("design:type", Array)
56
47
  ], UpdateDatapointRequest.prototype, "history", void 0);
57
48
  __decorate([
@@ -21,15 +21,15 @@ export declare class AddDatapointsRequestBody extends SpeakeasyBase {
21
21
  /**
22
22
  * Name of the project associated with this dataset like `New Project`
23
23
  */
24
- project?: string;
24
+ project: string;
25
25
  /**
26
26
  * List of JSON objects to be added as datapoints
27
27
  */
28
- data?: Record<string, any>[];
28
+ data: Record<string, any>[];
29
29
  /**
30
30
  * Mapping of keys in the data object to be used as inputs, ground truth, and history, everything else goes into metadata
31
31
  */
32
- mapping?: Mapping;
32
+ mapping: Mapping;
33
33
  }
34
34
  export declare class AddDatapointsRequest extends SpeakeasyBase {
35
35
  /**
@@ -2,7 +2,7 @@ import { SpeakeasyBase } from "../../internal/utils";
2
2
  import * as components from "../../models/components";
3
3
  import { AxiosResponse } from "axios";
4
4
  export declare class CreateModelEventRequestBody extends SpeakeasyBase {
5
- event?: components.CreateModelEvent;
5
+ modelEvent?: components.CreateModelEvent;
6
6
  }
7
7
  /**
8
8
  * Model event created
@@ -61,10 +61,10 @@ var CreateModelEventRequestBody = /** @class */ (function (_super) {
61
61
  }
62
62
  __decorate([
63
63
  (0, utils_1.SpeakeasyMetadata)(),
64
- (0, class_transformer_1.Expose)({ name: "event" }),
64
+ (0, class_transformer_1.Expose)({ name: "model_event" }),
65
65
  (0, class_transformer_1.Type)(function () { return components.CreateModelEvent; }),
66
66
  __metadata("design:type", components.CreateModelEvent)
67
- ], CreateModelEventRequestBody.prototype, "event", void 0);
67
+ ], CreateModelEventRequestBody.prototype, "modelEvent", void 0);
68
68
  return CreateModelEventRequestBody;
69
69
  }(utils_1.SpeakeasyBase));
70
70
  exports.CreateModelEventRequestBody = CreateModelEventRequestBody;
@@ -6,6 +6,9 @@ export declare class UpdateEventRequestBody extends SpeakeasyBase {
6
6
  feedback?: Record<string, any>;
7
7
  metrics?: Record<string, any>;
8
8
  outputs?: Record<string, any>;
9
+ config?: Record<string, any>;
10
+ userProperties?: Record<string, any>;
11
+ duration?: number;
9
12
  }
10
13
  export declare class UpdateEventResponse extends SpeakeasyBase {
11
14
  /**
@@ -60,6 +60,21 @@ var UpdateEventRequestBody = /** @class */ (function (_super) {
60
60
  (0, class_transformer_1.Expose)({ name: "outputs" }),
61
61
  __metadata("design:type", Object)
62
62
  ], UpdateEventRequestBody.prototype, "outputs", void 0);
63
+ __decorate([
64
+ (0, utils_1.SpeakeasyMetadata)(),
65
+ (0, class_transformer_1.Expose)({ name: "config" }),
66
+ __metadata("design:type", Object)
67
+ ], UpdateEventRequestBody.prototype, "config", void 0);
68
+ __decorate([
69
+ (0, utils_1.SpeakeasyMetadata)(),
70
+ (0, class_transformer_1.Expose)({ name: "user_properties" }),
71
+ __metadata("design:type", Object)
72
+ ], UpdateEventRequestBody.prototype, "userProperties", void 0);
73
+ __decorate([
74
+ (0, utils_1.SpeakeasyMetadata)(),
75
+ (0, class_transformer_1.Expose)({ name: "duration" }),
76
+ __metadata("design:type", Number)
77
+ ], UpdateEventRequestBody.prototype, "duration", void 0);
63
78
  return UpdateEventRequestBody;
64
79
  }(utils_1.SpeakeasyBase));
65
80
  exports.UpdateEventRequestBody = UpdateEventRequestBody;
@@ -457,9 +457,6 @@ var Events = /** @class */ (function () {
457
457
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
458
458
  }
459
459
  break;
460
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
461
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
462
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
463
460
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
464
461
  if (utils.matchContentType(responseContentType, "application/json")) {
465
462
  err = utils.objectToClass(JSON.parse(decodedRes), errors.CreateEventBatchResponseBody);
@@ -470,6 +467,9 @@ var Events = /** @class */ (function () {
470
467
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
471
468
  }
472
469
  break;
470
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
471
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
472
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
473
473
  }
474
474
  return [2 /*return*/, res];
475
475
  }
@@ -543,9 +543,6 @@ var Events = /** @class */ (function () {
543
543
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
544
544
  }
545
545
  break;
546
- case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
547
- ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
548
- throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
549
546
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 500:
550
547
  if (utils.matchContentType(responseContentType, "application/json")) {
551
548
  err = utils.objectToClass(JSON.parse(decodedRes), errors.CreateModelEventBatchResponseBody);
@@ -556,6 +553,9 @@ var Events = /** @class */ (function () {
556
553
  throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
557
554
  }
558
555
  break;
556
+ case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
557
+ ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
558
+ throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
559
559
  }
560
560
  return [2 /*return*/, res];
561
561
  }
package/dist/sdk/sdk.js CHANGED
@@ -49,9 +49,9 @@ var SDKConfiguration = /** @class */ (function () {
49
49
  function SDKConfiguration(init) {
50
50
  this.language = "typescript";
51
51
  this.openapiDocVersion = "1.0.1";
52
- this.sdkVersion = "0.4.5";
53
- this.genVersion = "2.338.12";
54
- this.userAgent = "speakeasy-sdk/typescript 0.4.5 2.338.12 1.0.1 honeyhive";
52
+ this.sdkVersion = "0.4.7";
53
+ this.genVersion = "2.375.5";
54
+ this.userAgent = "speakeasy-sdk/typescript 0.4.7 2.375.5 1.0.1 honeyhive";
55
55
  Object.assign(this, init);
56
56
  }
57
57
  return SDKConfiguration;
@@ -10,8 +10,8 @@
10
10
  | `projectId` | *string* | :heavy_minus_sign: | UUID for the project where the datapoint is stored |
11
11
  | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
12
12
  | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
13
- | `inputs` | [components.Inputs](../../models/components/inputs.md) | :heavy_minus_sign: | Arbitrary JSON object containing the inputs for the datapoint |
14
- | `history` | [components.History](../../models/components/history.md)[] | :heavy_minus_sign: | Conversation history associated with the datapoint |
13
+ | `inputs` | Record<string, *any*> | :heavy_minus_sign: | Arbitrary JSON object containing the inputs for the datapoint |
14
+ | `history` | Record<string, *any*>[] | :heavy_minus_sign: | Conversation history associated with the datapoint |
15
15
  | `groundTruth` | Record<string, *any*> | :heavy_minus_sign: | N/A |
16
16
  | `linkedEvent` | *string* | :heavy_minus_sign: | Event id for the event from which the datapoint was created |
17
17
  | `linkedEvals` | *string*[] | :heavy_minus_sign: | Ids of evaluations where the datapoint is included |
@@ -3,11 +3,11 @@
3
3
 
4
4
  ## Fields
5
5
 
6
- | Field | Type | Required | Description |
7
- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
8
- | `inputs` | Record<string, *any*> | :heavy_minus_sign: | Arbitrary JSON object containing the inputs for the datapoint |
9
- | `history` | [components.UpdateDatapointRequestHistory](../../models/components/updatedatapointrequesthistory.md)[] | :heavy_minus_sign: | Conversation history associated with the datapoint |
10
- | `groundTruth` | Record<string, *any*> | :heavy_minus_sign: | Expected output JSON object for the datapoint |
11
- | `linkedEvals` | *string*[] | :heavy_minus_sign: | Ids of evaluations where the datapoint is included |
12
- | `linkedDatasets` | *string*[] | :heavy_minus_sign: | Ids of all datasets that include the datapoint |
13
- | `metadata` | Record<string, *any*> | :heavy_minus_sign: | Any additional metadata for the datapoint |
6
+ | Field | Type | Required | Description |
7
+ | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
8
+ | `inputs` | Record<string, *any*> | :heavy_minus_sign: | Arbitrary JSON object containing the inputs for the datapoint |
9
+ | `history` | Record<string, *any*>[] | :heavy_minus_sign: | Conversation history associated with the datapoint |
10
+ | `groundTruth` | Record<string, *any*> | :heavy_minus_sign: | Expected output JSON object for the datapoint |
11
+ | `linkedEvals` | *string*[] | :heavy_minus_sign: | Ids of evaluations where the datapoint is included |
12
+ | `linkedDatasets` | *string*[] | :heavy_minus_sign: | Ids of all datasets that include the datapoint |
13
+ | `metadata` | Record<string, *any*> | :heavy_minus_sign: | Any additional metadata for the datapoint |
@@ -5,6 +5,6 @@
5
5
 
6
6
  | Field | Type | Required | Description |
7
7
  | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
8
- | `project` | *string* | :heavy_minus_sign: | Name of the project associated with this dataset like `New Project` |
9
- | `data` | Record<string, *any*>[] | :heavy_minus_sign: | List of JSON objects to be added as datapoints |
10
- | `mapping` | [operations.Mapping](../../models/operations/mapping.md) | :heavy_minus_sign: | Mapping of keys in the data object to be used as inputs, ground truth, and history, everything else goes into metadata |
8
+ | `project` | *string* | :heavy_check_mark: | Name of the project associated with this dataset like `New Project` |
9
+ | `data` | Record<string, *any*>[] | :heavy_check_mark: | List of JSON objects to be added as datapoints |
10
+ | `mapping` | [operations.Mapping](../../models/operations/mapping.md) | :heavy_check_mark: | Mapping of keys in the data object to be used as inputs, ground truth, and history, everything else goes into metadata |
@@ -5,4 +5,4 @@
5
5
 
6
6
  | Field | Type | Required | Description | Example |
7
7
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
8
- | `event` | [components.CreateModelEvent](../../models/components/createmodelevent.md) | :heavy_minus_sign: | N/A | {<br/>"project": "New Project",<br/>"model": "gpt-4o",<br/>"provider": "openai",<br/>"messages": [<br/>{<br/>"role": "system",<br/>"content": "Hello, world!"<br/>}<br/>],<br/>"response": {<br/>"role": "assistant",<br/>"content": "Hello, world!"<br/>},<br/>"duration": 42,<br/>"usage": {<br/>"prompt_tokens": 10,<br/>"completion_tokens": 10,<br/>"total_tokens": 20<br/>},<br/>"cost": 0.00008,<br/>"error": null,<br/>"source": "playground",<br/>"event_name": "Model Completion",<br/>"hyperparameters": {<br/>"temperature": 0,<br/>"top_p": 1,<br/>"max_tokens": 1000,<br/>"presence_penalty": 0,<br/>"frequency_penalty": 0,<br/>"stop": [],<br/>"n": 1<br/>},<br/>"template": [<br/>{<br/>"role": "system",<br/>"content": "Hello, {{ name }}!"<br/>}<br/>],<br/>"template_inputs": {<br/>"name": "world"<br/>},<br/>"tools": {<br/>"type": "function",<br/>"function": {<br/>"name": "get_current_weather",<br/>"description": "Get the current weather",<br/>"parameters": {<br/>"type": "object",<br/>"properties": {<br/>"location": {<br/>"type": "string",<br/>"description": "The city and state, e.g. San Francisco, CA"<br/>},<br/>"format": {<br/>"type": "string",<br/>"enum": [<br/>"celsius",<br/>"fahrenheit"<br/>],<br/>"description": "The temperature unit to use. Infer this from the users location."<br/>}<br/>},<br/>"required": [<br/>"location",<br/>"format"<br/>]<br/>}<br/>}<br/>},<br/>"tool_choice": "none",<br/>"response_format": {<br/>"type": "text"<br/>}<br/>} |
8
+ | `modelEvent` | [components.CreateModelEvent](../../models/components/createmodelevent.md) | :heavy_minus_sign: | N/A | {<br/>"project": "New Project",<br/>"model": "gpt-4o",<br/>"provider": "openai",<br/>"messages": [<br/>{<br/>"role": "system",<br/>"content": "Hello, world!"<br/>}<br/>],<br/>"response": {<br/>"role": "assistant",<br/>"content": "Hello, world!"<br/>},<br/>"duration": 42,<br/>"usage": {<br/>"prompt_tokens": 10,<br/>"completion_tokens": 10,<br/>"total_tokens": 20<br/>},<br/>"cost": 0.00008,<br/>"error": null,<br/>"source": "playground",<br/>"event_name": "Model Completion",<br/>"hyperparameters": {<br/>"temperature": 0,<br/>"top_p": 1,<br/>"max_tokens": 1000,<br/>"presence_penalty": 0,<br/>"frequency_penalty": 0,<br/>"stop": [],<br/>"n": 1<br/>},<br/>"template": [<br/>{<br/>"role": "system",<br/>"content": "Hello, {{ name }}!"<br/>}<br/>],<br/>"template_inputs": {<br/>"name": "world"<br/>},<br/>"tools": {<br/>"type": "function",<br/>"function": {<br/>"name": "get_current_weather",<br/>"description": "Get the current weather",<br/>"parameters": {<br/>"type": "object",<br/>"properties": {<br/>"location": {<br/>"type": "string",<br/>"description": "The city and state, e.g. San Francisco, CA"<br/>},<br/>"format": {<br/>"type": "string",<br/>"enum": [<br/>"celsius",<br/>"fahrenheit"<br/>],<br/>"description": "The temperature unit to use. Infer this from the users location."<br/>}<br/>},<br/>"required": [<br/>"location",<br/>"format"<br/>]<br/>}<br/>}<br/>},<br/>"tool_choice": "none",<br/>"response_format": {<br/>"type": "text"<br/>}<br/>} |
@@ -9,4 +9,7 @@
9
9
  | `metadata` | Record<string, *any*> | :heavy_minus_sign: | N/A |
10
10
  | `feedback` | Record<string, *any*> | :heavy_minus_sign: | N/A |
11
11
  | `metrics` | Record<string, *any*> | :heavy_minus_sign: | N/A |
12
- | `outputs` | Record<string, *any*> | :heavy_minus_sign: | N/A |
12
+ | `outputs` | Record<string, *any*> | :heavy_minus_sign: | N/A |
13
+ | `config` | Record<string, *any*> | :heavy_minus_sign: | N/A |
14
+ | `userProperties` | Record<string, *any*> | :heavy_minus_sign: | N/A |
15
+ | `duration` | *number* | :heavy_minus_sign: | N/A |
@@ -179,7 +179,7 @@ Update a specific datapoint
179
179
 
180
180
  ```typescript
181
181
  import { HoneyHive } from "honeyhive";
182
- import { UpdateDatapointRequest, UpdateDatapointRequestHistory } from "honeyhive/dist/models/components";
182
+ import { UpdateDatapointRequest } from "honeyhive/dist/models/components";
183
183
  import { UpdateDatapointRequest } from "honeyhive/dist/models/operations";
184
184
 
185
185
  async function run() {
@@ -192,8 +192,14 @@ const updateDatapointRequest: UpdateDatapointRequest = {
192
192
  "query": "what's the temperature in Reykjavik?",
193
193
  },
194
194
  history: [
195
- {},
196
- {},
195
+ {
196
+ "role": "system",
197
+ "content": "You are a helpful web assistant that helps users answer questions about the world based on the information provided to you by Google's search API. Answer the questions as truthfully as you can. In case you are unsure about the correct answer, please respond with \"I apologize but I'm not sure.\"",
198
+ },
199
+ {
200
+ "role": "user",
201
+ "content": "what's the temperature in Reykjavik?\n\n\n--Google search API results below:---\n\n\"snippet\":\"2 Week Extended Forecast in Reykjavik, Iceland ; Feb 4, 29 / 20 °F · Snow showers early. Broken clouds. ; Feb 5, 27 / 16 °F · Light snow. Decreasing cloudiness.\",\"snippet_highlighted_words\":[\"Feb 4, 29 / 20 °F\"]",
202
+ },
197
203
  ],
198
204
  groundTruth: {
199
205
  "role": "assistant",
@@ -228,6 +228,7 @@ async function run() {
228
228
  });
229
229
  const datasetId: string = "<value>";
230
230
  const requestBody: AddDatapointsRequestBody = {
231
+ project: "<value>",
231
232
  data: [
232
233
  {
233
234
  "key": "<value>",
@@ -163,6 +163,12 @@ async function run() {
163
163
  outputs: {
164
164
  "key": "<value>",
165
165
  },
166
+ config: {
167
+ "key": "<value>",
168
+ },
169
+ userProperties: {
170
+ "key": "<value>",
171
+ },
166
172
  });
167
173
 
168
174
  if (res.statusCode == 200) {
@@ -258,7 +264,7 @@ async function run() {
258
264
  });
259
265
 
260
266
  const res = await sdk.events.createModelEvent({
261
- event: {
267
+ modelEvent: {
262
268
  project: "New Project",
263
269
  model: "gpt-4o",
264
270
  provider: "openai",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "honeyhive",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "author": "HoneyHive",
5
5
  "scripts": {
6
6
  "prepare": "tsc --build",
@@ -1,7 +0,0 @@
1
- # History
2
-
3
-
4
- ## Fields
5
-
6
- | Field | Type | Required | Description |
7
- | ----------- | ----------- | ----------- | ----------- |
@@ -1,9 +0,0 @@
1
- # Inputs
2
-
3
- Arbitrary JSON object containing the inputs for the datapoint
4
-
5
-
6
- ## Fields
7
-
8
- | Field | Type | Required | Description |
9
- | ----------- | ----------- | ----------- | ----------- |
@@ -1,7 +0,0 @@
1
- # UpdateDatapointRequestHistory
2
-
3
-
4
- ## Fields
5
-
6
- | Field | Type | Required | Description |
7
- | ----------- | ----------- | ----------- | ----------- |