File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "." : " 0.25 .0"
2+ "." : " 0.26 .0"
33}
Original file line number Diff line number Diff line change 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
518Full Changelog: [ v0.24.0...v0.25.0] ( https://github.com/perplexityai/perplexity-py/compare/v0.24.0...v0.25.0 )
Original file line number Diff line number Diff line change 11[project ]
22name = " perplexityai"
3- version = " 0.25 .0"
3+ version = " 0.26 .0"
44description = " The official Python library for the perplexity API"
55dynamic = [" readme" ]
66license = " Apache-2.0"
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 55
66from .._models import BaseModel
77from .error_info import ErrorInfo
8- from .output_item import OutputItem
8+ from .output_item import OutputItem , MessageOutputItem
99from .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 )
You can’t perform that action at this time.
0 commit comments