diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 57dc0c3..e4e1c3c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.33.0" + ".": "0.34.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 7936813..04be40b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 10 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai/perplexity-cefddb763d493b69465328583ef47cf95655d9cdb3dd0f2c8680fd9679f3c8d8.yml -openapi_spec_hash: 72274397b70c787db6db52dfd34a75ee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai/perplexity-8deeee7ec30ff9d4ce52c48452d3660f806e614f14bb8f77209ff43ac449b60e.yml +openapi_spec_hash: 2334e8ee2ebe0d944472ad9385bb79e0 config_hash: e09a1767e929614701fb498eaaac682d diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af3529..0d926b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 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) + +### Features + +* **search:** add search_type parameter for People Search routing ([cd15aef](https://github.com/perplexityai/perplexity-py/commit/cd15aef4f4f0a8b2f10eb6adb7fcba7dac7430f3)) + ## 0.33.0 (2026-05-13) Full Changelog: [v0.32.1...v0.33.0](https://github.com/perplexityai/perplexity-py/compare/v0.32.1...v0.33.0) diff --git a/pyproject.toml b/pyproject.toml index d13e6aa..1b02972 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "perplexityai" -version = "0.33.0" +version = "0.34.0" description = "The official Python library for the perplexity API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/perplexity/_version.py b/src/perplexity/_version.py index f416979..55b8f5d 100644 --- a/src/perplexity/_version.py +++ b/src/perplexity/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "perplexity" -__version__ = "0.33.0" # x-release-please-version +__version__ = "0.34.0" # x-release-please-version diff --git a/src/perplexity/resources/search.py b/src/perplexity/resources/search.py index 3f5a244..06f9f62 100644 --- a/src/perplexity/resources/search.py +++ b/src/perplexity/resources/search.py @@ -61,6 +61,7 @@ def create( search_language_filter: Optional[SequenceNotStr[str]] | Omit = omit, search_mode: Optional[Literal["web", "academic", "sec"]] | Omit = omit, search_recency_filter: Optional[Literal["hour", "day", "week", "month", "year"]] | Omit = omit, + search_type: Optional[Literal["web", "people"]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -72,6 +73,9 @@ def create( Search the web and retrieve relevant web page contents. Args: + search_type: Search type — "web" for general web search, "people" for people search. + max_results above 20 is only supported for people search. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -98,6 +102,7 @@ def create( "search_language_filter": search_language_filter, "search_mode": search_mode, "search_recency_filter": search_recency_filter, + "search_type": search_type, }, search_create_params.SearchCreateParams, ), @@ -145,6 +150,7 @@ async def create( search_language_filter: Optional[SequenceNotStr[str]] | Omit = omit, search_mode: Optional[Literal["web", "academic", "sec"]] | Omit = omit, search_recency_filter: Optional[Literal["hour", "day", "week", "month", "year"]] | Omit = omit, + search_type: Optional[Literal["web", "people"]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -156,6 +162,9 @@ async def create( Search the web and retrieve relevant web page contents. Args: + search_type: Search type — "web" for general web search, "people" for people search. + max_results above 20 is only supported for people search. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -182,6 +191,7 @@ async def create( "search_language_filter": search_language_filter, "search_mode": search_mode, "search_recency_filter": search_recency_filter, + "search_type": search_type, }, search_create_params.SearchCreateParams, ), diff --git a/src/perplexity/types/search_create_params.py b/src/perplexity/types/search_create_params.py index cb5fb76..9467457 100644 --- a/src/perplexity/types/search_create_params.py +++ b/src/perplexity/types/search_create_params.py @@ -38,3 +38,9 @@ class SearchCreateParams(TypedDict, total=False): search_mode: Optional[Literal["web", "academic", "sec"]] search_recency_filter: Optional[Literal["hour", "day", "week", "month", "year"]] + + search_type: Optional[Literal["web", "people"]] + """Search type — "web" for general web search, "people" for people search. + + max_results above 20 is only supported for people search. + """ diff --git a/tests/api_resources/test_search.py b/tests/api_resources/test_search.py index 7bcd539..dc89d8e 100644 --- a/tests/api_resources/test_search.py +++ b/tests/api_resources/test_search.py @@ -43,6 +43,7 @@ def test_method_create_with_all_params(self, client: Perplexity) -> None: search_language_filter=["string"], search_mode="web", search_recency_filter="hour", + search_type="web", ) assert_matches_type(SearchCreateResponse, search, path=["response"]) @@ -104,6 +105,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncPerplexity search_language_filter=["string"], search_mode="web", search_recency_filter="hour", + search_type="web", ) assert_matches_type(SearchCreateResponse, search, path=["response"])