@arizeai/phoenix-client 2.2.0 → 2.3.0

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 (54) hide show
  1. package/dist/esm/datasets/appendDatasetExamples.d.ts.map +1 -1
  2. package/dist/esm/datasets/appendDatasetExamples.js +13 -1
  3. package/dist/esm/datasets/appendDatasetExamples.js.map +1 -1
  4. package/dist/esm/datasets/getDatasetExamples.d.ts.map +1 -1
  5. package/dist/esm/datasets/getDatasetExamples.js +13 -1
  6. package/dist/esm/datasets/getDatasetExamples.js.map +1 -1
  7. package/dist/esm/datasets/getDatasetInfo.d.ts.map +1 -1
  8. package/dist/esm/datasets/getDatasetInfo.js +7 -0
  9. package/dist/esm/datasets/getDatasetInfo.js.map +1 -1
  10. package/dist/esm/datasets/getDatasetInfoByName.d.ts +10 -0
  11. package/dist/esm/datasets/getDatasetInfoByName.d.ts.map +1 -0
  12. package/dist/esm/datasets/getDatasetInfoByName.js +26 -0
  13. package/dist/esm/datasets/getDatasetInfoByName.js.map +1 -0
  14. package/dist/esm/schemas/llm/anthropic/converters.d.ts +14 -14
  15. package/dist/esm/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
  16. package/dist/esm/schemas/llm/anthropic/messageSchemas.d.ts +12 -12
  17. package/dist/esm/schemas/llm/anthropic/toolCallSchemas.d.ts +4 -4
  18. package/dist/esm/schemas/llm/constants.d.ts +3 -3
  19. package/dist/esm/schemas/llm/converters.d.ts +12 -12
  20. package/dist/esm/schemas/llm/openai/converters.d.ts +3 -3
  21. package/dist/esm/schemas/llm/schemas.d.ts +12 -12
  22. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  23. package/dist/esm/types/datasets.d.ts +3 -1
  24. package/dist/esm/types/datasets.d.ts.map +1 -1
  25. package/dist/src/datasets/appendDatasetExamples.d.ts.map +1 -1
  26. package/dist/src/datasets/appendDatasetExamples.js +13 -1
  27. package/dist/src/datasets/appendDatasetExamples.js.map +1 -1
  28. package/dist/src/datasets/getDatasetExamples.d.ts.map +1 -1
  29. package/dist/src/datasets/getDatasetExamples.js +13 -1
  30. package/dist/src/datasets/getDatasetExamples.js.map +1 -1
  31. package/dist/src/datasets/getDatasetInfo.d.ts.map +1 -1
  32. package/dist/src/datasets/getDatasetInfo.js +7 -0
  33. package/dist/src/datasets/getDatasetInfo.js.map +1 -1
  34. package/dist/src/datasets/getDatasetInfoByName.d.ts +10 -0
  35. package/dist/src/datasets/getDatasetInfoByName.d.ts.map +1 -0
  36. package/dist/src/datasets/getDatasetInfoByName.js +41 -0
  37. package/dist/src/datasets/getDatasetInfoByName.js.map +1 -0
  38. package/dist/src/schemas/llm/anthropic/converters.d.ts +14 -14
  39. package/dist/src/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
  40. package/dist/src/schemas/llm/anthropic/messageSchemas.d.ts +12 -12
  41. package/dist/src/schemas/llm/anthropic/toolCallSchemas.d.ts +4 -4
  42. package/dist/src/schemas/llm/constants.d.ts +3 -3
  43. package/dist/src/schemas/llm/converters.d.ts +12 -12
  44. package/dist/src/schemas/llm/openai/converters.d.ts +3 -3
  45. package/dist/src/schemas/llm/schemas.d.ts +12 -12
  46. package/dist/src/types/datasets.d.ts +3 -1
  47. package/dist/src/types/datasets.d.ts.map +1 -1
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +1 -1
  50. package/src/datasets/appendDatasetExamples.ts +12 -1
  51. package/src/datasets/getDatasetExamples.ts +12 -1
  52. package/src/datasets/getDatasetInfo.ts +8 -0
  53. package/src/datasets/getDatasetInfoByName.ts +35 -0
  54. package/src/types/datasets.ts +2 -2
@@ -1,10 +1,12 @@
1
1
  import { Node } from "./core.js";
2
2
  /**
3
3
  * A dataset can be identified by its datasetId
4
- * TODO: add support for datasetName and datasetVersionId via discriminated union
4
+ * TODO: add support for datasetVersionId via discriminated union
5
5
  */
6
6
  export type DatasetSelector = {
7
7
  datasetId: string;
8
+ } | {
9
+ datasetName: string;
8
10
  };
