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.18.0"
".": "0.19.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-335f0ceddae39ba77e5abf8b2b72691a43174b25c2ec897cd7779db8d1524820.yml
openapi_spec_hash: e34fc7a3c97b61c7aded4df4774f298e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-5d4ba4296d72d87995a2189a991e710a77b4b73cc275ad03d8a0eec245cf55db.yml
openapi_spec_hash: 5d29546ef1490dda18cda8ca97cd665e
config_hash: 4e2c5b7ad4caa07a2ac1af091ecf6c9c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.19.0 (2025-10-30)

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

### Features

* **api:** manual updates ([d32c134](https://github.com/perplexityai/perplexity-py/commit/d32c1346744e5521a50da56e0d5a81261fd53f27))

## 0.18.0 (2025-10-29)

Full Changelog: [v0.17.1...v0.18.0](https://github.com/perplexityai/perplexity-py/compare/v0.17.1...v0.18.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ stream_chunk = client.chat.completions.create(
}
],
model="model",
debug_params={},
web_search_options={},
)
print(stream_chunk.debug_params)
print(stream_chunk.web_search_options)
```

## Handling errors
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.18.0"
version = "0.19.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.18.0" # x-release-please-version
__version__ = "0.19.0" # x-release-please-version
10 changes: 0 additions & 10 deletions src/perplexity/resources/chat/completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -143,7 +142,6 @@ def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -226,7 +224,6 @@ def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -308,7 +305,6 @@ def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -377,7 +373,6 @@ def create(
"best_of": best_of,
"country": country,
"cum_logprobs": cum_logprobs,
"debug_params": debug_params,
"disable_search": disable_search,
"diverse_first_token": diverse_first_token,
"enable_search_classifier": enable_search_classifier,
Expand Down Expand Up @@ -473,7 +468,6 @@ async def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -557,7 +551,6 @@ async def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -640,7 +633,6 @@ async def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -722,7 +714,6 @@ async def create(
best_of: Optional[int] | Omit = omit,
country: Optional[str] | Omit = omit,
cum_logprobs: Optional[bool] | Omit = omit,
debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
disable_search: Optional[bool] | Omit = omit,
diverse_first_token: Optional[bool] | Omit = omit,
enable_search_classifier: Optional[bool] | Omit = omit,
Expand Down Expand Up @@ -791,7 +782,6 @@ async def create(
"best_of": best_of,
"country": country,
"cum_logprobs": cum_logprobs,
"debug_params": debug_params,
"disable_search": disable_search,
"diverse_first_token": diverse_first_token,
"enable_search_classifier": enable_search_classifier,
Expand Down
9 changes: 0 additions & 9 deletions src/perplexity/types/async_/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
__all__ = [
"CompletionCreateParams",
"Request",
"RequestDebugParams",
"RequestResponseFormat",
"RequestResponseFormatResponseFormatText",
"RequestResponseFormatResponseFormatJsonSchema",
Expand All @@ -32,12 +31,6 @@ class CompletionCreateParams(TypedDict, total=False):
idempotency_key: Optional[str]


class RequestDebugParams(TypedDict, total=False):
summarizer_model_override: Optional[str]

summarizer_prompt_override: Optional[str]


class RequestResponseFormatResponseFormatText(TypedDict, total=False):
type: Required[Literal["text"]]

Expand Down Expand Up @@ -148,8 +141,6 @@ class Request(TypedDict, total=False):

cum_logprobs: Optional[bool]

debug_params: Optional[RequestDebugParams]

disable_search: Optional[bool]

diverse_first_token: Optional[bool]
Expand Down
9 changes: 0 additions & 9 deletions src/perplexity/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

__all__ = [
"CompletionCreateParamsBase",
"DebugParams",
"ResponseFormat",
"ResponseFormatResponseFormatText",
"ResponseFormatResponseFormatJsonSchema",
Expand Down Expand Up @@ -46,8 +45,6 @@ class CompletionCreateParamsBase(TypedDict, total=False):

cum_logprobs: Optional[bool]

debug_params: Optional[DebugParams]

disable_search: Optional[bool]

diverse_first_token: Optional[bool]
Expand Down Expand Up @@ -143,12 +140,6 @@ class CompletionCreateParamsBase(TypedDict, total=False):
web_search_options: WebSearchOptions


class DebugParams(TypedDict, total=False):
summarizer_model_override: Optional[str]

summarizer_prompt_override: Optional[str]


class ResponseFormatResponseFormatText(TypedDict, total=False):
type: Required[Literal["text"]]

Expand Down
12 changes: 2 additions & 10 deletions src/perplexity/types/shared/chat_message_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,6 @@ class ReasoningStepWebSearch(BaseModel):
class ReasoningStep(BaseModel):
thought: str

type: Literal[
"web_search",
"fetch_url_content",
"execute_python",
"agent_progress",
"browser_agent",
"browser_tool_execution",
"file_attachment_search",
]

agent_progress: Optional[ReasoningStepAgentProgress] = None
"""Agent progress class for live-browsing updates"""

Expand All @@ -183,6 +173,8 @@ class ReasoningStep(BaseModel):
file_attachment_search: Optional[ReasoningStepFileAttachmentSearch] = None
"""File attachment search step details wrapper class"""

type: Optional[str] = None

web_search: Optional[ReasoningStepWebSearch] = None
"""Web search step details wrapper class"""

Expand Down
12 changes: 2 additions & 10 deletions src/perplexity/types/shared/chat_message_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,6 @@ class ReasoningStepWebSearch(BaseModel):
class ReasoningStep(BaseModel):
thought: str

type: Literal[
"web_search",
"fetch_url_content",
"execute_python",
"agent_progress",
"browser_agent",
"browser_tool_execution",
"file_attachment_search",
]

agent_progress: Optional[ReasoningStepAgentProgress] = None
"""Agent progress class for live-browsing updates"""

Expand All @@ -183,6 +173,8 @@ class ReasoningStep(BaseModel):
file_attachment_search: Optional[ReasoningStepFileAttachmentSearch] = None
"""File attachment search step details wrapper class"""

type: Optional[str] = None

web_search: Optional[ReasoningStepWebSearch] = None
"""Web search step details wrapper class"""

Expand Down
14 changes: 2 additions & 12 deletions src/perplexity/types/shared_params/chat_message_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,6 @@ class ReasoningStepWebSearch(TypedDict, total=False):
class ReasoningStep(TypedDict, total=False):
thought: Required[str]

type: Required[
Literal[
"web_search",
"fetch_url_content",
"execute_python",
"agent_progress",
"browser_agent",
"browser_tool_execution",
"file_attachment_search",
]
]

agent_progress: Optional[ReasoningStepAgentProgress]
"""Agent progress class for live-browsing updates"""

Expand All @@ -187,6 +175,8 @@ class ReasoningStep(TypedDict, total=False):
file_attachment_search: Optional[ReasoningStepFileAttachmentSearch]
"""File attachment search step details wrapper class"""

type: Optional[str]

web_search: Optional[ReasoningStepWebSearch]
"""Web search step details wrapper class"""

Expand Down
12 changes: 2 additions & 10 deletions tests/api_resources/async_/chat/test_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def test_method_create_with_all_params(self, client: Perplexity) -> None:
"reasoning_steps": [
{
"thought": "thought",
"type": "web_search",
"agent_progress": {
"action": "action",
"screenshot": "screenshot",
Expand Down Expand Up @@ -77,6 +76,7 @@ def test_method_create_with_all_params(self, client: Perplexity) -> None:
]
},
"file_attachment_search": {"attachment_urls": ["string"]},
"type": "type",
"web_search": {
"search_keywords": ["string"],
"search_results": [
Expand Down Expand Up @@ -112,10 +112,6 @@ def test_method_create_with_all_params(self, client: Perplexity) -> None:
"best_of": 0,
"country": "country",
"cum_logprobs": True,
"debug_params": {
"summarizer_model_override": "summarizer_model_override",
"summarizer_prompt_override": "summarizer_prompt_override",
},
"disable_search": True,
"diverse_first_token": True,
"enable_search_classifier": True,
Expand Down Expand Up @@ -356,7 +352,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncPerplexity
"reasoning_steps": [
{
"thought": "thought",
"type": "web_search",
"agent_progress": {
"action": "action",
"screenshot": "screenshot",
Expand Down Expand Up @@ -384,6 +379,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncPerplexity
]
},
"file_attachment_search": {"attachment_urls": ["string"]},
"type": "type",
"web_search": {
"search_keywords": ["string"],
"search_results": [
Expand Down Expand Up @@ -419,10 +415,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncPerplexity
"best_of": 0,
"country": "country",
"cum_logprobs": True,
"debug_params": {
"summarizer_model_override": "summarizer_model_override",
"summarizer_prompt_override": "summarizer_prompt_override",
},
"disable_search": True,
"diverse_first_token": True,
"enable_search_classifier": True,
Expand Down
Loading