notdiamond 2.0.0-rc10 → 2.0.0-rc13

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 (69) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE +1 -1
  3. package/README.md +61 -171
  4. package/client.d.mts +11 -11
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +11 -11
  7. package/client.d.ts.map +1 -1
  8. package/client.js +38 -38
  9. package/client.js.map +1 -1
  10. package/client.mjs +36 -36
  11. package/client.mjs.map +1 -1
  12. package/core/api-promise.d.mts +2 -2
  13. package/core/api-promise.d.ts +2 -2
  14. package/core/error.d.mts +2 -2
  15. package/core/error.d.ts +2 -2
  16. package/core/error.js +4 -4
  17. package/core/error.mjs +2 -2
  18. package/core/resource.d.mts +3 -3
  19. package/core/resource.d.ts +3 -3
  20. package/index.d.mts +3 -3
  21. package/index.d.ts +3 -3
  22. package/index.js +4 -4
  23. package/index.mjs +3 -3
  24. package/internal/parse.d.mts +2 -2
  25. package/internal/parse.d.ts +2 -2
  26. package/internal/shims.js +1 -1
  27. package/internal/shims.mjs +1 -1
  28. package/internal/uploads.d.mts +4 -4
  29. package/internal/uploads.d.ts +4 -4
  30. package/internal/utils/base64.js +2 -2
  31. package/internal/utils/base64.mjs +3 -3
  32. package/internal/utils/log.d.mts +3 -3
  33. package/internal/utils/log.d.ts +3 -3
  34. package/internal/utils/path.js +1 -1
  35. package/internal/utils/path.mjs +2 -2
  36. package/internal/utils/values.js +5 -5
  37. package/internal/utils/values.mjs +6 -6
  38. package/package.json +3 -3
  39. package/resources/index.d.mts +1 -1
  40. package/resources/index.d.mts.map +1 -1
  41. package/resources/index.d.ts +1 -1
  42. package/resources/index.d.ts.map +1 -1
  43. package/resources/prompt-adaptation.d.mts +5 -5
  44. package/resources/prompt-adaptation.d.mts.map +1 -1
  45. package/resources/prompt-adaptation.d.ts +5 -5
  46. package/resources/prompt-adaptation.d.ts.map +1 -1
  47. package/resources/prompt-adaptation.js +2 -2
  48. package/resources/prompt-adaptation.js.map +1 -1
  49. package/resources/prompt-adaptation.mjs +2 -2
  50. package/resources/prompt-adaptation.mjs.map +1 -1
  51. package/src/client.ts +24 -24
  52. package/src/core/api-promise.ts +4 -4
  53. package/src/core/error.ts +2 -2
  54. package/src/core/resource.ts +3 -3
  55. package/src/index.ts +3 -3
  56. package/src/internal/parse.ts +2 -2
  57. package/src/internal/shims.ts +1 -1
  58. package/src/internal/uploads.ts +5 -5
  59. package/src/internal/utils/base64.ts +3 -3
  60. package/src/internal/utils/log.ts +3 -3
  61. package/src/internal/utils/path.ts +2 -2
  62. package/src/internal/utils/values.ts +6 -6
  63. package/src/resources/index.ts +2 -2
  64. package/src/resources/prompt-adaptation.ts +8 -8
  65. package/src/version.ts +1 -1
  66. package/version.d.mts +1 -1
  67. package/version.d.ts +1 -1
  68. package/version.js +1 -1
  69. package/version.mjs +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { FinalRequestOptions } from "./request-options.js";