9
11
  /**
10
12
  * Overview information about a dataset
@@ -1 +1 @@
1
- {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../../src/types/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,OAAO,EAAE,IAAI;IAClD,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,WAAW,EAAE,eAAe,EAAE,IAAI;CAAG"}
1
+ {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../../src/types/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,WAAW,EAAE,M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qBAAqB,CAAC,EAC1C,MAAM,EAAE,OAAO,EACf,OAAO,EACP,QAAQ,GACT,EAAE,2BAA2B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAwBtE"}
1
+ {"version":3,"file":"appendDatasetExamples.d.ts","sourceRoot":"","sources":["../../../src/datasets/appendDatasetExamples.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG;IACnD;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,EAAE,MAAM,CAAC;CAGnB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EAAE,OAAO,EACf,OAAO,EACP,QAAQ,GACT,EAAE,2BAA2B,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAkCtE"}
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.appendDatasetExamples = appendDatasetExamples;
16
16
  const client_1 = require("../client");
17
17
  const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
18
+ const getDatasetInfo_1 = require("./getDatasetInfo");
18
19
  /**
19
20
  * Append examples to an existing dataset
20
21
  * @experimental this interface may change in the future
@@ -26,6 +27,17 @@ function appendDatasetExamples(_a) {
26
27
  const inputs = examples.map((example) => example.input);
27
28
  const outputs = examples.map((example) => { var _a; return (_a = example.output) !== null && _a !== void 0 ? _a : {}; }); // Treat null as an empty object
28
29
  const metadata = examples.map((example) => example.metadata);
30
+ let datasetName;
31
+ if ("datasetName" in dataset) {
32
+ datasetName = dataset.datasetName;
33
+ }
34
+ else {
35
+ const datasetInfo = yield (0, getDatasetInfo_1.getDatasetInfo)({
36
+ client,
37
+ dataset,
38
+ });
39
+ datasetName = datasetInfo.name;
40
+ }
29
41
  const appendResponse = yield client.POST("/v1/datasets/upload", {
30
42
  params: {
31
43
  query: {
@@ -33,7 +45,7 @@ function appendDatasetExamples(_a) {
33
45
  },
34
46
  },
35
47
  body: {
36
- name: dataset.datasetId,
48
+ name: datasetName,
37
49
  action: "append",
38
50
  inputs,
39
51
  outputs,
@@ -1 +1 @@
1
- {"version":3,"file":"appendDatasetExamples.js","sourceRoot":"","sources":["../../../src/datasets/appendDatasetExamples.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AA0BA,sDA4BC;AAtDD,sCAAyC;AAGzC,oEAAuC;AAmBvC;;;GAGG;AACH,SAAsB,qBAAqB;yDAAC,EAC1C,MAAM,EAAE,OAAO,EACf,OAAO,EACP,QAAQ,GACoB;;QAC5B,MAAM,MAAM,GAAG,OAAO,IAAI,IAAA,qBAAY,GAAE,CAAC;QACzC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,MAAM,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC,CAAC,gCAAgC;QACjG,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7D,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE;YAC9D,MAAM,EAAE;gBACN,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI;iBACX;aACF;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO,CAAC,SAAS;gBACvB,MAAM,EAAE,QAAQ;gBAChB,MAAM;gBACN,OAAO;gBACP,QAAQ;aAC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,cAAc,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE;YAC9D,MAAM,EAAE;gBACN,KAAK,EAAE;oBACL,IAAI,EAAE,IAAI;iBACX;aACF;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,WAAW;gBACjB,MAAM,EAAE,QAAQ;gBAChB,MAAM;gBACN,OAAO;gBACP,QAAQ;aACT;SACF,CAAC,CAAC;QACH,IAAA,wBAAS,EAAC,MAAA,cAAc,CAAC,IAAI,0CAAE,IAAI,EAAE,mCAAmC,CAAC,CAAC;QAC1E,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;QACtD,OAAO;YACL,SAAS;SACV,CAAC;IACJ,CAAC;CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDatasetExamples.d.ts","sourceRoot":"","sources":["../../../src/datasets/getDatasetExamples.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG;IAChD,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,MAAM,EAAE,OAAO,EACf,OAAO,GACR,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC,CAkBrD"}
1
+ {"version":3,"file":"getDatasetExamples.d.ts","sourceRoot":"","sources":["../../../src/datasets/getDatasetExamples.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGrE,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG;IAChD,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,MAAM,EAAE,OAAO,EACf,OAAO,GACR,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC,CA4BrD"}
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.getDatasetExamples = getDatasetExamples;
16
16
  const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
17
17
  const client_1 = require("../client");
18
+ const getDatasetInfoByName_1 = require("./getDatasetInfoByName");
18
19
  /**
19
20
  * Get the latest examples from a dataset
20
21
  */
