notdiamond 2.0.0-rc16 → 2.0.0-rc17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-rc17 (2025-11-14)
4
+
5
+ Full Changelog: [v2.0.0-rc16...v2.0.0-rc17](https://github.com/Not-Diamond/not-diamond-typescript/compare/v2.0.0-rc16...v2.0.0-rc17)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **docs:** update README to correct prompt adaptation method calls and improve clarity ([92d08c9](https://github.com/Not-Diamond/not-diamond-typescript/commit/92d08c91068ab3a6d022c3675ff5e7d98092bed6))
10
+
3
11
  ## 2.0.0-rc16 (2025-11-14)
4
12
 
5
13
  Full Changelog: [v2.0.0-rc15...v2.0.0-rc16](https://github.com/Not-Diamond/not-diamond-typescript/compare/v2.0.0-rc15...v2.0.0-rc16)
package/README.md CHANGED
@@ -42,7 +42,7 @@ const client = new Notdiamond({
42
42
  });
43
43
 
44
44
  // Step 1: Start a prompt adaptation job
45
- const adaptation = await client.prompt.adapt.create({
45
+ const adaptation = await client.promptAdaptation.adapt({
46
46
  fields: ['question'],
47
47
  system_prompt: 'You are a helpful assistant that answers questions accurately.',
48
48
  target_models: [
@@ -76,7 +76,7 @@ console.log(`Adaptation started: ${adaptation.adaptation_run_id}`);
76
76
  // Step 2: Poll for completion (typically takes 10-30 minutes)
77
77
  let status;
78
78
  while (true) {
79
- status = await client.prompt.getAdaptStatus(adaptation.adaptation_run_id);
79
+ status = await client.promptAdaptation.getAdaptStatus(adaptation.adaptation_run_id);
80
80
  console.log(`Status: ${status.status}`);
81
81
 
82
82
  if (status.status === 'queued') {
@@ -92,7 +92,7 @@ while (true) {
92
92
 
93
93
  // Step 3: Get the optimized prompts
94
94
  if (status.status === 'completed') {
95
- const results = await client.prompt.getAdaptResults(adaptation.adaptation_run_id);
95
+ const results = await client.promptAdaptation.getAdaptResults(adaptation.adaptation_run_id);
96
96
 
97
97
  console.log(`\nOrigin model baseline: ${results.origin_model.score.toFixed(2)}`);
98
98
 
@@ -150,14 +150,15 @@ const client = new NotDiamond({
150
150
  apiKey: process.env['NOTDIAMOND_API_KEY'], // This is the default and can be omitted
151
151
  });
152
152
 
153
- await client.pzn.trainCustomRouter({
153
+ await client.customRouter.trainCustomRouter({
154
154
  dataset_file: fs.createReadStream('/path/to/file'),
155
155
  language: 'english',
156
156
  llm_providers:
157
157
  '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
158
158
  maximize: true,
159
159
  prompt_column: 'prompt',
160
- });
160
+ });cust
161
+ ```
161
162
 
162
163
  ### Request & Response types
163
164
 
@@ -201,7 +202,7 @@ const params: NotDiamond.PromptAdaptCreateParams = {
201
202
  },
202
203
  ],
203
204
  };
204
- const response: NotDiamond.PromptAdaptCreateResponse = await client.prompt.adapt.create(params);
205
+ const response: NotDiamond.PromptAdaptCreateResponse = await client.promptAdaptation.adapt(params);
205
206
  console.log(response.adaptation_run_id);
206
207
  ```
207
208
 
@@ -220,7 +221,7 @@ import NotDiamond from 'notdiamond';
220
221
  const client = new NotDiamond();
221
222
 
222
223
  try {
223
- await client.prompt.adapt.create({
224
+ await client.promptAdaptation.adapt({
224
225
  fields: ['question'],
225
226
  system_prompt: 'You are a helpful assistant.',
226
227
  target_models: [
@@ -438,7 +439,7 @@ parameter. This library doesn't validate at runtime that the request matches the
438
439
  send will be sent as-is.
439
440
 
440
441
  ```ts
441
- client.prompt.adapt.create({
442
+ client.promptAdaptation.adapt({
442
443
  fields: ['question'],
443
444
  system_prompt: 'You are a helpful assistant.',
444
445
  target_models: [{ model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notdiamond",
3
- "version": "2.0.0-rc16",
3
+ "version": "2.0.0-rc17",
4
4
  "description": "The official TypeScript library for the Notdiamond API",
5
5
  "author": "Notdiamond <contact@notdiamond.ai>",
6
6
  "types": "./index.d.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.0.0-rc16'; // x-release-please-version
1
+ export const VERSION = '2.0.0-rc17'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.0-rc16";
1
+ export declare const VERSION = "2.0.0-rc17";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.0-rc16";
1
+ export declare const VERSION = "2.0.0-rc17";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.0.0-rc16'; // x-release-please-version
4
+ exports.VERSION = '2.0.0-rc17'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.0.0-rc16'; // x-release-please-version
1
+ export const VERSION = '2.0.0-rc17'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map