Skip to content

Commit 58a6bab

Browse files
authored
Merge pull request #57 from isaacus-dev/release-please--branches--main--changes--next
release: 0.4.0
2 parents 21d7ec4 + ca3e139 commit 58a6bab

File tree

17 files changed

+135
-87
lines changed

17 files changed

+135
-87
lines changed

.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.3.3"
2+
".": "0.4.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-d58ccd91625a3b12fd8d1ceece128b604010bd840096000287c927cb5dcf79eb.yml
3-
openapi_spec_hash: 22c8c973d55f26649e9df96c89ea537f
4-
config_hash: 1d603d50b7183a492ad6df5f728a1863
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-213d554b23f35e746460af23dd32bdde471230549ad223518c86d42ea917a180.yml
3+
openapi_spec_hash: 3672281fe031a42fc59e3a2af758a8f8
4+
config_hash: 1d15d860383a3f6da1ac388297687cc9

CHANGELOG.md

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

3+
## 0.4.0 (2025-04-19)
4+
5+
Full Changelog: [v0.3.3...v0.4.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.3.3...v0.4.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* **api:** made universal classification endpoint multi-input only
10+
11+
### Features
12+
13+
* **api:** made universal classification endpoint multi-input only ([4fb2535](https://github.com/isaacus-dev/isaacus-python/commit/4fb2535407d88d51c1db1e9a37c9ea767cdf06c0))
14+
15+
16+
### Chores
17+
18+
* **internal:** bump pyright version ([2f992e7](https://github.com/isaacus-dev/isaacus-python/commit/2f992e788860d16739438a021bd8825a7999b1e4))
19+
* **internal:** update models test ([bb3df78](https://github.com/isaacus-dev/isaacus-python/commit/bb3df7823dd27e6482b5e97ef17019ee0a1e596c))
20+
321
## 0.3.3 (2025-04-16)
422

523
Full Changelog: [v0.3.2...v0.3.3](https://github.com/isaacus-dev/isaacus-python/compare/v0.3.2...v0.3.3)

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ client = Isaacus(
3434
universal_classification = client.classifications.universal.create(
3535
model="kanon-universal-classifier",
3636
query="This is a confidentiality clause.",
37-
text="I agree not to tell anyone about the document.",
37+
texts=["I agree not to tell anyone about the document."],
3838
)
39-
print(universal_classification.chunks)
39+
print(universal_classification.classifications)
4040
```
4141

4242
While you can provide an `api_key` keyword argument,
@@ -62,9 +62,9 @@ async def main() -> None:
6262
universal_classification = await client.classifications.universal.create(
6363
model="kanon-universal-classifier",
6464
query="This is a confidentiality clause.",
65-
text="I agree not to tell anyone about the document.",
65+
texts=["I agree not to tell anyone about the document."],
6666
)
67-
print(universal_classification.chunks)
67+
print(universal_classification.classifications)
6868

6969

7070
asyncio.run(main())
@@ -93,7 +93,7 @@ client = Isaacus()
9393
universal_classification = client.classifications.universal.create(
9494
model="kanon-universal-classifier",
9595
query="This is a confidentiality clause.",
96-
text="I agree not to tell anyone about the document.",
96+
texts=["I agree not to tell anyone about the document."],
9797
chunking_options={
9898
"overlap_ratio": 0.1,
9999
"overlap_tokens": None,
@@ -122,7 +122,7 @@ try:
122122
client.classifications.universal.create(
123123
model="kanon-universal-classifier",
124124
query="This is a confidentiality clause.",
125-
text="I agree not to tell anyone about the document.",
125+
texts=["I agree not to tell anyone about the document."],
126126
)
127127
except isaacus.APIConnectionError as e:
128128
print("The server could not be reached")
@@ -169,7 +169,7 @@ client = Isaacus(
169169
client.with_options(max_retries=5).classifications.universal.create(
170170
model="kanon-universal-classifier",
171171
query="This is a confidentiality clause.",
172-
text="I agree not to tell anyone about the document.",
172+
texts=["I agree not to tell anyone about the document."],
173173
)
174174
```
175175

@@ -196,7 +196,7 @@ client = Isaacus(
196196
client.with_options(timeout=5.0).classifications.universal.create(
197197
model="kanon-universal-classifier",
198198
query="This is a confidentiality clause.",
199-
text="I agree not to tell anyone about the document.",
199+
texts=["I agree not to tell anyone about the document."],
200200
)
201201
```
202202

@@ -241,12 +241,12 @@ client = Isaacus()
241241
response = client.classifications.universal.with_raw_response.create(
242242
model="kanon-universal-classifier",
243243
query="This is a confidentiality clause.",
244-
text="I agree not to tell anyone about the document.",
244+
texts=["I agree not to tell anyone about the document."],
245245
)
246246
print(response.headers.get('X-My-Header'))
247247

248248
universal = response.parse() # get the object that `classifications.universal.create()` would have returned
249-
print(universal.chunks)
249+
print(universal.classifications)
250250
```
251251

252252
These methods return an [`APIResponse`](https://github.com/isaacus-dev/isaacus-python/tree/main/src/isaacus/_response.py) object.
@@ -263,7 +263,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
263263
with client.classifications.universal.with_streaming_response.create(
264264
model="kanon-universal-classifier",
265265
query="This is a confidentiality clause.",
266-
text="I agree not to tell anyone about the document.",
266+
texts=["I agree not to tell anyone about the document."],
267267
) as response:
268268
print(response.headers.get("X-My-Header"))
269269

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "isaacus"
3-
version = "0.3.3"
3+
version = "0.4.0"
44
description = "The official Python library for the isaacus API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -42,7 +42,7 @@ Repository = "https://github.com/isaacus-dev/isaacus-python"
4242
managed = true
4343
# version pins are in requirements-dev.lock
4444
dev-dependencies = [
45-
"pyright>=1.1.359",
45+
"pyright==1.1.399",
4646
"mypy",
4747
"respx",
4848
"pytest",

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pydantic-core==2.27.1
6969
# via pydantic
7070
pygments==2.18.0
7171
# via rich
72-
pyright==1.1.392.post0
72+
pyright==1.1.399
7373
pytest==8.3.3
7474
# via pytest-asyncio
7575
pytest-asyncio==0.24.0

src/isaacus/_base_client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@
9898
_AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any])
9999

100100
if TYPE_CHECKING:
101-
from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT
101+
from httpx._config import (
102+
DEFAULT_TIMEOUT_CONFIG, # pyright: ignore[reportPrivateImportUsage]
103+
)
104+
105+
HTTPX_DEFAULT_TIMEOUT = DEFAULT_TIMEOUT_CONFIG
102106
else:
103107
try:
104108
from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT

src/isaacus/_models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
)
2020

2121
import pydantic
22-
import pydantic.generics
2322
from pydantic.fields import FieldInfo
2423

2524
from ._types import (

src/isaacus/_utils/_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class MyResponse(Foo[_T]):
110110
```
111111
"""
112112
cls = cast(object, get_origin(typ) or typ)
113-
if cls in generic_bases:
113+
if cls in generic_bases: # pyright: ignore[reportUnnecessaryContains]
114114
# we're given the class directly
115115
return extract_type_arg(typ, index)
116116

src/isaacus/_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__ = "isaacus"
4-
__version__ = "0.3.3" # x-release-please-version
4+
__version__ = "0.4.0" # x-release-please-version

0 commit comments

Comments
 (0)