@@ -22,10 +23,21 @@ function getDatasetExamples(_a) {
22
23
  return __awaiter(this, arguments, void 0, function* ({ client: _client, dataset, }) {
23
24
  var _b;
24
25
  const client = _client || (0, client_1.createClient)();
26
+ let datasetId;
27
+ if ("datasetName" in dataset) {
28
+ const datasetInfo = yield (0, getDatasetInfoByName_1.getDatasetInfoByName)({
29
+ client,
30
+ datasetName: dataset.datasetName,
31
+ });
32
+ datasetId = datasetInfo.id;
33
+ }
34
+ else {
35
+ datasetId = dataset.datasetId;
36
+ }
25
37
  const response = yield client.GET("/v1/datasets/{id}/examples", {
26
38
  params: {
27
39
  path: {
28
- id: dataset.datasetId,
40
+ id: datasetId,
29
41
  },
30
42
  },
31
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"getDatasetExamples.js","sourceRoot":"","sources":["../../../src/datasets/getDatasetExamples.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAYA,gDAqBC;AAjCD,oEAAuC;AACvC,sCAAyC;AAQzC;;GAEG;AACH,SAAsB,kBAAkB;yDAAC,EACvC,MAAM,EAAE,OAAO,EACf,OAAO,GACkB;;QACzB,MAAM,MAAM,GAAG,OAAO,IAAI,IAAA,qBAAY,GAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,4BAA4B,EAAE;YAC9D,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,EAAE,EAAE,OAAO,CAAC,SAAS;iBACtB;aACF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AC,IAAI,0CAAE,IAAI,EAAE,gCAAgC,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACxC,OAAO;YACL,SAAS,EAAE,YAAY,CAAC,UAAU;YAClC,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC5C,OAAO,KACV,SAAS,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IACvC,CAAC;SACJ,CAAC;IACJ,CAAC;CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDatasetInfo.d.ts","sourceRoot":"","sources":["../../../src/datasets/getDatasetInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG;IAC5C,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,wBAAsB,cAAc,CAAC,EACnC,MAAM,EAAE,OAAO,EACf,OAAO,GACR,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,CAiB7C"}
1
+ {"version":3,"file":"getDatasetInfo.d.ts","sourceRoot":"","sources":["../../../src/datasets/getDatasetInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGjE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG;IAC5C,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,wBAAsB,cAAc,CAAC,EACnC,MAAM,EAAE,OAAO,EACf,OAAO,GACR,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,CAwB7C"}
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.getDatasetInfo = getDatasetInfo;
16
16
  const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
17
17
  const client_1 = require("../client");
18
+ const getDatasetInfoByName_1 = require("./getDatasetInfoByName");
18
19
  /**
19
20
  * Get an overview of the information in a dataset
20
21
  * Note: this does not include the examples contained in the dataset
@@ -23,6 +24,12 @@ function getDatasetInfo(_a) {
23
24
  return __awaiter(this, arguments, void 0, function* ({ client: _client, dataset, }) {
24
25
  var _b;
25
26
  const client = _client || (0, client_1.createClient)();
27
+ if ("datasetName" in dataset) {
28
+ return yield (0, getDatasetInfoByName_1.getDatasetInfoByName)({
29
+ client,
30
+ datasetName: dataset.datasetName,
31
+ });
32
+ }
26
33
  const datasetResponse = yield client.GET("/v1/datasets/{id}", {
27
34
  params: {
28
35
  path: {
@@ -1 +1 @@
1
- {"version":3,"file":"getDatasetInfo.js","sourceRoot":"","sources":["../../../src/datasets/getDatasetInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,wCAoBC;AAjCD,oEAAuC;AACvC,sCAAyC;AAQzC;;;GAGG;AACH,SAAsB,cAAc;yDAAC,EACnC,MAAM,EAAE,OAAO,EACf,OAAO,GACc;;QACrB,MAAM,MAAM,GAAG,OAAO,IAAI,IAAA,qBAAY,GAAE,CAAC;QACzC,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE;YAC5D,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,EAAE,EAAE,OAAO,CAAC,SAAS;iBACtB;aACF;SACF,CAAC,CAAC;QACH,IAAA,wBAAS,EAAC,MAAA,eAAe,CAAC,IAAI,0CAAE,IAAI,EAAE,4BAA4B,CAAC,CAAC;QACpE,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9C,OAAO;YACL,EAAE,EAAE,WAAW,CAAC,EAAE;YAClB,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,WAAW,EAAE,WAAW,CAAC,WAAW,IAAI,SAAS;YACjD,QAAQ,EAAE,WAAW,CAAC,QAAQ;SAC/B,CAAC;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"getDatasetInfo.js","sourceRoot":"","sources":["../../../src/datasets/getDatasetInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAcA,wCA2BC;AAzCD,oEAAuC;AACvC,sCAAyC;AAGzC,iEAA8D;AAM9D;;;GAGG;AACH,SAAsB,cAAc;yDAAC,EACnC,MAAM,EAAE,OAAO,EACf,OAAO,GACc;;QACrB,MAAM,MAAM,GAAG,OAAO,IAAI,IAAA,qBAAY,GAAE,CAAC;QACzC,IAAI,aAAa,IAAI,OAAO,EAAE,CAAC;YAC7B,OAAO,MAAM,IAAA,2CAAoB,EAAC;gBAChC,MAAM;gBACN,WAAW,EAAE,OAAO,CAAC,WAAW;aACjC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE;YAC5D,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,EAAE,EAAE,OAAO,CAAC,SAAS;iBACtB;aACF;SACF,CAAC,CAAC;QACH,IAAA,wBAAS,EAAC,MAAA,eAAe,CAAC,IAAI,0CAAE,IAAI,EAAE,4BAA4B,CAAC,CAAC;QACpE,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9C,OAAO;YACL,EAAE,EAAE,WAAW,CAAC,EAAE;YAClB,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,WAAW,EAAE,WAAW,CAAC,WAAW,IAAI,SAAS;YACjD,QAAQ,EAAE,WAAW,CAAC,QAAQ;SAC/B,CAAC;IACJ,CAAC;CAAA"}
@@ -0,0 +1,10 @@
1
+ import { ClientFn } from "../types/core";
2
+ import { DatasetInfo } from "../types/datasets";
3
+ export type GetDatasetParams = ClientFn & {
4
+ datasetName: string;
5
+ };
6
+ /**
7
+ * Get the information of a dataset via the name
8
+ */
9
+ export declare function getDatasetInfoByName({ client: _client, datasetName, }: GetDatasetParams): Promise<DatasetInfo>;
10
+ //# sourceMappingURL=getDatasetInfoByName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDatasetInfoByName.d.ts","sourceRoot":"","sources":["../../../src/datasets/getDatasetInfoByName.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,MAAM,EAAE,OAAO,EACf,WAAW,GACZ,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAoBzC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getDatasetInfoByName = getDatasetInfoByName;
13
+ const client_1 = require("../client");
14
+ /**
15
+ * Get the information of a dataset via the name
16
+ */
17
+ function getDatasetInfoByName(_a) {
18
+ return __awaiter(this, arguments, void 0, function* ({ client: _client, datasetName, }) {
19
+ var _b, _c;
20
+ const client = _client || (0, client_1.createClient)();
21
+ const response = yield client.GET("/v1/datasets", {
22
+ query: {
23
+ name: datasetName,
24
+ },
25
+ });
26
+ if ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.length) {
27
+ const datasetInfo = response.data.data[0];
28
+ if (!datasetInfo) {
29
+ throw new Error(`Dataset with name ${datasetName} not found`);
30
+ }
31
+ return {
32
+ id: datasetInfo.id,
33
+ name: datasetInfo.name,
34
+ description: datasetInfo.description || undefined,
35
+ metadata: datasetInfo.metadata,
36
+ };
37
+ }
38
+ throw new Error(`Dataset with name ${datasetName} not found`);
39
+ });
40
+ }
41
+ //# sourceMappingURL=getDatasetInfoByName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDatasetInfoByName.js","sourceRoot":"","sources":["../../../src/datasets/getDatasetInfoByName.ts"],"names":[],"mappings":";;;;;;;;;;;AAWA,oDAuBC;AAlCD,sCAAyC;AAQzC;;GAEG;AACH,SAAsB,oBAAoB;yDAAC,EACzC,MAAM,EAAE,OAAO,EACf,WAAW,GACM;;QACjB,MAAM,MAAM,GAAG,OAAO,IAAI,IAAA,qBAAY,GAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE;YAChD,KAAK,EAAE;gBACL,IAAI,EAAE,WAAW;aAClB;SACF,CAAC,CAAC;QACH,IAAI,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,IAAI,0CAAE,MAAM,EAAE,CAAC;YAChC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1C,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,qBAAqB,WAAW,YAAY,CAAC,CAAC;YAChE,CAAC;YACD,OAAO;gBACL,EAAE,EAAE,WAAW,CAAC,EAAE;gBAClB,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,WAAW,EAAE,WAAW,CAAC,WAAW,IAAI,SAAS;gBACjD,QAAQ,EAAE,WAAW,CAAC,QAAQ;aAC/B,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,qBAAqB,WAAW,YAAY,CAAC,CAAC;IAChE,CAAC;CAAA"}
@@ -43,13 +43,13 @@ export declare const anthropicMessagePartToOpenAI: import("zod").ZodEffects<impo
43
43
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
44
44
  }, "strip", import("zod").ZodTypeAny, {
45
45
  type: "tool_use";
46
- name: string;
47
46
  id: string;
47
+ name: string;
48
48
  input: import("../../jsonLiteralSchema").JSONLiteral;
49
49
  }, {
50
50
  type: "tool_use";
51
- name: string;
52
51
  id: string;
52
+ name: string;
53
53
  input: import("../../jsonLiteralSchema").JSONLiteral;
54
54
  }>, import("zod").ZodObject<{
55
55
  type: import("zod").ZodLiteral<"tool_result">;
@@ -134,8 +134,8 @@ export declare const anthropicMessagePartToOpenAI: import("zod").ZodEffects<impo
134
134
  };
135
135
  } | null, {
136
136
  type: "tool_use";
137
- name: string;
138
137
  id: string;
138
+ name: string;
139
139
  input: import("../../jsonLiteralSchema").JSONLiteral;
140
140
  } | {
141
141
  text: string;
@@ -213,13 +213,13 @@ export declare const anthropicMessageToOpenAI: import("zod").ZodEffects<import("
213
213
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
214
214
  }, "strip", import("zod").ZodTypeAny, {
215
215
  type: "tool_use";
216
- name: string;
217
216
  id: string;
217
+ name: string;
218
218
  input: import("../../jsonLiteralSchema").JSONLiteral;
219
219
  }, {
220
220
  type: "tool_use";
221
- name: string;
222
221
  id: string;
222
+ name: string;
223
223
  input: import("../../jsonLiteralSchema").JSONLiteral;
224
224
  }>, import("zod").ZodObject<{
225
225
  type: import("zod").ZodLiteral<"tool_result">;
@@ -342,13 +342,13 @@ export declare const anthropicMessageToOpenAI: import("zod").ZodEffects<import("
342
342
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
343
343
  }, "strip", import("zod").ZodTypeAny, {
344
344
  type: "tool_use";
345
- name: string;
346
345
  id: string;
346
+ name: string;
347
347
  input: import("../../jsonLiteralSchema").JSONLiteral;
348
348
  }, {
349
349
  type: "tool_use";
350
- name: string;
351
350
  id: string;
351
+ name: string;
352
352
  input: import("../../jsonLiteralSchema").JSONLiteral;
353
353
  }>, import("zod").ZodObject<{
354
354
  type: import("zod").ZodLiteral<"tool_result">;
@@ -471,13 +471,13 @@ export declare const anthropicMessageToOpenAI: import("zod").ZodEffects<import("
471
471
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
472
472
  }, "strip", import("zod").ZodTypeAny, {
473
473
  type: "tool_use";
474
- name: string;
475
474
  id: string;
475
+ name: string;
476
476
  input: import("../../jsonLiteralSchema").JSONLiteral;
477
477
  }, {
478
478
  type: "tool_use";
479
- name: string;
480
479
  id: string;
480
+ name: string;
481
481
  input: import("../../jsonLiteralSchema").JSONLiteral;
482
482
  }>, import("zod").ZodObject<{
483
483
  type: import("zod").ZodLiteral<"tool_result">;
@@ -721,13 +721,13 @@ export declare const anthropicMessageToOpenAI: import("zod").ZodEffects<import("
721
721
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
722
722
  }, "strip", import("zod").ZodTypeAny, {
723
723
  type: "tool_use";
724
- name: string;
725
724
  id: string;
725
+ name: string;
726
726
  input: import("../../jsonLiteralSchema").JSONLiteral;
727
727
  }, {
728
728
  type: "tool_use";
729
- name: string;
730
729
  id: string;
730
+ name: string;
731
731
  input: import("../../jsonLiteralSchema").JSONLiteral;
732
732
  }>, import("zod").ZodObject<{
733
733
  type: import("zod").ZodLiteral<"tool_result">;
@@ -814,13 +814,13 @@ export declare const anthropicToolCallToOpenAI: import("zod").ZodEffects<import(
814
814
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
815
815
  }, "strip", import("zod").ZodTypeAny, {
816
816
  type: "tool_use";
817
- name: string;
818
817
  id: string;
818
+ name: string;
819
819
  input: import("../../jsonLiteralSchema").JSONLiteral;
820
820
  }, {
821
821
  type: "tool_use";
822
- name: string;
823
822
  id: string;
823
+ name: string;
824
824
  input: import("../../jsonLiteralSchema").JSONLiteral;
825
825
  }>, {
826
826
  function: {
@@ -833,8 +833,8 @@ export declare const anthropicToolCallToOpenAI: import("zod").ZodEffects<import(
833
833
  id: string;
834
834
  }, {
835
835
  type: "tool_use";
836
- name: string;
837
836
  id: string;
837
+ name: string;
838
838
  input: import("../../jsonLiteralSchema").JSONLiteral;
839
839
  }>;
840
840
  /**
@@ -48,13 +48,13 @@ export declare const anthropicToolUseBlockSchema: z.ZodObject<{
48
48
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
49
49
  }, "strip", z.ZodTypeAny, {
50
50
  type: "tool_use";
51
- name: string;
52
51
  id: string;
52
+ name: string;
53
53
  input: import("../../jsonLiteralSchema").JSONLiteral;
54
54
  }, {
55
55
  type: "tool_use";
56
- name: string;
57
56
  id: string;
57
+ name: string;
58
58
  input: import("../../jsonLiteralSchema").JSONLiteral;
59
59
  }>;
60
60
  export type AnthropicToolUseBlock = z.infer<typeof anthropicToolUseBlockSchema>;
@@ -178,13 +178,13 @@ export declare const anthropicMessagePartSchema: z.ZodDiscriminatedUnion<"type",
178
178
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
179
179
  }, "strip", z.ZodTypeAny, {
180
180
  type: "tool_use";
181
- name: string;
182
181
  id: string;
182
+ name: string;
183
183
  input: import("../../jsonLiteralSchema").JSONLiteral;
184
184
  }, {
185
185
  type: "tool_use";
186
- name: string;
187
186
  id: string;
187
+ name: string;
188
188
  input: import("../../jsonLiteralSchema").JSONLiteral;
189
189
  }>, z.ZodObject<{
190
190
  type: z.ZodLiteral<"tool_result">;
@@ -56,13 +56,13 @@ export declare const anthropicMessageSchema: z.ZodObject<{
56
56
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
57
57
  }, "strip", z.ZodTypeAny, {
58
58
  type: "tool_use";
59
- name: string;
60
59
  id: string;
60
+ name: string;
61
61
  input: import("../../jsonLiteralSchema").JSONLiteral;
62
62
  }, {
63
63
  type: "tool_use";
64
- name: string;
65
64
  id: string;
65
+ name: string;
66
66
  input: import("../../jsonLiteralSchema").JSONLiteral;
67
67
  }>, z.ZodObject<{
68
68
  type: z.ZodLiteral<"tool_result">;
@@ -185,13 +185,13 @@ export declare const anthropicMessageSchema: z.ZodObject<{
185
185
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
186
186
  }, "strip", z.ZodTypeAny, {
187
187
  type: "tool_use";
188
- name: string;
189
188
  id: string;
189
+ name: string;
190
190
  input: import("../../jsonLiteralSchema").JSONLiteral;
191
191
  }, {
192
192
  type: "tool_use";
193
- name: string;
194
193
  id: string;
194
+ name: string;
195
195
  input: import("../../jsonLiteralSchema").JSONLiteral;
196
196
  }>, z.ZodObject<{
197
197
  type: z.ZodLiteral<"tool_result">;
@@ -314,13 +314,13 @@ export declare const anthropicMessageSchema: z.ZodObject<{
314
314
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
315
315
  }, "strip", z.ZodTypeAny, {
316
316
  type: "tool_use";
317
- name: string;
318
317
  id: string;
318
+ name: string;
319
319
  input: import("../../jsonLiteralSchema").JSONLiteral;
320
320
  }, {
321
321
  type: "tool_use";
322
- name: string;
323
322
  id: string;
323
+ name: string;
324
324
  input: import("../../jsonLiteralSchema").JSONLiteral;
325
325
  }>, z.ZodObject<{
326
326
  type: z.ZodLiteral<"tool_result">;
@@ -445,13 +445,13 @@ export declare const anthropicMessagesSchema: z.ZodArray<z.ZodObject<{
445
445
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
446
446
  }, "strip", z.ZodTypeAny, {
447
447
  type: "tool_use";
448
- name: string;
449
448
  id: string;
449
+ name: string;
450
450
  input: import("../../jsonLiteralSchema").JSONLiteral;
451
451
  }, {
452
452
  type: "tool_use";
453
- name: string;
454
453
  id: string;
454
+ name: string;
455
455
  input: import("../../jsonLiteralSchema").JSONLiteral;
456
456
  }>, z.ZodObject<{
457
457
  type: z.ZodLiteral<"tool_result">;
@@ -574,13 +574,13 @@ export declare const anthropicMessagesSchema: z.ZodArray<z.ZodObject<{
574
574
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
575
575
  }, "strip", z.ZodTypeAny, {
576
576
  type: "tool_use";
577
- name: string;
578
577
  id: string;
578
+ name: string;
579
579
  input: import("../../jsonLiteralSchema").JSONLiteral;
580
580
  }, {
581
581
  type: "tool_use";
582
- name: string;
583
582
  id: string;
583
+ name: string;
584
584
  input: import("../../jsonLiteralSchema").JSONLiteral;
585
585
  }>, z.ZodObject<{
586
586
  type: z.ZodLiteral<"tool_result">;
@@ -703,13 +703,13 @@ export declare const anthropicMessagesSchema: z.ZodArray<z.ZodObject<{
703
703
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
704
704
  }, "strip", z.ZodTypeAny, {
705
705
  type: "tool_use";
706
- name: string;
707
706
  id: string;
707
+ name: string;
708
708
  input: import("../../jsonLiteralSchema").JSONLiteral;
709
709
  }, {
710
710
  type: "tool_use";
711
- name: string;
712
711
  id: string;
712
+ name: string;
713
713
  input: import("../../jsonLiteralSchema").JSONLiteral;
714
714
  }>, z.ZodObject<{
715
715
  type: z.ZodLiteral<"tool_result">;
@@ -9,13 +9,13 @@ export declare const anthropicToolCallSchema: z.ZodObject<{
9
9
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  type: "tool_use";
12
- name: string;
13
12
  id: string;
13
+ name: string;
14
14
  input: import("../../jsonLiteralSchema").JSONLiteral;
15
15
  }, {
16
16
  type: "tool_use";
17
- name: string;
18
17
  id: string;
18
+ name: string;
19
19
  input: import("../../jsonLiteralSchema").JSONLiteral;
20
20
  }>;
21
21
  /**
@@ -32,13 +32,13 @@ export declare const anthropicToolCallsSchema: z.ZodArray<z.ZodObject<{
32
32
  input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
33
33
  }, "strip", z.ZodTypeAny, {
34
34
  type: "tool_use";
35
- name: string;
36
35
  id: string;
36
+ name: string;
37
37
  input: import("../../jsonLiteralSchema").JSONLiteral;
38
38
  }, {
39
39
  type: "tool_use";
40
- name: string;
41
40
  id: string;
41
+ name: string;
42
42
  input: import("../../jsonLiteralSchema").JSONLiteral;
43
43
  }>, "many">;
44
44
  /**
@@ -4276,13 +4276,13 @@ export declare const SDKProviderConverterMap: {
4276
4276
  input: z.ZodType<import("../jsonLiteralSchema").JSONLiteral, z.ZodTypeDef, import("../jsonLiteralSchema").JSONLiteral>;
4277
4277
  }, "strip", z.ZodTypeAny, {
4278
4278
  type: "tool_use";
4279
- name: string;
4280
4279
  id: string;
4280
+ name: string;
4281
4281
  input: import("../jsonLiteralSchema").JSONLiteral;
4282
4282
  }, {
4283
4283
  type: "tool_use";
4284
- name: string;
4285
4284
  id: string;
4285
+ name: string;
4286
4286
  input: import("../jsonLiteralSchema").JSONLiteral;
4287
4287
  }>, z.ZodObject<{
4288
4288
  type: z.ZodLiteral<"tool_result">;
@@ -4591,8 +4591,8 @@ export declare const SDKProviderConverterMap: {
4591
4591
  type?: "function" | undefined;
4592
4592
  }>, {
4593
4593
  type: "tool_use";
4594
- name: string;
4595
4594
  id: string;
4595
+ name: string;
4596
4596
  input: import("../jsonLiteralSchema").JSONLiteral;
4597
4597
  }, {
4598
4598
  function: {
@@ -4277,13 +4277,13 @@ export declare const safelyConvertMessageToProvider: <TargetProviderSDK extends
4277
4277
  input: z.ZodType<JSONLiteral, z.ZodTypeDef, JSONLiteral>;
4278
4278
  }, "strip", z.ZodTypeAny, {
4279
4279
  type: "tool_use";
4280
- name: string;
4281
4280
  id: string;
4281
+ name: string;
4282
4282
  input: JSONLiteral;
4283
4283
  }, {
4284
4284
  type: "tool_use";
4285
- name: string;
4286
4285
  id: string;
4286
+ name: string;
4287
4287
  input: JSONLiteral;
4288
4288
  }>, z.ZodObject<{
4289
4289
  type: z.ZodLiteral<"tool_result">;
@@ -4592,8 +4592,8 @@ export declare const safelyConvertMessageToProvider: <TargetProviderSDK extends
4592
4592
  type?: "function" | undefined;
4593
4593
  }>, {
4594
4594
  type: "tool_use";
4595
- name: string;
4596
4595
  id: string;
4596
+ name: string;
4597
4597
  input: JSONLiteral;
4598
4598
  }, {
4599
4599
  function: {
@@ -13378,13 +13378,13 @@ export declare const safelyConvertToolCallToProvider: <TargetProviderSDK extends
13378
13378
  input: z.ZodType<JSONLiteral, z.ZodTypeDef, JSONLiteral>;
13379
13379
  }, "strip", z.ZodTypeAny, {
13380
13380
  type: "tool_use";
13381
- name: string;
13382
13381
  id: string;
13382
+ name: string;
13383
13383
  input: JSONLiteral;
13384
13384
  }, {
13385
13385
  type: "tool_use";
13386
- name: string;
13387
13386
  id: string;
13387
+ name: string;
13388
13388
  input: JSONLiteral;
13389
13389
  }>, z.ZodObject<{
13390
13390
  type: z.ZodLiteral<"tool_result">;
@@ -13693,8 +13693,8 @@ export declare const safelyConvertToolCallToProvider: <TargetProviderSDK extends
13693
13693
  type?: "function" | undefined;
13694
13694
  }>, {
13695
13695
  type: "tool_use";
13696
- name: string;
13697
13696
  id: string;
13697
+ name: string;
13698
13698
  input: JSONLiteral;
13699
13699
  }, {
13700
13700
  function: {
@@ -22479,13 +22479,13 @@ export declare const safelyConvertToolDefinitionToProvider: <TargetProviderSDK e
22479
22479
  input: z.ZodType<JSONLiteral, z.ZodTypeDef, JSONLiteral>;
22480
22480
  }, "strip", z.ZodTypeAny, {
22481
22481
  type: "tool_use";
22482
- name: string;
22483
22482
  id: string;
22483
+ name: string;
22484
22484
  input: JSONLiteral;
22485
22485
  }, {
22486
22486
  type: "tool_use";
22487
- name: string;
22488
22487
  id: string;
22488
+ name: string;
22489
22489
  input: JSONLiteral;
22490
22490
  }>, z.ZodObject<{
22491
22491
  type: z.ZodLiteral<"tool_result">;
@@ -22794,8 +22794,8 @@ export declare const safelyConvertToolDefinitionToProvider: <TargetProviderSDK e
22794
22794
  type?: "function" | undefined;
22795
22795
  }>, {
22796
22796
  type: "tool_use";
22797
- name: string;
22798
22797
  id: string;
22798
+ name: string;
22799
22799
  input: JSONLiteral;
22800
22800
  }, {
22801
22801
  function: {
@@ -31580,13 +31580,13 @@ export declare const safelyConvertToolChoiceToProvider: <TargetProviderSDK exten
31580
31580
  input: z.ZodType<JSONLiteral, z.ZodTypeDef, JSONLiteral>;
31581
31581
  }, "strip", z.ZodTypeAny, {
31582
31582
  type: "tool_use";
31583
- name: string;
31584
31583
  id: string;
31584
+ name: string;
31585
31585
  input: JSONLiteral;
31586
31586
  }, {
31587
31587
  type: "tool_use";
31588
- name: string;
31589
31588
  id: string;
31589
+ name: string;
31590
31590
  input: JSONLiteral;
31591
31591
  }>, z.ZodObject<{
31592
31592
  type: z.ZodLiteral<"tool_result">;
@@ -31895,8 +31895,8 @@ export declare const safelyConvertToolChoiceToProvider: <TargetProviderSDK exten
31895
31895
  type?: "function" | undefined;
31896
31896
  }>, {
31897
31897
  type: "tool_use";
31898
- name: string;
31899
31898
  id: string;
31899
+ name: string;
31900
31900
  input: JSONLiteral;
31901
31901
  }, {
31902
31902
  function: {
@@ -460,13 +460,13 @@ export declare const openAIMessageToAnthropic: import("zod").ZodEffects<import("
460
460
  input: import("zod").ZodType<import("../../jsonLiteralSchema").JSONLiteral, import("zod").ZodTypeDef, import("../../jsonLiteralSchema").JSONLiteral>;
461
461
  }, "strip", import("zod").ZodTypeAny, {
462
462
  type: "tool_use";
463
- name: string;
464
463
  id: string;
464
+ name: string;
465
465
  input: import("../../jsonLiteralSchema").JSONLiteral;
466
466
  }, {
467
467
  type: "tool_use";
468
- name: string;
469
468
  id: string;
469
+ name: string;
470
470
  input: import("../../jsonLiteralSchema").JSONLiteral;
471
471
  }>, import("zod").ZodObject<{
472
472
  type: import("zod").ZodLiteral<"tool_result">;
@@ -1726,8 +1726,8 @@ export declare const openAIToolCallToAnthropic: import("zod").ZodEffects<import(
1726
1726
  type?: "function" | undefined;
1727
1727
  }>, {
1728
1728
  type: "tool_use";
1729
- name: string;
1730
1729
  id: string;
1730
+ name: string;
1731
1731
  input: import("../../jsonLiteralSchema").JSONLiteral;
1732
1732
  }, {
1733
1733
  function: {