notdiamond 2.0.0-rc11 → 2.0.0-rc14
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 +22 -0
- package/README.md +37 -148
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/package.json +2 -2
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/prompt-adaptation.d.mts +5 -5
- package/resources/prompt-adaptation.d.mts.map +1 -1
- package/resources/prompt-adaptation.d.ts +5 -5
- package/resources/prompt-adaptation.d.ts.map +1 -1
- package/resources/prompt-adaptation.js +2 -2
- package/resources/prompt-adaptation.js.map +1 -1
- package/resources/prompt-adaptation.mjs +2 -2
- package/resources/prompt-adaptation.mjs.map +1 -1
- package/src/client.ts +4 -4
- package/src/resources/index.ts +2 -2
- package/src/resources/prompt-adaptation.ts +8 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc14 (2025-11-14)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.0.0-rc13...v2.0.0-rc14](https://github.com/Not-Diamond/not-diamond-typescript/compare/v2.0.0-rc13...v2.0.0-rc14)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([ef30432](https://github.com/Not-Diamond/not-diamond-typescript/commit/ef304326d8b0e0312c333e9c9c559c4a7de56d78))
|
|
10
|
+
|
|
11
|
+
## 2.0.0-rc13 (2025-11-13)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v2.0.0-rc11...v2.0.0-rc13](https://github.com/Not-Diamond/not-diamond-typescript/compare/v2.0.0-rc11...v2.0.0-rc13)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** manual updates ([39f6d64](https://github.com/Not-Diamond/not-diamond-typescript/commit/39f6d6412feea4853877ef81660b3b4bb1b8fce1))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
|
|
22
|
+
* update README to reflect changes in prompt adaptation details and API key naming convention ([664607c](https://github.com/Not-Diamond/not-diamond-typescript/commit/664607c23a691c96d8f9e7884a464fe5788d03ca))
|
|
23
|
+
* update README to remove Prompt Adaptation section and add Train Custom Router section with usage examples ([f568d40](https://github.com/Not-Diamond/not-diamond-typescript/commit/f568d406342742092a8f512373335764611005e4))
|
|
24
|
+
|
|
3
25
|
## 2.0.0-rc11 (2025-11-12)
|
|
4
26
|
|
|
5
27
|
Full Changelog: [v2.0.0-rc10...v2.0.0-rc11](https://github.com/Not-Diamond/not-diamond-typescript/compare/v2.0.0-rc10...v2.0.0-rc11)
|
package/README.md
CHANGED
|
@@ -6,20 +6,17 @@ This library provides convenient access to the Notdiamond REST API from server-s
|
|
|
6
6
|
|
|
7
7
|
The library includes type definitions for all request params and response fields.
|
|
8
8
|
|
|
9
|
-
It is generated with [Stainless](https://www.stainless.com/).
|
|
10
|
-
|
|
11
9
|
## What is Prompt Adaptation?
|
|
12
10
|
|
|
13
|
-
Not Diamond specializes in **Prompt Adaptation** - automatically optimizing your prompts to work optimally across different LLMs. Each language model has unique characteristics, instruction-following patterns, and preferred prompt formats. A prompt that works perfectly for GPT-
|
|
14
|
-
|
|
15
|
-
**The Problem**: Manually rewriting prompts for each model is time-consuming and requires deep expertise in each model's quirks.
|
|
11
|
+
Not Diamond specializes in **Prompt Adaptation** - automatically optimizing your prompts to work optimally across different LLMs. Each language model has unique characteristics, instruction-following patterns, and preferred prompt formats. A prompt that works perfectly for GPT-5 might perform poorly on Claude or Gemini.
|
|
12
|
+
Manually rewriting prompts for each model is time-consuming and requires deep expertise in each model's quirks.
|
|
16
13
|
|
|
17
|
-
**The Solution**: Not Diamond automatically adapts your prompts
|
|
14
|
+
**The Solution**: Not Diamond automatically adapts your prompts with:
|
|
18
15
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
16
|
+
- Automatic optimization of both system and user prompts
|
|
17
|
+
- Built-in evaluation metrics
|
|
18
|
+
- Minimum 25 training examples recommended
|
|
19
|
+
- Processing time: typically 10–30 minutes
|
|
23
20
|
|
|
24
21
|
## Documentation
|
|
25
22
|
|
|
@@ -33,10 +30,6 @@ npm install notdiamond
|
|
|
33
30
|
|
|
34
31
|
## Usage
|
|
35
32
|
|
|
36
|
-
### Prompt Adaptation
|
|
37
|
-
|
|
38
|
-
Automatically optimize your prompts to work better across different language models. Each model has unique characteristics and preferences - what works well for GPT-4 might not work as well for Claude or Gemini. Prompt Adaptation helps you get optimal performance from each model.
|
|
39
|
-
|
|
40
33
|
#### Quick Start
|
|
41
34
|
|
|
42
35
|
<!-- prettier-ignore -->
|
|
@@ -45,7 +38,7 @@ Automatically optimize your prompts to work better across different language mod
|
|
|
45
38
|
import NotDiamond from 'notdiamond';
|
|
46
39
|
|
|
47
40
|
const client = new Notdiamond({
|
|
48
|
-
apiKey: process.env['
|
|
41
|
+
apiKey: process.env['NOTDIAMOND_API_KEY'], // This is the default and can be omitted
|
|
49
42
|
});
|
|
50
43
|
|
|
51
44
|
// Step 1: Start a prompt adaptation job
|
|
@@ -116,39 +109,20 @@ if (status.status === 'completed') {
|
|
|
116
109
|
}
|
|
117
110
|
```
|
|
118
111
|
|
|
119
|
-
#### Key Features
|
|
120
|
-
|
|
121
|
-
- **Automatic Optimization**: Adapts both system prompts and user message templates
|
|
122
|
-
- **Evaluation Metrics**: Choose from standard metrics (semantic similarity, JSON matching, SQL) or provide custom evaluation
|
|
123
|
-
- **Dataset Requirements**: Minimum 25 training examples (more examples = better results)
|
|
124
|
-
- **Processing Time**: Typically 10-30 minutes depending on dataset size and number of target models
|
|
125
|
-
- **Subscription Tiers**: Support for 1-10 target models depending on your plan
|
|
126
|
-
|
|
127
|
-
#### Evaluation Metrics
|
|
128
|
-
|
|
129
|
-
Choose from standard metrics:
|
|
130
|
-
|
|
131
|
-
- `LLMaaJ:Sem_Sim_1`, `LLMaaJ:Sem_Sim_3`, `LLMaaJ:Sem_Sim_10` - Semantic similarity
|
|
132
|
-
- `LLMaaJ:SQL` - SQL query validation
|
|
133
|
-
- `JSON_Match` - JSON structure matching
|
|
134
|
-
|
|
135
|
-
Or provide custom evaluation configuration with your own LLM judge.
|
|
136
|
-
|
|
137
|
-
#### Best Practices
|
|
138
|
-
|
|
139
|
-
1. **Use Representative Examples**: Include diverse examples from your production workload
|
|
140
|
-
2. **Sufficient Dataset Size**: Use at least 25 training examples (50+ recommended)
|
|
141
|
-
3. **Train/Test Split**: Separate train_goldens and test_goldens for proper validation
|
|
142
|
-
4. **A/B Test Results**: Validate optimized prompts in production before full deployment
|
|
143
|
-
|
|
144
112
|
For more details, see the [Prompt Adaptation documentation](https://docs.notdiamond.ai/docs/adapting-prompts-to-new-models).
|
|
145
113
|
|
|
146
114
|
### Model Routing
|
|
147
115
|
|
|
148
|
-
|
|
116
|
+
Select the best model automatically:
|
|
149
117
|
|
|
150
118
|
<!-- prettier-ignore -->
|
|
151
119
|
```ts
|
|
120
|
+
import NotDiamond from 'notdiamond';
|
|
121
|
+
|
|
122
|
+
const client = new NotDiamond({
|
|
123
|
+
apiKey: process.env['NOTDIAMOND_API_KEY'], // This is the default and can be omitted
|
|
124
|
+
});
|
|
125
|
+
|
|
152
126
|
const response = await client.modelRouter.selectModel({
|
|
153
127
|
llm_providers: [
|
|
154
128
|
{ model: 'gpt-4o', provider: 'openai' },
|
|
@@ -164,6 +138,27 @@ const response = await client.modelRouter.selectModel({
|
|
|
164
138
|
console.log(response.providers);
|
|
165
139
|
```
|
|
166
140
|
|
|
141
|
+
### Train Custom Router
|
|
142
|
+
|
|
143
|
+
For even better performance, you can train a custom router on your own dataset. This allows the router to learn the specific patterns and preferences of your use case:
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
import fs from 'fs';
|
|
147
|
+
import NotDiamond from 'notdiamond';
|
|
148
|
+
|
|
149
|
+
const client = new NotDiamond({
|
|
150
|
+
apiKey: process.env['NOTDIAMOND_API_KEY'], // This is the default and can be omitted
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
await client.pzn.trainCustomRouter({
|
|
154
|
+
dataset_file: fs.createReadStream('/path/to/file'),
|
|
155
|
+
language: 'english',
|
|
156
|
+
llm_providers:
|
|
157
|
+
'[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
|
|
158
|
+
maximize: true,
|
|
159
|
+
prompt_column: 'prompt',
|
|
160
|
+
});
|
|
161
|
+
|
|
167
162
|
### Request & Response types
|
|
168
163
|
|
|
169
164
|
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
|
@@ -173,7 +168,7 @@ This library includes TypeScript definitions for all request params and response
|
|
|
173
168
|
import Notdiamond from 'notdiamond';
|
|
174
169
|
|
|
175
170
|
const client = new Notdiamond({
|
|
176
|
-
apiKey: process.env['
|
|
171
|
+
apiKey: process.env['NOTDIAMOND_API_KEY'], // This is the default and can be omitted
|
|
177
172
|
});
|
|
178
173
|
|
|
179
174
|
const params: NotDiamond.PromptAdaptCreateParams = {
|
|
@@ -212,70 +207,6 @@ console.log(response.adaptation_run_id);
|
|
|
212
207
|
|
|
213
208
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
214
209
|
|
|
215
|
-
## File uploads
|
|
216
|
-
|
|
217
|
-
Request parameters that correspond to file uploads can be passed in many different forms:
|
|
218
|
-
|
|
219
|
-
- `File` (or an object with the same structure)
|
|
220
|
-
- a `fetch` `Response` (or an object with the same structure)
|
|
221
|
-
- an `fs.ReadStream`
|
|
222
|
-
- the return value of our `toFile` helper
|
|
223
|
-
|
|
224
|
-
```ts
|
|
225
|
-
import fs from 'fs';
|
|
226
|
-
import Notdiamond, { toFile } from 'notdiamond';
|
|
227
|
-
|
|
228
|
-
const client = new Notdiamond();
|
|
229
|
-
|
|
230
|
-
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
|
|
231
|
-
await client.customRouter.trainCustomRouter({
|
|
232
|
-
dataset_file: fs.createReadStream('/path/to/file'),
|
|
233
|
-
language: 'english',
|
|
234
|
-
llm_providers:
|
|
235
|
-
'[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
|
|
236
|
-
maximize: true,
|
|
237
|
-
prompt_column: 'prompt',
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
// Or if you have the web `File` API you can pass a `File` instance:
|
|
241
|
-
await client.customRouter.trainCustomRouter({
|
|
242
|
-
dataset_file: new File(['my bytes'], 'file'),
|
|
243
|
-
language: 'english',
|
|
244
|
-
llm_providers:
|
|
245
|
-
'[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
|
|
246
|
-
maximize: true,
|
|
247
|
-
prompt_column: 'prompt',
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
// You can also pass a `fetch` `Response`:
|
|
251
|
-
await client.customRouter.trainCustomRouter({
|
|
252
|
-
dataset_file: await fetch('https://somesite/file'),
|
|
253
|
-
language: 'english',
|
|
254
|
-
llm_providers:
|
|
255
|
-
'[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
|
|
256
|
-
maximize: true,
|
|
257
|
-
prompt_column: 'prompt',
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
// Finally, if none of the above are convenient, you can use our `toFile` helper:
|
|
261
|
-
await client.customRouter.trainCustomRouter({
|
|
262
|
-
dataset_file: await toFile(Buffer.from('my bytes'), 'file'),
|
|
263
|
-
language: 'english',
|
|
264
|
-
llm_providers:
|
|
265
|
-
'[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
|
|
266
|
-
maximize: true,
|
|
267
|
-
prompt_column: 'prompt',
|
|
268
|
-
});
|
|
269
|
-
await client.customRouter.trainCustomRouter({
|
|
270
|
-
dataset_file: await toFile(new Uint8Array([0, 1, 2]), 'file'),
|
|
271
|
-
language: 'english',
|
|
272
|
-
llm_providers:
|
|
273
|
-
'[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
|
|
274
|
-
maximize: true,
|
|
275
|
-
prompt_column: 'prompt',
|
|
276
|
-
});
|
|
277
|
-
```
|
|
278
|
-
|
|
279
210
|
## Handling errors
|
|
280
211
|
|
|
281
212
|
When the library is unable to connect to the API,
|
|
@@ -340,48 +271,6 @@ Error codes are as follows:
|
|
|
340
271
|
| >=500 | `InternalServerError` |
|
|
341
272
|
| N/A | `APIConnectionError` |
|
|
342
273
|
|
|
343
|
-
### Retries
|
|
344
|
-
|
|
345
|
-
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
|
|
346
|
-
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
347
|
-
429 Rate Limit, and >=500 Internal errors will all be retried by default.
|
|
348
|
-
|
|
349
|
-
You can use the `maxRetries` option to configure or disable this:
|
|
350
|
-
|
|
351
|
-
<!-- prettier-ignore -->
|
|
352
|
-
```js
|
|
353
|
-
// Configure the default for all requests:
|
|
354
|
-
const client = new Notdiamond({
|
|
355
|
-
maxRetries: 0, // default is 2
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
// Or, configure per-request:
|
|
359
|
-
await client.prompt.adapt.create({
|
|
360
|
-
fields: ['question'],
|
|
361
|
-
system_prompt: 'You are a helpful assistant.',
|
|
362
|
-
target_models: [
|
|
363
|
-
{
|
|
364
|
-
model: 'claude-sonnet-4-5-20250929',
|
|
365
|
-
provider: 'anthropic',
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
model: 'gemini-2.5-flash',
|
|
369
|
-
provider: 'google',
|
|
370
|
-
},
|
|
371
|
-
],
|
|
372
|
-
template: 'Question: {question}\nAnswer:',
|
|
373
|
-
train_goldens: [
|
|
374
|
-
{ fields: { question: 'What is 2+2?' }, answer: '4' },
|
|
375
|
-
// Add at least 25 examples...
|
|
376
|
-
],
|
|
377
|
-
test_goldens: [
|
|
378
|
-
{ fields: { question: 'What is 3*3?' }, answer: '9' },
|
|
379
|
-
],
|
|
380
|
-
}, {
|
|
381
|
-
maxRetries: 5,
|
|
382
|
-
});
|
|
383
|
-
```
|
|
384
|
-
|
|
385
274
|
### Timeouts
|
|
386
275
|
|
|
387
276
|
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
|
package/client.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ import { CustomRouter, CustomRouterTrainCustomRouterParams, CustomRouterTrainCus
|
|
|
10
10
|
import { ModelRouter, ModelRouterSelectModelParams, ModelRouterSelectModelResponse } from "./resources/model-router.mjs";
|
|
11
11
|
import { Model, ModelListParams, ModelListResponse, Models } from "./resources/models.mjs";
|
|
12
12
|
import { PreferenceCreateParams, PreferenceCreateResponse, PreferenceDeleteResponse, PreferenceUpdateParams, PreferenceUpdateResponse, Preferences } from "./resources/preferences.mjs";
|
|
13
|
-
import { GoldenRecord, JobStatus, PromptAdaptation,
|
|
13
|
+
import { GoldenRecord, JobStatus, PromptAdaptation, PromptAdaptationAdaptParams, PromptAdaptationAdaptResponse, PromptAdaptationGetAdaptResultsResponse, PromptAdaptationGetAdaptStatusResponse, PromptAdaptationGetCostsResponse, RequestProvider } from "./resources/prompt-adaptation.mjs";
|
|
14
14
|
import { Report } from "./resources/report/report.mjs";
|
|
15
15
|
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
16
16
|
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
@@ -185,7 +185,7 @@ export declare namespace Notdiamond {
|
|
|
185
185
|
export { ModelRouter as ModelRouter, type ModelRouterSelectModelResponse as ModelRouterSelectModelResponse, type ModelRouterSelectModelParams as ModelRouterSelectModelParams, };
|
|
186
186
|
export { Report as Report };
|
|
187
187
|
export { Preferences as Preferences, type PreferenceCreateResponse as PreferenceCreateResponse, type PreferenceUpdateResponse as PreferenceUpdateResponse, type PreferenceDeleteResponse as PreferenceDeleteResponse, type PreferenceCreateParams as PreferenceCreateParams, type PreferenceUpdateParams as PreferenceUpdateParams, };
|
|
188
|
-
export { PromptAdaptation as PromptAdaptation, type GoldenRecord as GoldenRecord, type JobStatus as JobStatus, type RequestProvider as RequestProvider, type
|
|
188
|
+
export { PromptAdaptation as PromptAdaptation, 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, };
|
|
189
189
|
export { CustomRouter as CustomRouter, type CustomRouterTrainCustomRouterResponse as CustomRouterTrainCustomRouterResponse, type CustomRouterTrainCustomRouterParams as CustomRouterTrainCustomRouterParams, };
|
|
190
190
|
export { Models as Models, type Model as Model, type ModelListResponse as ModelListResponse, type ModelListParams as ModelListParams, };
|
|
191
191
|
}
|
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAA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,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,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;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/client.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { CustomRouter, CustomRouterTrainCustomRouterParams, CustomRouterTrainCus
|
|
|
10
10
|
import { ModelRouter, ModelRouterSelectModelParams, ModelRouterSelectModelResponse } from "./resources/model-router.js";
|
|
11
11
|
import { Model, ModelListParams, ModelListResponse, Models } from "./resources/models.js";
|
|
12
12
|
import { PreferenceCreateParams, PreferenceCreateResponse, PreferenceDeleteResponse, PreferenceUpdateParams, PreferenceUpdateResponse, Preferences } from "./resources/preferences.js";
|
|
13
|
-
import { GoldenRecord, JobStatus, PromptAdaptation,
|
|
13
|
+
import { GoldenRecord, JobStatus, PromptAdaptation, PromptAdaptationAdaptParams, PromptAdaptationAdaptResponse, PromptAdaptationGetAdaptResultsResponse, PromptAdaptationGetAdaptStatusResponse, PromptAdaptationGetCostsResponse, RequestProvider } from "./resources/prompt-adaptation.js";
|
|
14
14
|
import { Report } from "./resources/report/report.js";
|
|
15
15
|
import { type Fetch } from "./internal/builtin-types.js";
|
|
16
16
|
import { HeadersLike, NullableHeaders } from "./internal/headers.js";
|
|
@@ -185,7 +185,7 @@ export declare namespace Notdiamond {
|
|
|
185
185
|
export { ModelRouter as ModelRouter, type ModelRouterSelectModelResponse as ModelRouterSelectModelResponse, type ModelRouterSelectModelParams as ModelRouterSelectModelParams, };
|
|
186
186
|
export { Report as Report };
|
|
187
187
|
export { Preferences as Preferences, type PreferenceCreateResponse as PreferenceCreateResponse, type PreferenceUpdateResponse as PreferenceUpdateResponse, type PreferenceDeleteResponse as PreferenceDeleteResponse, type PreferenceCreateParams as PreferenceCreateParams, type PreferenceUpdateParams as PreferenceUpdateParams, };
|
|
188
|
-
export { PromptAdaptation as PromptAdaptation, type GoldenRecord as GoldenRecord, type JobStatus as JobStatus, type RequestProvider as RequestProvider, type
|
|
188
|
+
export { PromptAdaptation as PromptAdaptation, 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, };
|
|
189
189
|
export { CustomRouter as CustomRouter, type CustomRouterTrainCustomRouterResponse as CustomRouterTrainCustomRouterResponse, type CustomRouterTrainCustomRouterParams as CustomRouterTrainCustomRouterParams, };
|
|
190
190
|
export { Models as Models, type Model as Model, type ModelListResponse as ModelListResponse, type ModelListParams as ModelListParams, };
|
|
191
191
|
}
|
package/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE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sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,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;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notdiamond",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc14",
|
|
4
4
|
"description": "The official TypeScript library for the Notdiamond API",
|
|
5
|
-
"author": "Notdiamond <
|
|
5
|
+
"author": "Notdiamond <contact@notdiamond.ai>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "commonjs",
|
package/resources/index.d.mts
CHANGED
|
@@ -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
|
|
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,
|
|
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"}
|
package/resources/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
package/resources/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+GG;IACH,
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+GG;IACH,KAAK,CACH,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACH,eAAe,CACb,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uCAAuC,CAAC;IAItD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,cAAc,CACZ,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sCAAsC,CAAC;IAIrD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,eAAe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+70,7 @@ export declare class PromptAdaptation extends APIResource {
|
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
73
|
-
* const
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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,KAAK,CACH,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;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
|
|
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
|
-
|
|
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,
|
|
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,KAAK,CACH,IAAiC,EACjC,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;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,eAAuB,EAAE,OAAwB;QACxD,OAAO,IAAI,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
|
|
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
|
-
|
|
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,
|
|
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,KAAK,CACH,IAAiC,EACjC,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,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,cAAc,CACZ,eAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,eAAe,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,eAAuB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,eAAe,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -40,8 +40,8 @@ import {
|
|
|
40
40
|
GoldenRecord,
|
|
41
41
|
JobStatus,
|
|
42
42
|
PromptAdaptation,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
PromptAdaptationAdaptParams,
|
|
44
|
+
PromptAdaptationAdaptResponse,
|
|
45
45
|
PromptAdaptationGetAdaptResultsResponse,
|
|
46
46
|
PromptAdaptationGetAdaptStatusResponse,
|
|
47
47
|
PromptAdaptationGetCostsResponse,
|
|
@@ -769,11 +769,11 @@ export declare namespace Notdiamond {
|
|
|
769
769
|
type GoldenRecord as GoldenRecord,
|
|
770
770
|
type JobStatus as JobStatus,
|
|
771
771
|
type RequestProvider as RequestProvider,
|
|
772
|
-
type
|
|
772
|
+
type PromptAdaptationAdaptResponse as PromptAdaptationAdaptResponse,
|
|
773
773
|
type PromptAdaptationGetAdaptResultsResponse as PromptAdaptationGetAdaptResultsResponse,
|
|
774
774
|
type PromptAdaptationGetAdaptStatusResponse as PromptAdaptationGetAdaptStatusResponse,
|
|
775
775
|
type PromptAdaptationGetCostsResponse as PromptAdaptationGetCostsResponse,
|
|
776
|
-
type
|
|
776
|
+
type PromptAdaptationAdaptParams as PromptAdaptationAdaptParams,
|
|
777
777
|
};
|
|
778
778
|
|
|
779
779
|
export {
|
package/src/resources/index.ts
CHANGED
|
@@ -24,10 +24,10 @@ export {
|
|
|
24
24
|
type GoldenRecord,
|
|
25
25
|
type JobStatus,
|
|
26
26
|
type RequestProvider,
|
|
27
|
-
type
|
|
27
|
+
type PromptAdaptationAdaptResponse,
|
|
28
28
|
type PromptAdaptationGetAdaptResultsResponse,
|
|
29
29
|
type PromptAdaptationGetAdaptStatusResponse,
|
|
30
30
|
type PromptAdaptationGetCostsResponse,
|
|
31
|
-
type
|
|
31
|
+
type PromptAdaptationAdaptParams,
|
|
32
32
|
} from './prompt-adaptation';
|
|
33
33
|
export { Report } from './report/report';
|
|
@@ -74,7 +74,7 @@ export class PromptAdaptation extends APIResource {
|
|
|
74
74
|
*
|
|
75
75
|
* @example
|
|
76
76
|
* ```ts
|
|
77
|
-
* const
|
|
77
|
+
* const response = await client.promptAdaptation.adapt({
|
|
78
78
|
* fields: ['question'],
|
|
79
79
|
* system_prompt: 'You are a helpful assistant that answers questions accurately.',
|
|
80
80
|
* target_models: [
|
|
@@ -119,10 +119,10 @@ export class PromptAdaptation extends APIResource {
|
|
|
119
119
|
* });
|
|
120
120
|
* ```
|
|
121
121
|
*/
|
|
122
|
-
|
|
123
|
-
body:
|
|
122
|
+
adapt(
|
|
123
|
+
body: PromptAdaptationAdaptParams,
|
|
124
124
|
options?: RequestOptions,
|
|
125
|
-
): APIPromise<
|
|
125
|
+
): APIPromise<PromptAdaptationAdaptResponse> {
|
|
126
126
|
return this._client.post('/v2/prompt/adapt', { body, ...options });
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -363,7 +363,7 @@ export interface RequestProvider {
|
|
|
363
363
|
* /v2/prompt/adaptResults/{adaptation_run_id}
|
|
364
364
|
* 4. Use the optimized prompts with your target models
|
|
365
365
|
*/
|
|
366
|
-
export interface
|
|
366
|
+
export interface PromptAdaptationAdaptResponse {
|
|
367
367
|
/**
|
|
368
368
|
* Unique identifier for this adaptation run. Use this to poll status and retrieve
|
|
369
369
|
* optimized prompts when complete
|
|
@@ -697,7 +697,7 @@ export namespace PromptAdaptationGetCostsResponse {
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
|
|
700
|
-
export interface
|
|
700
|
+
export interface PromptAdaptationAdaptParams {
|
|
701
701
|
/**
|
|
702
702
|
* List of field names that will be substituted into the template. Must match keys
|
|
703
703
|
* in golden records
|
|
@@ -761,10 +761,10 @@ export declare namespace PromptAdaptation {
|
|
|
761
761
|
type GoldenRecord as GoldenRecord,
|
|
762
762
|
type JobStatus as JobStatus,
|
|
763
763
|
type RequestProvider as RequestProvider,
|
|
764
|
-
type
|
|
764
|
+
type PromptAdaptationAdaptResponse as PromptAdaptationAdaptResponse,
|
|
765
765
|
type PromptAdaptationGetAdaptResultsResponse as PromptAdaptationGetAdaptResultsResponse,
|
|
766
766
|
type PromptAdaptationGetAdaptStatusResponse as PromptAdaptationGetAdaptStatusResponse,
|
|
767
767
|
type PromptAdaptationGetCostsResponse as PromptAdaptationGetCostsResponse,
|
|
768
|
-
type
|
|
768
|
+
type PromptAdaptationAdaptParams as PromptAdaptationAdaptParams,
|
|
769
769
|
};
|
|
770
770
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.0.0-
|
|
1
|
+
export const VERSION = '2.0.0-rc14'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-
|
|
1
|
+
export declare const VERSION = "2.0.0-rc14";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-
|
|
1
|
+
export declare const VERSION = "2.0.0-rc14";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.0.0-
|
|
1
|
+
export const VERSION = '2.0.0-rc14'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|