Skip to content

Commit f94d66b

Browse files
authored
Merge pull request #23 from Not-Diamond/release-please--branches--main--changes--next
release: 1.0.0-rc15
2 parents a77d5b8 + 2783157 commit f94d66b

7 files changed

Lines changed: 29 additions & 75 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.0.0-rc14"
2+
".": "1.0.0-rc15"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 11
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/not-diamond-dragos199993%2Fnotdiamond-ce07c2efae541713a6bc9c540111adb2b9ff9fd472f77338d851cfb4b92239f4.yml
3-
openapi_spec_hash: 9536c08e10a84315ce7555faff6c48dd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/not-diamond-dragos199993%2Fnotdiamond-726179b7b0c90f2715aa3173af7dc889f80d79b376ba6bb58cb9481965f42d5a.yml
3+
openapi_spec_hash: cd57c158ad6a480fef03dd3e2d4e2dfa
44
config_hash: 11ee9bddc4b7df5f656add53f8f1ed67

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.0.0-rc15 (2025-11-14)
4+
5+
Full Changelog: [v1.0.0-rc14...v1.0.0-rc15](https://github.com/Not-Diamond/not-diamond-python/compare/v1.0.0-rc14...v1.0.0-rc15)
6+
7+
### Features
8+
9+
* **api:** api update ([12c16a2](https://github.com/Not-Diamond/not-diamond-python/commit/12c16a218d211c47aaad82ad672f668a27715edf))
10+
311
## 1.0.0-rc14 (2025-11-14)
412

513
Full Changelog: [v1.0.0-rc13...v1.0.0-rc14](https://github.com/Not-Diamond/not-diamond-python/compare/v1.0.0-rc13...v1.0.0-rc14)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "notdiamond"
3-
version = "1.0.0-rc14"
3+
version = "1.0.0-rc15"
44
description = "The official Python library for the notdiamond API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/notdiamond/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "notdiamond"
4-
__version__ = "1.0.0-rc14" # x-release-please-version
4+
__version__ = "1.0.0-rc15" # x-release-please-version

src/notdiamond/resources/model_router.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def select_model(
6868
algorithm.
6969
7070
This endpoint analyzes your messages and returns the best-suited model from your
71-
specified providers. The router considers factors like query complexity, model
71+
specified models. The router considers factors like query complexity, model
7272
capabilities, cost, and latency based on your preferences.
7373
7474
**Key Features:**
@@ -77,14 +77,13 @@ def select_model(
7777
- Support for custom routers trained on your evaluation data
7878
- Optional cost/latency optimization
7979
- Function calling support for compatible models
80-
- Privacy-preserving content hashing
8180
8281
**Usage:**
8382
8483
1. Pass your messages in OpenAI format (array of objects with 'role' and
8584
'content')
8685
2. Specify which LLM providers you want to route between
87-
3. Optionally provide a preference_id for personalized routing
86+
3. Optionally provide a preference_id to use a custom router that you've trained
8887
4. Receive a recommended model and session_id
8988
5. Use the session_id to submit feedback and improve routing
9089
@@ -202,7 +201,7 @@ async def select_model(
202201
algorithm.
203202
204203
This endpoint analyzes your messages and returns the best-suited model from your
205-
specified providers. The router considers factors like query complexity, model
204+
specified models. The router considers factors like query complexity, model
206205
capabilities, cost, and latency based on your preferences.
207206
208207
**Key Features:**
@@ -211,14 +210,13 @@ async def select_model(
211210
- Support for custom routers trained on your evaluation data
212211
- Optional cost/latency optimization
213212
- Function calling support for compatible models
214-
- Privacy-preserving content hashing
215213
216214
**Usage:**
217215
218216
1. Pass your messages in OpenAI format (array of objects with 'role' and
219217
'content')
220218
2. Specify which LLM providers you want to route between
221-
3. Optionally provide a preference_id for personalized routing
219+
3. Optionally provide a preference_id to use a custom router that you've trained
222220
4. Receive a recommended model and session_id
223221
5. Use the session_id to submit feedback and improve routing
224222

src/notdiamond/resources/prompt_adaptation.py

Lines changed: 12 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,22 @@ def adapt(
7373
Adapt your prompt from one LLM to work optimally across different target LLMs.
7474
7575
This endpoint automatically optimizes your prompt (system prompt + user message
76-
template) to achieve better performance when switching between different
77-
language models. Each model has unique characteristics, and what works well for
78-
GPT-4 might not work as well for Claude or Gemini.
76+
template) to improve accuracy on your use case across various models. Each model
77+
has unique characteristics, and what works well for GPT-5 might not work as well
78+
for Claude or Gemini.
7979
8080
**How Prompt Adaptation Works:**
8181
82-
1. You provide your current prompt optimized for an origin model
83-
2. You specify target models you want to adapt to
82+
1. You provide your current prompt and optionally your current origin model
83+
2. You specify the target models you want to adapt your prompt to
8484
3. You provide evaluation examples (golden records) with expected answers
8585
4. The system runs optimization to find the best prompt for each target model
8686
5. You receive adapted prompts that perform well on your target models
8787
8888
**Evaluation Metrics:** Choose either a standard metric or provide custom
8989
evaluation:
9090
91-
- **Standard metrics**: LLMaaJ:SQL, LLMaaJ:Sem_Sim_1/3/10 (semantic similarity),
92-
JSON_Match
91+
- **Standard metrics**: LLMaaJ:Sem_Sim_1 (semantic similarity), JSON_Match
9392
- **Custom evaluation**: Provide evaluation_config with your own LLM judge,
9493
prompt, and cutoff
9594
@@ -106,21 +105,6 @@ def adapt(
106105
- Time depends on: number of target models, dataset size, model availability
107106
- Use the returned adaptation_run_id to check status and retrieve results
108107
109-
**Subscription Tiers:**
110-
111-
- Free: 1 target model
112-
- Starter: 3 target models
113-
- Startup: 5 target models
114-
- Enterprise: 10 target models
115-
116-
**Best Practices:**
117-
118-
1. Use diverse, representative examples from your production workload
119-
2. Include examples for best results (25 minimum)
120-
3. Ensure consistent evaluation across all examples
121-
4. Test both train_goldens and test_goldens split for validation
122-
5. Use the same model versions you'll use in production
123-
124108
**Example Workflow:**
125109
126110
```
@@ -232,15 +216,6 @@ def get_adapt_results(
232216
3. Apply the optimized prompts when calling the respective target models
233217
4. Compare pre/post optimization scores to see improvement
234218
235-
**Evaluation Scores:**
236-
237-
- Scores range from 0-10 (higher is better)
238-
- Compare origin_model score with target_models pre_optimization_score for
239-
baseline
240-
- Compare pre_optimization_score with post_optimization_score to see improvement
241-
from adaptation
242-
- Typical improvements range from 5-30% on evaluation metrics
243-
244219
**Status Handling:**
245220
246221
- If adaptation is still processing, target model results will have
@@ -366,7 +341,6 @@ def get_costs(
366341
- Total cost across all models used in the adaptation
367342
- Individual usage records with provider, model, tokens, and costs
368343
- Timestamps for each LLM request
369-
- Task type (e.g., optimization, evaluation)
370344
371345
**Access Control:**
372346
@@ -438,23 +412,22 @@ async def adapt(
438412
Adapt your prompt from one LLM to work optimally across different target LLMs.
439413
440414
This endpoint automatically optimizes your prompt (system prompt + user message
441-
template) to achieve better performance when switching between different
442-
language models. Each model has unique characteristics, and what works well for
443-
GPT-4 might not work as well for Claude or Gemini.
415+
template) to improve accuracy on your use case across various models. Each model
416+
has unique characteristics, and what works well for GPT-5 might not work as well
417+
for Claude or Gemini.
444418
445419
**How Prompt Adaptation Works:**
446420
447-
1. You provide your current prompt optimized for an origin model
448-
2. You specify target models you want to adapt to
421+
1. You provide your current prompt and optionally your current origin model
422+
2. You specify the target models you want to adapt your prompt to
449423
3. You provide evaluation examples (golden records) with expected answers
450424
4. The system runs optimization to find the best prompt for each target model
451425
5. You receive adapted prompts that perform well on your target models
452426
453427
**Evaluation Metrics:** Choose either a standard metric or provide custom
454428
evaluation:
455429
456-
- **Standard metrics**: LLMaaJ:SQL, LLMaaJ:Sem_Sim_1/3/10 (semantic similarity),
457-
JSON_Match
430+
- **Standard metrics**: LLMaaJ:Sem_Sim_1 (semantic similarity), JSON_Match
458431
- **Custom evaluation**: Provide evaluation_config with your own LLM judge,
459432
prompt, and cutoff
460433
@@ -471,21 +444,6 @@ async def adapt(
471444
- Time depends on: number of target models, dataset size, model availability
472445
- Use the returned adaptation_run_id to check status and retrieve results
473446
474-
**Subscription Tiers:**
475-
476-
- Free: 1 target model
477-
- Starter: 3 target models
478-
- Startup: 5 target models
479-
- Enterprise: 10 target models
480-
481-
**Best Practices:**
482-
483-
1. Use diverse, representative examples from your production workload
484-
2. Include examples for best results (25 minimum)
485-
3. Ensure consistent evaluation across all examples
486-
4. Test both train_goldens and test_goldens split for validation
487-
5. Use the same model versions you'll use in production
488-
489447
**Example Workflow:**
490448
491449
```
@@ -597,15 +555,6 @@ async def get_adapt_results(
597555
3. Apply the optimized prompts when calling the respective target models
598556
4. Compare pre/post optimization scores to see improvement
599557
600-
**Evaluation Scores:**
601-
602-
- Scores range from 0-10 (higher is better)
603-
- Compare origin_model score with target_models pre_optimization_score for
604-
baseline
605-
- Compare pre_optimization_score with post_optimization_score to see improvement
606-
from adaptation
607-
- Typical improvements range from 5-30% on evaluation metrics
608-
609558
**Status Handling:**
610559
611560
- If adaptation is still processing, target model results will have
@@ -731,7 +680,6 @@ async def get_costs(
731680
- Total cost across all models used in the adaptation
732681
- Individual usage records with provider, model, tokens, and costs
733682
- Timestamps for each LLM request
734-
- Task type (e.g., optimization, evaluation)
735683
736684
**Access Control:**
737685

0 commit comments

Comments
 (0)