Skip to content

Commit 3cbf6af

Browse files
authored
Merge pull request #32 from perplexityai/release-please--branches--main--changes--next
2 parents f3b9c9c + e0c7908 commit 3cbf6af

5 files changed

Lines changed: 31 additions & 4 deletions

File tree

‎.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.25.0"
2+
".": "0.26.0"
33
}

‎CHANGELOG.md‎

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

3+
## 0.26.0 (2026-01-24)
4+
5+
Full Changelog: [v0.25.0...v0.26.0](https://github.com/perplexityai/perplexity-py/compare/v0.25.0...v0.26.0)
6+
7+
### Features
8+
9+
* **client:** add output_text convenience property ([5ead294](https://github.com/perplexityai/perplexity-py/commit/5ead294740d418341a0d01b022cfe8f3e53e45c6))
10+
11+
12+
### Bug Fixes
13+
14+
* sort imports in response_create_response.py ([fd021a3](https://github.com/perplexityai/perplexity-py/commit/fd021a341c3c1f082e6a6c47c320731ec8e92e46))
15+
316
## 0.25.0 (2026-01-23)
417

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

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "perplexityai"
3-
version = "0.25.0"
3+
version = "0.26.0"
44
description = "The official Python library for the perplexity API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

‎src/perplexity/_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__ = "perplexity"
4-
__version__ = "0.25.0" # x-release-please-version
4+
__version__ = "0.26.0" # x-release-please-version

‎src/perplexity/types/response_create_response.py‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from .._models import BaseModel
77
from .error_info import ErrorInfo
8-
from .output_item import OutputItem
8+
from .output_item import OutputItem, MessageOutputItem
99
from .responses_usage import ResponsesUsage
1010

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

3333
usage: Optional[ResponsesUsage] = None
34+
35+
@property
36+
def output_text(self) -> str:
37+
"""Convenience property that aggregates all `output_text` items from the `output` list.
38+
39+
If no `output_text` content blocks exist, then an empty string is returned.
40+
"""
41+
texts: List[str] = []
42+
for output in self.output:
43+
if isinstance(output, MessageOutputItem):
44+
for content in output.content:
45+
if content.type == "output_text":
46+
texts.append(content.text)
47+
return "".join(texts)

0 commit comments

Comments
 (0)