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.25.0"
".": "0.26.0"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.26.0 (2026-01-24)

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

### Features

* **client:** add output_text convenience property ([5ead294](https://github.com/perplexityai/perplexity-py/commit/5ead294740d418341a0d01b022cfe8f3e53e45c6))


### Bug Fixes

* sort imports in response_create_response.py ([fd021a3](https://github.com/perplexityai/perplexity-py/commit/fd021a341c3c1f082e6a6c47c320731ec8e92e46))

## 0.25.0 (2026-01-23)

Full Changelog: [v0.24.0...v0.25.0](https://github.com/perplexityai/perplexity-py/compare/v0.24.0...v0.25.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.25.0"
version = "0.26.0"
description = "The official Python library for the perplexity API"
dynamic = ["readme"]
license = "Apache-2.0"
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.25.0" # x-release-please-version
__version__ = "0.26.0" # x-release-please-version
16 changes: 15 additions & 1 deletion src/perplexity/types/response_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from .._models import BaseModel
from .error_info import ErrorInfo
from .output_item import OutputItem
from .output_item import OutputItem, MessageOutputItem
from .responses_usage import ResponsesUsage

__all__ = ["ResponseCreateResponse"]
Expand All @@ -31,3 +31,17 @@ class ResponseCreateResponse(BaseModel):
error: Optional[ErrorInfo] = None

usage: Optional[ResponsesUsage] = None

@property
def output_text(self) -> str:
"""Convenience property that aggregates all `output_text` items from the `output` list.

If no `output_text` content blocks exist, then an empty string is returned.
"""
texts: List[str] = []
for output in self.output:
if isinstance(output, MessageOutputItem):
for content in output.content:
if content.type == "output_text":
texts.append(content.text)
return "".join(texts)