2
- import { type NotDiamond } from "../client.js";
2
+ import { type Notdiamond } from "../client.js";
3
3
  export type APIResponseProps = {
4
4
  response: Response;
5
5
  options: FinalRequestOptions;
@@ -8,5 +8,5 @@ export type APIResponseProps = {
8
8
  retryOfRequestLogID: string | undefined;
9
9
  startTime: number;
10
10
  };
11
- export declare function defaultParseResponse<T>(client: NotDiamond, props: APIResponseProps): Promise<T>;
11
+ export declare function defaultParseResponse<T>(client: Notdiamond, props: APIResponseProps): Promise<T>;
12
12
  //# sourceMappingURL=parse.d.ts.map
package/internal/shims.js CHANGED
@@ -10,7 +10,7 @@ function getDefaultFetch() {
10
10
  if (typeof fetch !== 'undefined') {
11
11
  return fetch;
12
12
  }
13
- throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new NotDiamond({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
13
+ throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new Notdiamond({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
14
14
  }
15
15
  function makeReadableStream(...args) {
16
16
  const ReadableStream = globalThis.ReadableStream;
@@ -3,7 +3,7 @@ export function getDefaultFetch() {
3
3
  if (typeof fetch !== 'undefined') {
4
4
  return fetch;
5
5
  }
6
- throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new NotDiamond({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
6
+ throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new Notdiamond({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
7
7
  }
8
8
  export function makeReadableStream(...args) {
9
9
  const ReadableStream = globalThis.ReadableStream;
@@ -1,6 +1,6 @@
1
1
  import { type RequestOptions } from "./request-options.mjs";
2
2
  import type { FilePropertyBag, Fetch } from "./builtin-types.mjs";
3
- import type { NotDiamond } from "../client.mjs";
3
+ import type { Notdiamond } from "../client.mjs";
4
4
  export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
5
5
  type FsReadStream = AsyncIterable<Uint8Array> & {
6
6
  path: string | {
@@ -32,11 +32,11 @@ export declare const isAsyncIterable: (value: any) => value is AsyncIterable<any
32
32
  * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
33
33
  * Otherwise returns the request as is.
34
34
  */
35
- export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: NotDiamond | Fetch) => Promise<RequestOptions>;
35
+ export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Notdiamond | Fetch) => Promise<RequestOptions>;
36
36
  type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
37
37
  body: unknown;
38
38
  };
39
- export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: NotDiamond | Fetch) => Promise<RequestOptions>;
40
- export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: NotDiamond | Fetch) => Promise<FormData>;
39
+ export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Notdiamond | Fetch) => Promise<RequestOptions>;
40
+ export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Notdiamond | Fetch) => Promise<FormData>;
41
41
  export {};
42
42
  //# sourceMappingURL=uploads.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { type RequestOptions } from "./request-options.js";
2
2
  import type { FilePropertyBag, Fetch } from "./builtin-types.js";
3
- import type { NotDiamond } from "../client.js";
3
+ import type { Notdiamond } from "../client.js";
4
4
  export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
5
5
  type FsReadStream = AsyncIterable<Uint8Array> & {
6
6
  path: string | {
@@ -32,11 +32,11 @@ export declare const isAsyncIterable: (value: any) => value is AsyncIterable<any
32
32
  * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
33
33
  * Otherwise returns the request as is.
34
34
  */
35
- export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: NotDiamond | Fetch) => Promise<RequestOptions>;
35
+ export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Notdiamond | Fetch) => Promise<RequestOptions>;
36
36
  type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
37
37
  body: unknown;
38
38
  };
39
- export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: NotDiamond | Fetch) => Promise<RequestOptions>;
40
- export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: NotDiamond | Fetch) => Promise<FormData>;
39
+ export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Notdiamond | Fetch) => Promise<RequestOptions>;
40
+ export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Notdiamond | Fetch) => Promise<FormData>;
41
41
  export {};
42
42
  //# sourceMappingURL=uploads.d.ts.map
@@ -16,7 +16,7 @@ const toBase64 = (data) => {
16
16
  if (typeof btoa !== 'undefined') {
17
17
  return btoa(String.fromCharCode.apply(null, data));
18
18
  }
19
- throw new error_1.NotDiamondError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined');
19
+ throw new error_1.NotdiamondError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined');
20
20
  };
21
21
  exports.toBase64 = toBase64;
22
22
  const fromBase64 = (str) => {
@@ -32,7 +32,7 @@ const fromBase64 = (str) => {
32
32
  }
33
33
  return buf;
34
34
  }
35
- throw new error_1.NotDiamondError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined');
35
+ throw new error_1.NotdiamondError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined');
36
36
  };
