Skip to content

Commit 847b689

Browse files
authored
Merge pull request #30 from perplexityai/release-please--branches--main--changes--next
release: 0.24.0
2 parents 0b4efd6 + 6bdc9b5 commit 847b689

33 files changed

Lines changed: 2234 additions & 65 deletions

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

‎.stats.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-625f4b8c8e0776ba42d4848352701e8a482c732f47b4570bcc6bd55d0fa40d4f.yml
3-
openapi_spec_hash: 81b4e099cc6c902cacac6cfae611157f
4-
config_hash: 5b10428c82f4119aa4837f03046d0e5c
1+
configured_endpoints: 6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-6ee97a643811931347dee319fa479b3941a70862224ccd0759b046a916e32a03.yml
3+
openapi_spec_hash: 33e68ae45a6e56af66c51f153bba2c65
4+
config_hash: 8671667dee927c6e58679e98f4f6313a

‎CHANGELOG.md‎

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

3+
## 0.24.0 (2026-01-23)
4+
5+
Full Changelog: [v0.23.0...v0.24.0](https://github.com/perplexityai/perplexity-py/compare/v0.23.0...v0.24.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([6b8c312](https://github.com/perplexityai/perplexity-py/commit/6b8c3120b1a845ec8460d3ff1dbb5ee68dba2724))
10+
311
## 0.23.0 (2026-01-13)
412

513
Full Changelog: [v0.22.3...v0.23.0](https://github.com/perplexityai/perplexity-py/compare/v0.22.3...v0.23.0)

‎api.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ from perplexity.types import (
66
ChatMessageInput,
77
ChatMessageOutput,
88
Choice,
9+
JsonSchemaFormat,
10+
ResponseFormat,
11+
SearchResult,
912
UsageInfo,
13+
UserLocation,
14+
WebSearchOptions,
1015
)
1116
```
1217

@@ -36,6 +41,27 @@ Methods:
3641

3742
- <code title="post /search">client.search.<a href="./src/perplexity/resources/search.py">create</a>(\*\*<a href="src/perplexity/types/search_create_params.py">params</a>) -> <a href="./src/perplexity/types/search_create_response.py">SearchCreateResponse</a></code>
3843

44+
# Responses
45+
46+
Types:
47+
48+
```python
49+
from perplexity.types import (
50+
Annotation,
51+
ContentPart,
52+
ErrorInfo,
53+
OutputItem,
54+
ResponseStreamChunk,
55+
ResponsesCreateParams,
56+
ResponsesUsage,
57+
ResponseCreateResponse,
58+
)
59+
```
60+
61+
Methods:
62+
63+
- <code title="post /v2/responses">client.responses.<a href="./src/perplexity/resources/responses.py">create</a>(\*\*<a href="src/perplexity/types/response_create_params.py">params</a>) -> <a href="./src/perplexity/types/response_create_response.py">ResponseCreateResponse</a></code>
64+
3965
# Async
4066

4167
## Chat

‎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.23.0"
3+
version = "0.24.0"
44
description = "The official Python library for the perplexity API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

‎src/perplexity/_client.py‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@
3131
)
3232

3333
if TYPE_CHECKING:
34-
from .resources import chat, async_, search
34+
from .resources import chat, async_, search, responses
3535
from .resources.search import SearchResource, AsyncSearchResource
3636
from .resources.chat.chat import ChatResource, AsyncChatResource
37+
from .resources.responses import ResponsesResource, AsyncResponsesResource
3738
from .resources.async_.async_ import AsyncResource, AsyncAsyncResource
3839

3940
__all__ = [
@@ -117,6 +118,12 @@ def search(self) -> SearchResource:
117118

118119
return SearchResource(self)
119120

121+
@cached_property
122+
def responses(self) -> ResponsesResource:
123+
from .resources.responses import ResponsesResource
124+
125+
return ResponsesResource(self)
126+
120127
@cached_property
121128
def async_(self) -> AsyncResource:
122129
from .resources.async_ import AsyncResource
@@ -305,6 +312,12 @@ def search(self) -> AsyncSearchResource:
305312

306313
return AsyncSearchResource(self)
307314

315+
@cached_property
316+
def responses(self) -> AsyncResponsesResource:
317+
from .resources.responses import AsyncResponsesResource
318+
319+
return AsyncResponsesResource(self)
320+
308321
@cached_property
309322
def async_(self) -> AsyncAsyncResource:
310323
from .resources.async_ import AsyncAsyncResource
@@ -442,6 +455,12 @@ def search(self) -> search.SearchResourceWithRawResponse:
442455

443456
return SearchResourceWithRawResponse(self._client.search)
444457

458+
@cached_property
459+
def responses(self) -> responses.ResponsesResourceWithRawResponse:
460+
from .resources.responses import ResponsesResourceWithRawResponse
461+
462+
return ResponsesResourceWithRawResponse(self._client.responses)
463+
445464
@cached_property
446465
def async_(self) -> async_.AsyncResourceWithRawResponse:
447466
from .resources.async_ import AsyncResourceWithRawResponse
@@ -467,6 +486,12 @@ def search(self) -> search.AsyncSearchResourceWithRawResponse:
467486

468487
return AsyncSearchResourceWithRawResponse(self._client.search)
469488

489+
@cached_property
490+
def responses(self) -> responses.AsyncResponsesResourceWithRawResponse:
491+
from .resources.responses import AsyncResponsesResourceWithRawResponse
492+
493+
return AsyncResponsesResourceWithRawResponse(self._client.responses)
494+
470495
@cached_property
471496
def async_(self) -> async_.AsyncAsyncResourceWithRawResponse:
472497
from .resources.async_ import AsyncAsyncResourceWithRawResponse
@@ -492,6 +517,12 @@ def search(self) -> search.SearchResourceWithStreamingResponse:
492517

493518
return SearchResourceWithStreamingResponse(self._client.search)
494519

520+
@cached_property
521+
def responses(self) -> responses.ResponsesResourceWithStreamingResponse:
522+
from .resources.responses import ResponsesResourceWithStreamingResponse
523+
524+
return ResponsesResourceWithStreamingResponse(self._client.responses)
525+
495526
@cached_property
496527
def async_(self) -> async_.AsyncResourceWithStreamingResponse:
497528
from .resources.async_ import AsyncResourceWithStreamingResponse
@@ -517,6 +548,12 @@ def search(self) -> search.AsyncSearchResourceWithStreamingResponse:
517548

518549
return AsyncSearchResourceWithStreamingResponse(self._client.search)
519550

551+
@cached_property
552+
def responses(self) -> responses.AsyncResponsesResourceWithStreamingResponse:
553+
from .resources.responses import AsyncResponsesResourceWithStreamingResponse
554+
555+
return AsyncResponsesResourceWithStreamingResponse(self._client.responses)
556+
520557
@cached_property
521558
def async_(self) -> async_.AsyncAsyncResourceWithStreamingResponse:
522559
from .resources.async_ import AsyncAsyncResourceWithStreamingResponse

‎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.23.0" # x-release-please-version
4+
__version__ = "0.24.0" # x-release-please-version

‎src/perplexity/resources/__init__.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
SearchResourceWithStreamingResponse,
2525
AsyncSearchResourceWithStreamingResponse,
2626
)
27+
from .responses import (
28+
ResponsesResource,
29+
AsyncResponsesResource,
30+
ResponsesResourceWithRawResponse,
31+
AsyncResponsesResourceWithRawResponse,
32+
ResponsesResourceWithStreamingResponse,
33+
AsyncResponsesResourceWithStreamingResponse,
34+
)
2735

2836
__all__ = [
2937
"ChatResource",
@@ -38,6 +46,12 @@
3846
"AsyncSearchResourceWithRawResponse",
3947
"SearchResourceWithStreamingResponse",
4048
"AsyncSearchResourceWithStreamingResponse",
49+
"ResponsesResource",
50+
"AsyncResponsesResource",
51+
"ResponsesResourceWithRawResponse",
52+
"AsyncResponsesResourceWithRawResponse",
53+
"ResponsesResourceWithStreamingResponse",
54+
"AsyncResponsesResourceWithStreamingResponse",
4155
"AsyncResource",
4256
"AsyncAsyncResource",
4357
"AsyncResourceWithRawResponse",

‎src/perplexity/resources/chat/completions.py‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from ..._base_client import make_request_options
2323
from ...types.stream_chunk import StreamChunk
2424
from ...types.shared_params.chat_message_input import ChatMessageInput
25+
from ...types.shared_params.web_search_options import WebSearchOptions
2526

2627
__all__ = ["CompletionsResource", "AsyncCompletionsResource"]
2728

@@ -108,7 +109,7 @@ def create(
108109
updated_before_timestamp: Optional[int] | Omit = omit,
109110
use_threads: Optional[bool] | Omit = omit,
110111
user_original_query: Optional[str] | Omit = omit,
111-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
112+
web_search_options: WebSearchOptions | Omit = omit,
112113
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
113114
# The extra values given here take precedence over values defined on the client or passed to this method.
114115
extra_headers: Headers | None = None,
@@ -192,7 +193,7 @@ def create(
192193
updated_before_timestamp: Optional[int] | Omit = omit,
193194
use_threads: Optional[bool] | Omit = omit,
194195
user_original_query: Optional[str] | Omit = omit,
195-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
196+
web_search_options: WebSearchOptions | Omit = omit,
196197
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
197198
# The extra values given here take precedence over values defined on the client or passed to this method.
198199
extra_headers: Headers | None = None,
@@ -276,7 +277,7 @@ def create(
276277
updated_before_timestamp: Optional[int] | Omit = omit,
277278
use_threads: Optional[bool] | Omit = omit,
278279
user_original_query: Optional[str] | Omit = omit,
279-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
280+
web_search_options: WebSearchOptions | Omit = omit,
280281
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
281282
# The extra values given here take precedence over values defined on the client or passed to this method.
282283
extra_headers: Headers | None = None,
@@ -360,7 +361,7 @@ def create(
360361
updated_before_timestamp: Optional[int] | Omit = omit,
361362
use_threads: Optional[bool] | Omit = omit,
362363
user_original_query: Optional[str] | Omit = omit,
363-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
364+
web_search_options: WebSearchOptions | Omit = omit,
364365
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
365366
# The extra values given here take precedence over values defined on the client or passed to this method.
366367
extra_headers: Headers | None = None,
@@ -527,7 +528,7 @@ async def create(
527528
updated_before_timestamp: Optional[int] | Omit = omit,
528529
use_threads: Optional[bool] | Omit = omit,
529530
user_original_query: Optional[str] | Omit = omit,
530-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
531+
web_search_options: WebSearchOptions | Omit = omit,
531532
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
532533
# The extra values given here take precedence over values defined on the client or passed to this method.
533534
extra_headers: Headers | None = None,
@@ -611,7 +612,7 @@ async def create(
611612
updated_before_timestamp: Optional[int] | Omit = omit,
612613
use_threads: Optional[bool] | Omit = omit,
613614
user_original_query: Optional[str] | Omit = omit,
614-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
615+
web_search_options: WebSearchOptions | Omit = omit,
615616
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
616617
# The extra values given here take precedence over values defined on the client or passed to this method.
617618
extra_headers: Headers | None = None,
@@ -695,7 +696,7 @@ async def create(
695696
updated_before_timestamp: Optional[int] | Omit = omit,
696697
use_threads: Optional[bool] | Omit = omit,
697698
user_original_query: Optional[str] | Omit = omit,
698-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
699+
web_search_options: WebSearchOptions | Omit = omit,
699700
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
700701
# The extra values given here take precedence over values defined on the client or passed to this method.
701702
extra_headers: Headers | None = None,
@@ -779,7 +780,7 @@ async def create(
779780
updated_before_timestamp: Optional[int] | Omit = omit,
780781
use_threads: Optional[bool] | Omit = omit,
781782
user_original_query: Optional[str] | Omit = omit,
782-
web_search_options: completion_create_params.WebSearchOptions | Omit = omit,
783+
web_search_options: WebSearchOptions | Omit = omit,
783784
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
784785
# The extra values given here take precedence over values defined on the client or passed to this method.
785786
extra_headers: Headers | None = None,

0 commit comments

Comments
 (0)