notdiamond 0.3.1 → 0.3.2

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.
package/dist/index.cjs CHANGED
@@ -16,6 +16,8 @@ function _interopNamespaceCompat(e) {
16
16
 
17
17
  const dotenv__namespace = /*#__PURE__*/_interopNamespaceCompat(dotenv);
18
18
 
19
+ const version = "0.3.1";
20
+
19
21
  var __defProp = Object.defineProperty;
20
22
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21
23
  var __publicField = (obj, key, value) => {
@@ -24,7 +26,7 @@ var __publicField = (obj, key, value) => {
24
26
  };
25
27
  dotenv__namespace.config();
26
28
  const BASE_URL = "https://not-diamond-server.onrender.com";
27
- const MODEL_SELECT_URL = `${BASE_URL}/v2/optimizer/modelSelect`;
29
+ const MODEL_SELECT_URL = `${BASE_URL}/v2/modelRouter/modelSelect`;
28
30
  const FEEDBACK_URL = `${BASE_URL}/v2/report/metrics/feedback`;
29
31
  const DEFAULT_TIMEOUT = 5;
30
32
  class NotDiamond {
@@ -47,7 +49,8 @@ class NotDiamond {
47
49
  headers: {
48
50
  Authorization: this.getAuthHeader(),
49
51
  accept: "application/json",
50
- "content-type": "application/json"
52
+ "content-type": "application/json",
53
+ "User-Agent": `TS-SDK/${version}`
51
54
  },
52
55
  body: JSON.stringify(body)
53
56
  });
package/dist/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as dotenv from 'dotenv';
2
2
 
3
+ const version = "0.3.1";
4
+
3
5
  var __defProp = Object.defineProperty;
4
6
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
7
  var __publicField = (obj, key, value) => {
@@ -8,7 +10,7 @@ var __publicField = (obj, key, value) => {
8
10
  };
9
11
  dotenv.config();
10
12
  const BASE_URL = "https://not-diamond-server.onrender.com";
11
- const MODEL_SELECT_URL = `${BASE_URL}/v2/optimizer/modelSelect`;
13
+ const MODEL_SELECT_URL = `${BASE_URL}/v2/modelRouter/modelSelect`;
12
14
  const FEEDBACK_URL = `${BASE_URL}/v2/report/metrics/feedback`;
13
15
  const DEFAULT_TIMEOUT = 5;
14
16
  class NotDiamond {
@@ -31,7 +33,8 @@ class NotDiamond {
31
33
  headers: {
32
34
  Authorization: this.getAuthHeader(),
33
35
  accept: "application/json",
34
- "content-type": "application/json"
36
+ "content-type": "application/json",
37
+ "User-Agent": `TS-SDK/${version}`
35
38
  },
36
39
  body: JSON.stringify(body)
37
40
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "notdiamond",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "author": "not-diamond",
6
6
  "license": "MIT",
7
7
  "description": "TS/JS client for the NotDiamond API",