37
37
  exports.fromBase64 = fromBase64;
38
38
  //# sourceMappingURL=base64.js.map
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { NotDiamondError } from "../../core/error.mjs";
2
+ import { NotdiamondError } from "../../core/error.mjs";
3
3
  import { encodeUTF8 } from "./bytes.mjs";
4
4
  export const toBase64 = (data) => {
5
5
  if (!data)
@@ -13,7 +13,7 @@ export const toBase64 = (data) => {
13
13
  if (typeof btoa !== 'undefined') {
14
14
  return btoa(String.fromCharCode.apply(null, data));
15
15
  }
16
- throw new NotDiamondError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined');
16
+ throw new NotdiamondError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined');
17
17
  };
18
18
  export const fromBase64 = (str) => {
19
19
  if (typeof globalThis.Buffer !== 'undefined') {
@@ -28,6 +28,6 @@ export const fromBase64 = (str) => {
28
28
  }
29
29
  return buf;
30
30
  }
31
- throw new NotDiamondError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined');
31
+ throw new NotdiamondError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined');
32
32
  };
33
33
  //# sourceMappingURL=base64.mjs.map
@@ -1,4 +1,4 @@
1
- import { type NotDiamond } from "../../client.mjs";
1
+ import { type Notdiamond } from "../../client.mjs";
2
2
  import { RequestOptions } from "../request-options.mjs";
3
3
  type LogFn = (message: string, ...rest: unknown[]) => void;
4
4
  export type Logger = {
@@ -8,8 +8,8 @@ export type Logger = {
8
8
  debug: LogFn;
9
9
  };
10
10
  export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
11
- export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: NotDiamond) => LogLevel | undefined;
12
- export declare function loggerFor(client: NotDiamond): Logger;
11
+ export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: Notdiamond) => LogLevel | undefined;
12
+ export declare function loggerFor(client: Notdiamond): Logger;
13
13
  export declare const formatRequestDetails: (details: {
14
14
  options?: RequestOptions | undefined;
15
15
  headers?: Headers | Record<string, string> | undefined;
@@ -1,4 +1,4 @@
1
- import { type NotDiamond } from "../../client.js";
1
+ import { type Notdiamond } from "../../client.js";
2
2
  import { RequestOptions } from "../request-options.js";
3
3
  type LogFn = (message: string, ...rest: unknown[]) => void;
4
4
  export type Logger = {
@@ -8,8 +8,8 @@ export type Logger = {
8
8
  debug: LogFn;
9
9
  };
10
10
  export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
11
- export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: NotDiamond) => LogLevel | undefined;
12
- export declare function loggerFor(client: NotDiamond): Logger;
11
+ export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: Notdiamond) => LogLevel | undefined;
12
+ export declare function loggerFor(client: Notdiamond): Logger;
13
13
  export declare const formatRequestDetails: (details: {
14
14
  options?: RequestOptions | undefined;
15
15
  headers?: Headers | Record<string, string> | undefined;
@@ -65,7 +65,7 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(sta
65
65
  lastEnd = segment.start + segment.length;
66
66
  return acc + spaces + arrows;
67
67
  }, '');
68
- throw new error_1.NotDiamondError(`Path parameters result in path with invalid segments:\n${invalidSegments
68
+ throw new error_1.NotdiamondError(`Path parameters result in path with invalid segments:\n${invalidSegments
69
69
  .map((e) => e.error)
70
70
  .join('\n')}\n${path}\n${underline}`);
71
71
  }
@@ -1,4 +1,4 @@
1
- import { NotDiamondError } from "../../core/error.mjs";
1
+ import { NotdiamondError } from "../../core/error.mjs";
2
2
  /**
3
3
  * Percent-encode everything that isn't safe to have in a path without encoding safe chars.
4
4
  *
@@ -61,7 +61,7 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) => function p
61
61
  lastEnd = segment.start + segment.length;
62
62
  return acc + spaces + arrows;
63
63
  }, '');
64
- throw new NotDiamondError(`Path parameters result in path with invalid segments:\n${invalidSegments
64
+ throw new NotdiamondError(`Path parameters result in path with invalid segments:\n${invalidSegments
65
65
  .map((e) => e.error)
66
66
  .join('\n')}\n${path}\n${underline}`);
67
67
  }
@@ -40,17 +40,17 @@ function isObj(obj) {
40
40
  }
41
41
  const ensurePresent = (value) => {
42
42
  if (value == null) {
43
- throw new error_1.NotDiamondError(`Expected a value to be given but received ${value} instead.`);
43
+ throw new error_1.NotdiamondError(`Expected a value to be given but received ${value} instead.`);
44
44
  }
45
45
  return value;
46
46
  };
47
47
  exports.ensurePresent = ensurePresent;
48
48
  const validatePositiveInteger = (name, n) => {
49
49
  if (typeof n !== 'number' || !Number.isInteger(n)) {
50
- throw new error_1.NotDiamondError(`${name} must be an integer`);
50
+ throw new error_1.NotdiamondError(`${name} must be an integer`);
51
51
  }
52
52
  if (n < 0) {
53
- throw new error_1.NotDiamondError(`${name} must be a positive integer`);
53
+ throw new error_1.NotdiamondError(`${name} must be a positive integer`);
54
54
  }
55
55
  return n;
56
56
  };
@@ -60,7 +60,7 @@ const coerceInteger = (value) => {
60
60
  return Math.round(value);
61
61
  if (typeof value === 'string')
62
62
  return parseInt(value, 10);
63
- throw new error_1.NotDiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
63
+ throw new error_1.NotdiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
64
64
  };
65
65
  exports.coerceInteger = coerceInteger;
66
66
  const coerceFloat = (value) => {
@@ -68,7 +68,7 @@ const coerceFloat = (value) => {
68
68
  return value;
69
69
  if (typeof value === 'string')
70
70
  return parseFloat(value);
71
- throw new error_1.NotDiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
71
+ throw new error_1.NotdiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
72
72
  };
73
73
  exports.coerceFloat = coerceFloat;
74
74
  const coerceBoolean = (value) => {
@@ -1,5 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { NotDiamondError } from "../../core/error.mjs";
2
+ import { NotdiamondError } from "../../core/error.mjs";
3
3
  // https://url.spec.whatwg.org/#url-scheme-string
4
4
  const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
5
5
  export const isAbsoluteURL = (url) => {
@@ -31,16 +31,16 @@ export function isObj(obj) {
31
31
  }
32
32
  export const ensurePresent = (value) => {
33
33
  if (value == null) {
34
- throw new NotDiamondError(`Expected a value to be given but received ${value} instead.`);
34
+ throw new NotdiamondError(`Expected a value to be given but received ${value} instead.`);
35
35
  }
36
36
  return value;
37
37
  };
38
38
  export const validatePositiveInteger = (name, n) => {
39
39
  if (typeof n !== 'number' || !Number.isInteger(n)) {
40
- throw new NotDiamondError(`${name} must be an integer`);
40
+ throw new NotdiamondError(`${name} must be an integer`);
41
41
  }
42
42
  if (n < 0) {
43
- throw new NotDiamondError(`${name} must be a positive integer`);
43
+ throw new NotdiamondError(`${name} must be a positive integer`);
44
44
  }
45
45
  return n;
46
46
  };
@@ -49,14 +49,14 @@ export const coerceInteger = (value) => {
49
49
  return Math.round(value);
50
50
  if (typeof value === 'string')
51
51
  return parseInt(value, 10);
52
- throw new NotDiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
52
+ throw new NotdiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
53
53
  };
54
54
  export const coerceFloat = (value) => {
55
55
  if (typeof value === 'number')
56
56
  return value;
57
57
  if (typeof value === 'string')
58
58
  return parseFloat(value);
59
- throw new NotDiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
59
+ throw new NotdiamondError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
60
60
  };
61
61
  export const coerceBoolean = (value) => {
62
62
  if (typeof value === 'boolean')
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "notdiamond",
3
- "version": "2.0.0-rc10",
4
- "description": "The official TypeScript library for the Not Diamond API",
5
- "author": "Not Diamond <test@notdiamond.ai>",
3
+ "version": "2.0.0-rc13",
4
+ "description": "The official TypeScript library for the Notdiamond API",
5
+ "author": "Notdiamond <test@notdiamond.ai>",
6
6
  "types": "./index.d.ts",
7
7
  "main": "./index.js",
8
8
  "type": "commonjs",
@@ -2,6 +2,6 @@ export { CustomRouter, type CustomRouterTrainCustomRouterResponse, type CustomRo
2
2
  export { ModelRouter, type ModelRouterSelectModelResponse, type ModelRouterSelectModelParams, } from "./model-router.mjs";
3
3
  export { Models, type Model, type ModelListResponse, type ModelListParams } from "./models.mjs";
4
4
  export { Preferences, type PreferenceCreateResponse, type PreferenceUpdateResponse, type PreferenceDeleteResponse, type PreferenceCreateParams, type PreferenceUpdateParams, } from "./preferences.mjs";
5
- export { PromptAdaptation, type GoldenRecord, type JobStatus, type RequestProvider, type PromptAdaptationCreateResponse, type PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse, type PromptAdaptationCreateParams, } from "./prompt-adaptation.mjs";
5
+ export { PromptAdaptation, type GoldenRecord, type JobStatus, type RequestProvider, type PromptAdaptationAdaptResponse, type PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse, type PromptAdaptationAdaptParams, } from "./prompt-adaptation.mjs";
6
6
  export { Report } from "./report/report.mjs";
7
7
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,GACzC;OACM,EACL,WAAW,EACX,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE;OACpE,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B;OACM,EACL,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,GACzC;OACM,EACL,WAAW,EACX,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE;OACpE,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B;OACM,EACL,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,uCAAuC,EAC5C,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,GACjC;OACM,EAAE,MAAM,EAAE"}
@@ -2,6 +2,6 @@ export { CustomRouter, type CustomRouterTrainCustomRouterResponse, type CustomRo
2
2
  export { ModelRouter, type ModelRouterSelectModelResponse, type ModelRouterSelectModelParams, } from "./model-router.js";
3
3
  export { Models, type Model, type ModelListResponse, type ModelListParams } from "./models.js";
4
4
  export { Preferences, type PreferenceCreateResponse, type PreferenceUpdateResponse, type PreferenceDeleteResponse, type PreferenceCreateParams, type PreferenceUpdateParams, } from "./preferences.js";
5
- export { PromptAdaptation, type GoldenRecord, type JobStatus, type RequestProvider, type PromptAdaptationCreateResponse, type PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse, type PromptAdaptationCreateParams, } from "./prompt-adaptation.js";
5
+ export { PromptAdaptation, type GoldenRecord, type JobStatus, type RequestProvider, type PromptAdaptationAdaptResponse, type PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse, type PromptAdaptationAdaptParams, } from "./prompt-adaptation.js";
6
6
  export { Report } from "./report/report.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,GACzC;OACM,EACL,WAAW,EACX,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE;OACpE,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B;OACM,EACL,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,GACzC;OACM,EACL,WAAW,EACX,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,GAClC;OACM,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE;OACpE,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B;OACM,EACL,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,uCAAuC,EAC5C,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,GACjC;OACM,EAAE,MAAM,EAAE"}
@@ -70,7 +70,7 @@ export declare class PromptAdaptation extends APIResource {
70
70
  *
71
71
  * @example
72
72
  * ```ts
73
- * const promptAdaptation = await client.promptAdaptation.create({
73
+ * const response = await client.promptAdaptation.adapt({
74
74
  * fields: ['question'],
75
75
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
76
76
  * target_models: [
@@ -115,7 +115,7 @@ export declare class PromptAdaptation extends APIResource {
115
115
  * });
116
116
  * ```
117
117
  */
118
- create(body: PromptAdaptationCreateParams, options?: RequestOptions): APIPromise<PromptAdaptationCreateResponse>;
118
+ adapt(body: PromptAdaptationAdaptParams, options?: RequestOptions): APIPromise<PromptAdaptationAdaptResponse>;
119
119
  /**
120
120
  * Retrieve the complete results of a prompt adaptation run, including optimized
121
121
  * prompts for all target models.
@@ -330,7 +330,7 @@ export interface RequestProvider {
330
330
  * /v2/prompt/adaptResults/{adaptation_run_id}
331
331
  * 4. Use the optimized prompts with your target models
332
332
  */
333
- export interface PromptAdaptationCreateResponse {
333
+ export interface PromptAdaptationAdaptResponse {
334
334
  /**
335
335
  * Unique identifier for this adaptation run. Use this to poll status and retrieve
336
336
  * optimized prompts when complete
@@ -625,7 +625,7 @@ export declare namespace PromptAdaptationGetCostsResponse {
625
625
  user_id: string;
626
626
  }
627
627
  }
628
- export interface PromptAdaptationCreateParams {
628
+ export interface PromptAdaptationAdaptParams {
629
629
  /**
630
630
  * List of field names that will be substituted into the template. Must match keys
631
631
  * in golden records
@@ -674,6 +674,6 @@ export interface PromptAdaptationCreateParams {
674
674
  train_goldens?: Array<GoldenRecord> | null;
675
675
  }
676
676
  export declare namespace PromptAdaptation {
677
- export { type GoldenRecord as GoldenRecord, type JobStatus as JobStatus, type RequestProvider as RequestProvider, type PromptAdaptationCreateResponse as PromptAdaptationCreateResponse, type PromptAdaptationGetAdaptResultsResponse as PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse as PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse as PromptAdaptationGetCostsResponse, type PromptAdaptationCreateParams as PromptAdaptationCreateParams, };
677
+ export { type GoldenRecord as GoldenRecord, type JobStatus as JobStatus, type RequestProvider as RequestProvider, type PromptAdaptationAdaptResponse as PromptAdaptationAdaptResponse, type PromptAdaptationGetAdaptResultsResponse as PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse as PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse as PromptAdaptationGetCostsResponse, type PromptAdaptationAdaptParams as PromptAdaptationAdaptParams, };
678
678
  }
679
679
  //# sourceMappingURL=prompt-adaptation.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-adaptation.d.mts","sourceRoot":"","sources":["../src/resources/prompt-adaptation.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;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IAAI,SAAS,EAC3B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
@@ -70,7 +70,7 @@ export declare class PromptAdaptation extends APIResource {
70
70
  *
71
71
  * @example
72
72
  * ```ts
73
- * const promptAdaptation = await client.promptAdaptation.create({
73
+ * const response = await client.promptAdaptation.adapt({
74
74
  * fields: ['question'],
75
75
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
76
76
  * target_models: [
@@ -115,7 +115,7 @@ export declare class PromptAdaptation extends APIResource {
115
115
  * });
116
116
  * ```
117
117
  */
118
- create(body: PromptAdaptationCreateParams, options?: RequestOptions): APIPromise<PromptAdaptationCreateResponse>;
118
+ adapt(body: PromptAdaptationAdaptParams, options?: RequestOptions): APIPromise<PromptAdaptationAdaptResponse>;
119
119
  /**
120
120
  * Retrieve the complete results of a prompt adaptation run, including optimized
121
121
  * prompts for all target models.
@@ -330,7 +330,7 @@ export interface RequestProvider {
330
330
  * /v2/prompt/adaptResults/{adaptation_run_id}
331
331
  * 4. Use the optimized prompts with your target models
332
332
  */
333
- export interface PromptAdaptationCreateResponse {
333
+ export interface PromptAdaptationAdaptResponse {
334
334
  /**
335
335
  * Unique identifier for this adaptation run. Use this to poll status and retrieve
336
336
  * optimized prompts when complete
@@ -625,7 +625,7 @@ export declare namespace PromptAdaptationGetCostsResponse {
625
625
  user_id: string;
626
626
  }
627
627
  }
628
- export interface PromptAdaptationCreateParams {
628
+ export interface PromptAdaptationAdaptParams {
629
629
  /**
630
630
  * List of field names that will be substituted into the template. Must match keys
631
631
  * in golden records
@@ -674,6 +674,6 @@ export interface PromptAdaptationCreateParams {
674
674
  train_goldens?: Array<GoldenRecord> | null;
675
675
  }
676
676
  export declare namespace PromptAdaptation {
677
- export { type GoldenRecord as GoldenRecord, type JobStatus as JobStatus, type RequestProvider as RequestProvider, type PromptAdaptationCreateResponse as PromptAdaptationCreateResponse, type PromptAdaptationGetAdaptResultsResponse as PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse as PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse as PromptAdaptationGetCostsResponse, type PromptAdaptationCreateParams as PromptAdaptationCreateParams, };
677
+ export { type GoldenRecord as GoldenRecord, type JobStatus as JobStatus, type RequestProvider as RequestProvider, type PromptAdaptationAdaptResponse as PromptAdaptationAdaptResponse, type PromptAdaptationGetAdaptResultsResponse as PromptAdaptationGetAdaptResultsResponse, type PromptAdaptationGetAdaptStatusResponse as PromptAdaptationGetAdaptStatusResponse, type PromptAdaptationGetCostsResponse as PromptAdaptationGetCostsResponse, type PromptAdaptationAdaptParams as PromptAdaptationAdaptParams, };
678
678
  }
679
679
  //# sourceMappingURL=prompt-adaptation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-adaptation.d.ts","sourceRoot":"","sources":["../src/resources/prompt-adaptation.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+GG;IACH,MAAM,CACJ,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;IAI7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACH,eAAe,CACb,eAAe,EAAE,MAAM,EACvB,OAA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AAC;QAEnB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEtB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAEtC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAEtC;;;OAGG;IACH,6BAA6B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAE1C;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CAC5C;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
@@ -72,7 +72,7 @@ class PromptAdaptation extends resource_1.APIResource {
72
72
  *
73
73
  * @example
74
74
  * ```ts
75
- * const promptAdaptation = await client.promptAdaptation.create({
75
+ * const response = await client.promptAdaptation.adapt({
76
76
  * fields: ['question'],
77
77
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
78
78
  * target_models: [
@@ -117,7 +117,7 @@ class PromptAdaptation extends resource_1.APIResource {
117
117
  * });
118
118
  * ```
119
119
  */
120
- create(body, options) {
120
+ adapt(body, options) {
121
121
  return this._client.post('/v2/prompt/adapt', { body, ...options });
122
122
  }
123
123
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-adaptation.js","sourceRoot":"","sources":["../src/resources/prompt-adaptation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+GG;IACH,MAAM,CACJ,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACH,eAAe,CACb,eAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,cAAc,CACZ,eAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;;;;;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AAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,eAAe,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;CACF;AA7QD,4CA6QC"}
@@ -69,7 +69,7 @@ export class PromptAdaptation extends APIResource {
69
69
  *
70
70
  * @example
71
71
  * ```ts
72
- * const promptAdaptation = await client.promptAdaptation.create({
72
+ * const response = await client.promptAdaptation.adapt({
73
73
  * fields: ['question'],
74
74
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
75
75
  * target_models: [
@@ -114,7 +114,7 @@ export class PromptAdaptation extends APIResource {
114
114
  * });
115
115
  * ```
116
116
  */
117
- create(body, options) {
117
+ adapt(body, options) {
118
118
  return this._client.post('/v2/prompt/adapt', { body, ...options });
119
119
  }
120
120
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-adaptation.mjs","sourceRoot":"","sources":["../src/resources/prompt-adaptation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+GG;IACH,MAAM,CACJ,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACH,eAAe,CACb,eAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,eAAe,EAAE,EAAE,OAAO,CAAC,CA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