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 @@
{
".": "2.21.0"
".": "2.22.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 66
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/julep-ai-inc-dash%2Fjulep-266657b5af7f6ae5fbe9cdbc253553cd7e8246e742cbb4e8e22aecbccd6c7a9e.yml
openapi_spec_hash: 64878c8b3f1cc0c66ee4d94bd49c6593
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/julep-ai-inc-dash%2Fjulep-3b1bb98879ed268512c20dfd8ab30d237362e6dc25cbf384e59173ce9ac18d03.yml
openapi_spec_hash: a3f61930f630788c17daa9ec5be09d0f
config_hash: 5cb77b8389154096b85883a93680f511
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 2.22.0 (2025-11-04)

Full Changelog: [v2.21.0...v2.22.0](https://github.com/julep-ai/python-sdk/compare/v2.21.0...v2.22.0)

### Features

* **api:** api update ([d0355a7](https://github.com/julep-ai/python-sdk/commit/d0355a73386db37937140c429a83b2cd15711494))


### Bug Fixes

* **client:** close streams without requiring full consumption ([91faa31](https://github.com/julep-ai/python-sdk/commit/91faa31ddd1b0445a7e954449f14c2d3622d2d22))


### Chores

* bump `httpx-aiohttp` version to 0.1.9 ([60467e7](https://github.com/julep-ai/python-sdk/commit/60467e785144c650f053e6eabf00f1e65fb99b3d))
* **internal/tests:** avoid race condition with implicit client cleanup ([9853fd4](https://github.com/julep-ai/python-sdk/commit/9853fd412fa475fd7ac8abc352bac5765c693b08))
* **internal:** detect missing future annotations with ruff ([d93ed08](https://github.com/julep-ai/python-sdk/commit/d93ed0871a2ddecf4c4a919a0f8f9dbdbeb55f8f))
* **internal:** grammar fix (it's -> its) ([1681b0d](https://github.com/julep-ai/python-sdk/commit/1681b0dc12c108fac6ea0f787ddfae87aa33d35c))

## 2.21.0 (2025-10-03)

Full Changelog: [v2.20.0...v2.21.0](https://github.com/julep-ai/python-sdk/compare/v2.20.0...v2.21.0)
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "julep"
version = "2.21.0"
version = "2.22.0"
description = "The official Python library for the julep API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -42,7 +42,7 @@ Repository = "https://github.com/julep-ai/python-sdk"

[project.optional-dependencies]
cli = ["julep-cli>=0.1.11; python_version >= '3.11'"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
Expand Down Expand Up @@ -227,6 +227,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -249,6 +251,8 @@ unfixable = [
"T203",
]

extend-safe-fixes = ["FA102"]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via julep
# via respx
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via julep
idna==3.4
# via anyio
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via julep
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via julep
idna==3.4
# via anyio
Expand Down
10 changes: 4 additions & 6 deletions src/julep/_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/julep/_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/julep/_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__ = "julep"
__version__ = "2.21.0" # x-release-please-version
__version__ = "2.22.0" # x-release-please-version
3 changes: 2 additions & 1 deletion src/julep/types/hybrid_doc_search_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Literal, TypedDict

__all__ = ["HybridDocSearchParam"]
Expand Down Expand Up @@ -30,4 +31,4 @@ class HybridDocSearchParam(TypedDict, total=False):

num_search_messages: int

trigram_similarity_threshold: float
trigram_similarity_threshold: Optional[float]
4 changes: 2 additions & 2 deletions src/julep/types/session_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class RecallOptionsTextOnlyDocSearchUpdate(TypedDict, total=False):

num_search_messages: int

trigram_similarity_threshold: float
trigram_similarity_threshold: Optional[float]


class RecallOptionsHybridDocSearchUpdate(TypedDict, total=False):
Expand All @@ -95,7 +95,7 @@ class RecallOptionsHybridDocSearchUpdate(TypedDict, total=False):

num_search_messages: int

trigram_similarity_threshold: float
trigram_similarity_threshold: Optional[float]


RecallOptions: TypeAlias = Union[
Expand Down
3 changes: 2 additions & 1 deletion src/julep/types/text_only_doc_search_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Literal, TypedDict

__all__ = ["TextOnlyDocSearchParam"]
Expand All @@ -22,4 +23,4 @@ class TextOnlyDocSearchParam(TypedDict, total=False):

num_search_messages: int

trigram_similarity_threshold: float
trigram_similarity_threshold: Optional[float]
Loading
Loading