Skip to content

Commit ca37eb1

Browse files
authored
Merge pull request #65 from isaacus-dev/release-please--branches--main--changes--next
release: 0.9.0
2 parents f255dcc + 2c43b6c commit ca37eb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1468
-533
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
run: ./scripts/lint
3737

3838
build:
39-
if: github.repository == 'stainless-sdks/isaacus-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
4040
timeout-minutes: 10
4141
name: build
4242
permissions:
4343
contents: read
4444
id-token: write
45-
runs-on: depot-ubuntu-24.04
45+
runs-on: ${{ github.repository == 'stainless-sdks/isaacus-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646
steps:
4747
- uses: actions/checkout@v4
4848

@@ -61,12 +61,14 @@ jobs:
6161
run: rye build
6262

6363
- name: Get GitHub OIDC Token
64+
if: github.repository == 'stainless-sdks/isaacus-python'
6465
id: github-oidc
6566
uses: actions/github-script@v6
6667
with:
6768
script: core.setOutput('github_token', await core.getIDToken());
6869

6970
- name: Upload tarball
71+
if: github.repository == 'stainless-sdks/isaacus-python'
7072
env:
7173
URL: https://pkg.stainless.com/s
7274
AUTH: ${{ steps.github-oidc.outputs.github_token }}

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 3
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-a0aa3bcfef3af964f7172cecc6e969193a4ca96b26f8c47e7f50d852b13ef356.yml
3-
openapi_spec_hash: e243aed52e8a3c6dad6254c57408fdc4
4-
config_hash: bfe30148ec88e8bbbf4a348a9fdfc00a
1+
configured_endpoints: 4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-ee884a4336559147aacf9a927a540f21e9760f00d2d5588af00fa8a25e2707d9.yml
3+
openapi_spec_hash: 2ba78bd360942c63a7d08dba791f00d2
4+
config_hash: a85580968a69d8d6fadf96e5e2d6870e

CHANGELOG.md

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

3+
## 0.9.0 (2025-10-14)
4+
5+
Full Changelog: [v0.8.0...v0.9.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.8.0...v0.9.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* **api:** reduce max length of embeddings input
10+
* **sdk:** add `_response` to response models to finally fix duplicated names
11+
12+
### Features
13+
14+
* **api:** added embedding endpoint ([88190d6](https://github.com/isaacus-dev/isaacus-python/commit/88190d6d33c8d5e3cf59dfd3c488b5ae9abec93b))
15+
* **api:** reduce max length of embeddings input ([0ad7114](https://github.com/isaacus-dev/isaacus-python/commit/0ad7114b5fec2fde9aaa830a6ba6163ad3b6fccc))
16+
* **api:** rename embedding -> embeddings ([204a05d](https://github.com/isaacus-dev/isaacus-python/commit/204a05d7b1504901766db3c0d0d8ea47a22a16ed))
17+
* **api:** revert embedding -> embeddings ([b934279](https://github.com/isaacus-dev/isaacus-python/commit/b9342795e50374817b8e3dc2e2f1163a2ff0805a))
18+
* **client:** support file upload requests ([2ab398d](https://github.com/isaacus-dev/isaacus-python/commit/2ab398dde07e98411c9b6efd76f7b7120a9633a8))
19+
* improve future compat with pydantic v3 ([5a20497](https://github.com/isaacus-dev/isaacus-python/commit/5a20497a9c4bbf88056df12a0c686566dc9bd162))
20+
* **sdk:** add embeddings endpoint ([920ae0b](https://github.com/isaacus-dev/isaacus-python/commit/920ae0b65f2362ac098f8b94979b1e821f5143d8))
21+
* **sdk:** toggle to force regen ([cf60482](https://github.com/isaacus-dev/isaacus-python/commit/cf60482ba0dd3933daee477fa9bd4ae29d900fb4))
22+
* **sdk:** untoggle to force regen ([25d2067](https://github.com/isaacus-dev/isaacus-python/commit/25d2067fad4bb46ca595001f6e82458fd3d24a23))
23+
* **types:** replace List[str] with SequenceNotStr in params ([d2733a9](https://github.com/isaacus-dev/isaacus-python/commit/d2733a9d0f16531537a9db017a8e29d2c8fb3912))
24+
25+
26+
### Bug Fixes
27+
28+
* **api:** typo ([5d4a1b9](https://github.com/isaacus-dev/isaacus-python/commit/5d4a1b99e8a6ac2a1c3cc4e83e7b65108eea335a))
29+
* avoid newer type syntax ([10253fe](https://github.com/isaacus-dev/isaacus-python/commit/10253fe93ed8142b52cf5199486221e81ac6ce5a))
30+
* **sdk:** add `_response` to response models to finally fix duplicated names ([5c7462d](https://github.com/isaacus-dev/isaacus-python/commit/5c7462dd25c67c44126eb946a656a6b841dc6a50))
31+
32+
33+
### Chores
34+
35+
* **api:** try to force regen SDK ([2fafb55](https://github.com/isaacus-dev/isaacus-python/commit/2fafb555c1a20d7c359c91c35fd1f54868cffe54))
36+
* do not install brew dependencies in ./scripts/bootstrap by default ([57b055e](https://github.com/isaacus-dev/isaacus-python/commit/57b055ed56fdcc58b4663e4ddad32afac25e7ec1))
37+
* improve example values ([35b03bd](https://github.com/isaacus-dev/isaacus-python/commit/35b03bdbf4ceaccd00102e23d639a01d5bea136a))
38+
* **internal:** add Sequence related utils ([5a2287e](https://github.com/isaacus-dev/isaacus-python/commit/5a2287ef854d250048c070f3fd88b00ca84b0d3c))
39+
* **internal:** change ci workflow machines ([f86cbce](https://github.com/isaacus-dev/isaacus-python/commit/f86cbcef2583658466e95eaba4aba61f79646ef9))
40+
* **internal:** codegen related update ([22b520b](https://github.com/isaacus-dev/isaacus-python/commit/22b520b3c67e570f9267135111a89542ee2bdf7f))
41+
* **internal:** fix ruff target version ([889d576](https://github.com/isaacus-dev/isaacus-python/commit/889d576cdc28d06404c6ee3ce0c67bf4d3be75c4))
42+
* **internal:** move mypy configurations to `pyproject.toml` file ([d5732d5](https://github.com/isaacus-dev/isaacus-python/commit/d5732d5e0145763723e8be24cbd8296f9a385264))
43+
* **internal:** update comment in script ([7af966e](https://github.com/isaacus-dev/isaacus-python/commit/7af966e1677b44d412eda96c5ee8e9866f77ccfb))
44+
* **internal:** update pydantic dependency ([68a7057](https://github.com/isaacus-dev/isaacus-python/commit/68a70578a2e269fa3b2c46e3c29e82ba770090d6))
45+
* **internal:** update pyright exclude list ([6f0ae86](https://github.com/isaacus-dev/isaacus-python/commit/6f0ae86899883fe77aa669d595c623bedc2dc5c8))
46+
* remove custom code ([491dbdc](https://github.com/isaacus-dev/isaacus-python/commit/491dbdcd82984d099b8ee11e94894ad450b2424d))
47+
* **sdk:** restore original example ([079645e](https://github.com/isaacus-dev/isaacus-python/commit/079645e85259c2e4d3f6aa86b2ca2c21ce97367a))
48+
* **tests:** simplify `get_platform` test ([e00ccd0](https://github.com/isaacus-dev/isaacus-python/commit/e00ccd0c41c3751eb3fae880223ebb05eae0f154))
49+
* **types:** change optional parameter type from NotGiven to Omit ([38d13e0](https://github.com/isaacus-dev/isaacus-python/commit/38d13e0514b001d1a34446b881783d559e246865))
50+
* update @stainless-api/prism-cli to v5.15.0 ([a3141f5](https://github.com/isaacus-dev/isaacus-python/commit/a3141f59b0ff6334fde2a9740fd2f86824fe5083))
51+
* update github action ([0518028](https://github.com/isaacus-dev/isaacus-python/commit/05180288265bc111dba1c62fbfcd90139a6299ad))
52+
53+
54+
### Documentation
55+
56+
* **sdk:** make embeddings example first ([caa70f7](https://github.com/isaacus-dev/isaacus-python/commit/caa70f7acf6ce910d8cf80425437ca51970cd255))
57+
358
## 0.8.0 (2025-07-25)
459

560
Full Changelog: [v0.7.0...v0.8.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.7.0...v0.8.0)

README.md

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ client = Isaacus(
3232
api_key=os.environ.get("ISAACUS_API_KEY"), # This is the default and can be omitted
3333
)
3434

35-
universal_classification = client.classifications.universal.create(
36-
model="kanon-universal-classifier",
37-
query="This is a confidentiality clause.",
38-
texts=["I agree not to tell anyone about the document."],
35+
embedding_response = client.embeddings.create(
36+
model="kanon-2-embedder",
37+
texts=[
38+
"Are restraints of trade enforceable under English law?",
39+
"What is a non-compete clause?",
40+
],
3941
)
40-
print(universal_classification.classifications)
42+
print(embedding_response.embeddings)
4143
```
4244

4345
While you can provide an `api_key` keyword argument,
@@ -60,12 +62,14 @@ client = AsyncIsaacus(
6062

6163

6264
async def main() -> None:
63-
universal_classification = await client.classifications.universal.create(
64-
model="kanon-universal-classifier",
65-
query="This is a confidentiality clause.",
66-
texts=["I agree not to tell anyone about the document."],
65+
embedding_response = await client.embeddings.create(
66+
model="kanon-2-embedder",
67+
texts=[
68+
"Are restraints of trade enforceable under English law?",
69+
"What is a non-compete clause?",
70+
],
6771
)
68-
print(universal_classification.classifications)
72+
print(embedding_response.embeddings)
6973

7074

7175
asyncio.run(main())
@@ -97,12 +101,14 @@ async def main() -> None:
97101
api_key="My API Key",
98102
http_client=DefaultAioHttpClient(),
99103
) as client:
100-
universal_classification = await client.classifications.universal.create(
101-
model="kanon-universal-classifier",
102-
query="This is a confidentiality clause.",
103-
texts=["I agree not to tell anyone about the document."],
104+
embedding_response = await client.embeddings.create(
105+
model="kanon-2-embedder",
106+
texts=[
107+
"Are restraints of trade enforceable under English law?",
108+
"What is a non-compete clause?",
109+
],
104110
)
105-
print(universal_classification.classifications)
111+
print(embedding_response.embeddings)
106112

107113

108114
asyncio.run(main())
@@ -126,7 +132,7 @@ from isaacus import Isaacus
126132

127133
client = Isaacus()
128134

129-
universal_classification = client.classifications.universal.create(
135+
universal_classification_response = client.classifications.universal.create(
130136
model="kanon-universal-classifier",
131137
query="This is a confidentiality clause.",
132138
texts=["I agree not to tell anyone about the document."],
@@ -136,7 +142,7 @@ universal_classification = client.classifications.universal.create(
136142
"size": 512,
137143
},
138144
)
139-
print(universal_classification.classifications)
145+
print(universal_classification_response.classifications)
140146
```
141147

142148
## Handling errors
@@ -155,10 +161,12 @@ from isaacus import Isaacus
155161
client = Isaacus()
156162

157163
try:
158-
client.classifications.universal.create(
159-
model="kanon-universal-classifier",
160-
query="This is a confidentiality clause.",
161-
texts=["I agree not to tell anyone about the document."],
164+
client.embeddings.create(
165+
model="kanon-2-embedder",
166+
texts=[
167+
"Are restraints of trade enforceable under English law?",
168+
"What is a non-compete clause?",
169+
],
162170
)
163171
except isaacus.APIConnectionError as e:
164172
print("The server could not be reached")
@@ -202,10 +210,12 @@ client = Isaacus(
202210
)
203211

204212
# Or, configure per-request:
205-
client.with_options(max_retries=5).classifications.universal.create(
206-
model="kanon-universal-classifier",
207-
query="This is a confidentiality clause.",
208-
texts=["I agree not to tell anyone about the document."],
213+
client.with_options(max_retries=5).embeddings.create(
214+
model="kanon-2-embedder",
215+
texts=[
216+
"Are restraints of trade enforceable under English law?",
217+
"What is a non-compete clause?",
218+
],
209219
)
210220
```
211221

@@ -229,10 +239,12 @@ client = Isaacus(
229239
)
230240

231241
# Override per-request:
232-
client.with_options(timeout=5.0).classifications.universal.create(
233-
model="kanon-universal-classifier",
234-
query="This is a confidentiality clause.",
235-
texts=["I agree not to tell anyone about the document."],
242+
client.with_options(timeout=5.0).embeddings.create(
243+
model="kanon-2-embedder",
244+
texts=[
245+
"Are restraints of trade enforceable under English law?",
246+
"What is a non-compete clause?",
247+
],
236248
)
237249
```
238250

@@ -274,15 +286,14 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
274286
from isaacus import Isaacus
275287

276288
client = Isaacus()
277-
response = client.classifications.universal.with_raw_response.create(
278-
model="kanon-universal-classifier",
279-
query="This is a confidentiality clause.",
280-
texts=["I agree not to tell anyone about the document."],
289+
response = client.embeddings.with_raw_response.create(
290+
model="kanon-2-embedder",
291+
texts=["Are restraints of trade enforceable under English law?", "What is a non-compete clause?"],
281292
)
282293
print(response.headers.get('X-My-Header'))
283294

284-
universal = response.parse() # get the object that `classifications.universal.create()` would have returned
285-
print(universal.classifications)
295+
embedding = response.parse() # get the object that `embeddings.create()` would have returned
296+
print(embedding.embeddings)
286297
```
287298

288299
These methods return an [`APIResponse`](https://github.com/isaacus-dev/isaacus-python/tree/main/src/isaacus/_response.py) object.
@@ -296,10 +307,12 @@ The above interface eagerly reads the full response body when you make the reque
296307
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
297308

298309
```python
299-
with client.classifications.universal.with_streaming_response.create(
300-
model="kanon-universal-classifier",
301-
query="This is a confidentiality clause.",
302-
texts=["I agree not to tell anyone about the document."],
310+
with client.embeddings.with_streaming_response.create(
311+
model="kanon-2-embedder",
312+
texts=[
313+
"Are restraints of trade enforceable under English law?",
314+
"What is a non-compete clause?",
315+
],
303316
) as response:
304317
print(response.headers.get("X-My-Header"))
305318

api.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1+
# Embeddings
2+
3+
Types:
4+
5+
```python
6+
from isaacus.types import EmbeddingResponse
7+
```
8+
9+
Methods:
10+
11+
- <code title="post /embeddings">client.embeddings.<a href="./src/isaacus/resources/embeddings.py">create</a>(\*\*<a href="src/isaacus/types/embedding_create_params.py">params</a>) -> <a href="./src/isaacus/types/embedding_response.py">EmbeddingResponse</a></code>
12+
113
# Classifications
214

315
## Universal
416

517
Types:
618

719
```python
8-
from isaacus.types.classifications import UniversalClassification
20+
from isaacus.types.classifications import UniversalClassificationResponse
921
```
1022

1123
Methods:
1224

13-
- <code title="post /classifications/universal">client.classifications.universal.<a href="./src/isaacus/resources/classifications/universal.py">create</a>(\*\*<a href="src/isaacus/types/classifications/universal_create_params.py">params</a>) -> <a href="./src/isaacus/types/classifications/universal_classification.py">UniversalClassification</a></code>
25+
- <code title="post /classifications/universal">client.classifications.universal.<a href="./src/isaacus/resources/classifications/universal.py">create</a>(\*\*<a href="src/isaacus/types/classifications/universal_create_params.py">params</a>) -> <a href="./src/isaacus/types/classifications/universal_classification_response.py">UniversalClassificationResponse</a></code>
1426

1527
# Rerankings
1628

1729
Types:
1830

1931
```python
20-
from isaacus.types import Reranking
32+
from isaacus.types import RerankingResponse
2133
```
2234

2335
Methods:
2436

25-
- <code title="post /rerankings">client.rerankings.<a href="./src/isaacus/resources/rerankings.py">create</a>(\*\*<a href="src/isaacus/types/reranking_create_params.py">params</a>) -> <a href="./src/isaacus/types/reranking.py">Reranking</a></code>
37+
- <code title="post /rerankings">client.rerankings.<a href="./src/isaacus/resources/rerankings.py">create</a>(\*\*<a href="src/isaacus/types/reranking_create_params.py">params</a>) -> <a href="./src/isaacus/types/reranking_response.py">RerankingResponse</a></code>
2638

2739
# Extractions
2840

@@ -31,9 +43,9 @@ Methods:
3143
Types:
3244

3345
```python
34-
from isaacus.types.extractions import AnswerExtraction
46+
from isaacus.types.extractions import AnswerExtractionResponse
3547
```
3648

3749
Methods:
3850

39-
- <code title="post /extractions/qa">client.extractions.qa.<a href="./src/isaacus/resources/extractions/qa.py">create</a>(\*\*<a href="src/isaacus/types/extractions/qa_create_params.py">params</a>) -> <a href="./src/isaacus/types/extractions/answer_extraction.py">AnswerExtraction</a></code>
51+
- <code title="post /extractions/qa">client.extractions.qa.<a href="./src/isaacus/resources/extractions/qa.py">create</a>(\*\*<a href="src/isaacus/types/extractions/qa_create_params.py">params</a>) -> <a href="./src/isaacus/types/extractions/answer_extraction_response.py">AnswerExtractionResponse</a></code>

mypy.ini

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)