Skip to content
Merged
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.34.0"
".": "0.34.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 10
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai/perplexity-8deeee7ec30ff9d4ce52c48452d3660f806e614f14bb8f77209ff43ac449b60e.yml
openapi_spec_hash: 2334e8ee2ebe0d944472ad9385bb79e0
config_hash: e09a1767e929614701fb498eaaac682d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai/perplexity-fcf27eaa172b35187bd87aa80b4d18e2b05c5a8544734d56bd4079064bec4bb4.yml
openapi_spec_hash: 35a516eefbd34cf6620a114bf28c27a5
config_hash: 86d643a5df0d7478c095d3efa13438dd
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.34.1 (2026-05-27)

Full Changelog: [v0.34.0...v0.34.1](https://github.com/perplexityai/perplexity-py/compare/v0.34.0...v0.34.1)

### Bug Fixes

* **streaming:** yield named SSE events for responses.create + discriminate ResponseStreamEvent union ([011b962](https://github.com/perplexityai/perplexity-py/commit/011b9622d7ed0abdd4964811aa7055271eb8e08c))

## 0.34.0 (2026-05-13)

Full Changelog: [v0.33.0...v0.34.0](https://github.com/perplexityai/perplexity-py/compare/v0.33.0...v0.34.0)
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 = "perplexityai"
version = "0.34.0"
version = "0.34.1"
description = "The official Python library for the perplexity API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
6 changes: 2 additions & 4 deletions src/perplexity/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ def __stream__(self) -> Iterator[_T]:
response=self.response,
)

if sse.event is None:
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
finally:
# Ensure the response is closed even if the consumer doesn't read all data
response.close()
Expand Down Expand Up @@ -162,8 +161,7 @@ async def __stream__(self) -> AsyncIterator[_T]:
response=self.response,
)

if sse.event is None:
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
finally:
# Ensure the response is closed even if the consumer doesn't read all data
await response.aclose()
Expand Down
2 changes: 1 addition & 1 deletion src/perplexity/_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__ = "perplexity"
__version__ = "0.34.0" # x-release-please-version
__version__ = "0.34.1" # x-release-please-version
Loading