Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.9.1"
".": "0.9.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-6705b8e0baa0e4aad69a1c04e9876b352e40e0e5caf21e87e7b2c355e70c4e66.yml
openapi_spec_hash: 87d3cc80f5ddc5275e8a47d35f1a484e
config_hash: a85580968a69d8d6fadf96e5e2d6870e
config_hash: eb6af7379e9073b3ece2803bfcf65e68
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 0.9.2 (2025-11-04)

Full Changelog: [v0.9.1...v0.9.2](https://github.com/isaacus-dev/isaacus-python/compare/v0.9.1...v0.9.2)

### Bug Fixes

* **client:** close streams without requiring full consumption ([13eb93f](https://github.com/isaacus-dev/isaacus-python/commit/13eb93fea611507de440a4418b82de3aa8a06500))


### Chores

* **internal/tests:** avoid race condition with implicit client cleanup ([871fa54](https://github.com/isaacus-dev/isaacus-python/commit/871fa54adcd54f3f5ffde794e4ae703e7913e6b7))
* **internal:** grammar fix (it's -> its) ([84145f2](https://github.com/isaacus-dev/isaacus-python/commit/84145f233adddf8b55a24b0443a2f9c9dc5a4cbd))


### Documentation

* **sdk:** specify example params ([f617346](https://github.com/isaacus-dev/isaacus-python/commit/f617346d3262a45594d34357e97fc616f5ddf9e9))

## 0.9.1 (2025-10-19)

Full Changelog: [v0.9.0...v0.9.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.9.0...v0.9.1)
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ embedding_response = client.embeddings.create(
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
)
print(embedding_response.embeddings)
```
Expand Down Expand Up @@ -68,6 +69,7 @@ async def main() -> None:
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
)
print(embedding_response.embeddings)

Expand Down Expand Up @@ -107,6 +109,7 @@ async def main() -> None:
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
)
print(embedding_response.embeddings)

Expand Down Expand Up @@ -167,6 +170,7 @@ try:
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
)
except isaacus.APIConnectionError as e:
print("The server could not be reached")
Expand Down Expand Up @@ -216,6 +220,7 @@ client.with_options(max_retries=5).embeddings.create(
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
)
```

Expand Down Expand Up @@ -245,6 +250,7 @@ client.with_options(timeout=5.0).embeddings.create(
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
)
```

Expand Down Expand Up @@ -289,6 +295,7 @@ client = Isaacus()
response = client.embeddings.with_raw_response.create(
model="kanon-2-embedder",
texts=["Are restraints of trade enforceable under English law?", "What is a non-compete clause?"],
task="retrieval/query",
)
print(response.headers.get('X-My-Header'))

Expand All @@ -313,6 +320,7 @@ with client.embeddings.with_streaming_response.create(
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?",
],
task="retrieval/query",
) as response:
print(response.headers.get("X-My-Header"))

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "isaacus"
version = "0.9.1"
version = "0.9.2"
description = "The official Python library for the isaacus API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 4 additions & 6 deletions src/isaacus/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]:
for sse in iterator:
yield process_data(data=sse.json(), cast_to=cast_to, response=response)

# Ensure the entire stream is consumed
for _sse in iterator:
...
# As we might not fully consume the response stream, we need to close it explicitly
response.close()

def __enter__(self) -> Self:
return self
Expand Down Expand Up @@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
async for sse in iterator:
yield process_data(data=sse.json(), cast_to=cast_to, response=response)

# Ensure the entire stream is consumed
async for _sse in iterator:
...
# As we might not fully consume the response stream, we need to close it explicitly
await response.aclose()

async def __aenter__(self) -> Self:
return self
Expand Down
2 changes: 1 addition & 1 deletion src/isaacus/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
# Type safe methods for narrowing types with TypeVars.
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
# however this cause Pyright to rightfully report errors. As we know we don't
# care about the contained types we can safely use `object` in it's place.
# care about the contained types we can safely use `object` in its place.
#
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
# `is_*` is for when you're dealing with an unknown input
Expand Down
2 changes: 1 addition & 1 deletion src/isaacus/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "isaacus"
__version__ = "0.9.1" # x-release-please-version
__version__ = "0.9.2" # x-release-please-version
Loading