perplexityai 0.17.1__tar.gz → 0.19.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of perplexityai might be problematic. Click here for more details.

Files changed (102) hide show
  1. perplexityai-0.19.0/.release-please-manifest.json +3 -0
  2. {perplexityai-0.17.1 → perplexityai-0.19.0}/CHANGELOG.md +16 -0
  3. {perplexityai-0.17.1 → perplexityai-0.19.0}/PKG-INFO +5 -5
  4. {perplexityai-0.17.1 → perplexityai-0.19.0}/README.md +4 -4
  5. {perplexityai-0.17.1 → perplexityai-0.19.0}/pyproject.toml +1 -1
  6. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_constants.py +2 -2
  7. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_version.py +1 -1
  8. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/chat/completions.py +0 -10
  9. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/chat/completion_create_params.py +0 -9
  10. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/chat/completion_create_params.py +0 -9
  11. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared/chat_message_input.py +2 -10
  12. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared/chat_message_output.py +2 -10
  13. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared_params/chat_message_input.py +2 -12
  14. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/async_/chat/test_completions.py +2 -10
  15. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/chat/test_completions.py +4 -20
  16. perplexityai-0.17.1/.release-please-manifest.json +0 -3
  17. {perplexityai-0.17.1 → perplexityai-0.19.0}/.gitignore +0 -0
  18. {perplexityai-0.17.1 → perplexityai-0.19.0}/CONTRIBUTING.md +0 -0
  19. {perplexityai-0.17.1 → perplexityai-0.19.0}/LICENSE +0 -0
  20. {perplexityai-0.17.1 → perplexityai-0.19.0}/SECURITY.md +0 -0
  21. {perplexityai-0.17.1 → perplexityai-0.19.0}/api.md +12 -12
  22. {perplexityai-0.17.1 → perplexityai-0.19.0}/bin/check-release-environment +0 -0
  23. {perplexityai-0.17.1 → perplexityai-0.19.0}/bin/publish-pypi +0 -0
  24. {perplexityai-0.17.1 → perplexityai-0.19.0}/examples/.keep +0 -0
  25. {perplexityai-0.17.1 → perplexityai-0.19.0}/noxfile.py +0 -0
  26. {perplexityai-0.17.1 → perplexityai-0.19.0}/release-please-config.json +0 -0
  27. {perplexityai-0.17.1 → perplexityai-0.19.0}/requirements-dev.lock +0 -0
  28. {perplexityai-0.17.1 → perplexityai-0.19.0}/requirements.lock +0 -0
  29. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/__init__.py +0 -0
  30. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_base_client.py +0 -0
  31. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_client.py +8 -8
  32. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_compat.py +0 -0
  33. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_exceptions.py +0 -0
  34. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_files.py +0 -0
  35. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_models.py +0 -0
  36. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_qs.py +0 -0
  37. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_resource.py +0 -0
  38. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_response.py +0 -0
  39. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_streaming.py +0 -0
  40. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_types.py +0 -0
  41. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/__init__.py +0 -0
  42. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_compat.py +0 -0
  43. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_datetime_parse.py +0 -0
  44. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_logs.py +0 -0
  45. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_proxy.py +0 -0
  46. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_reflection.py +0 -0
  47. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_resources_proxy.py +0 -0
  48. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_streams.py +0 -0
  49. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_sync.py +0 -0
  50. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_transform.py +0 -0
  51. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_typing.py +0 -0
  52. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/_utils/_utils.py +0 -0
  53. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/lib/.keep +0 -0
  54. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/py.typed +0 -0
  55. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/__init__.py +6 -6
  56. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/async_/__init__.py +0 -0
  57. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/async_/async_.py +0 -0
  58. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/async_/chat/__init__.py +0 -0
  59. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/async_/chat/chat.py +0 -0
  60. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/async_/chat/completions.py +0 -0
  61. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/chat/__init__.py +0 -0
  62. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/chat/chat.py +0 -0
  63. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/resources/search.py +0 -0
  64. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/__init__.py +0 -0
  65. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/__init__.py +0 -0
  66. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/chat/__init__.py +0 -0
  67. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/chat/completion_create_response.py +0 -0
  68. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/chat/completion_get_params.py +0 -0
  69. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/chat/completion_get_response.py +0 -0
  70. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/async_/chat/completion_list_response.py +0 -0
  71. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/chat/__init__.py +0 -0
  72. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/search_create_params.py +0 -0
  73. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/search_create_response.py +0 -0
  74. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared/__init__.py +0 -0
  75. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared/api_public_search_result.py +0 -0
  76. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared/choice.py +0 -0
  77. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared/usage_info.py +0 -0
  78. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared_params/__init__.py +0 -0
  79. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/shared_params/api_public_search_result.py +0 -0
  80. {perplexityai-0.17.1 → perplexityai-0.19.0}/src/perplexity/types/stream_chunk.py +0 -0
  81. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/__init__.py +0 -0
  82. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/__init__.py +0 -0
  83. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/async_/__init__.py +0 -0
  84. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/async_/chat/__init__.py +0 -0
  85. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/chat/__init__.py +0 -0
  86. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/api_resources/test_search.py +0 -0
  87. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/conftest.py +0 -0
  88. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/sample_file.txt +0 -0
  89. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_client.py +0 -0
  90. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_deepcopy.py +0 -0
  91. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_extract_files.py +0 -0
  92. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_files.py +0 -0
  93. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_models.py +0 -0
  94. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_qs.py +0 -0
  95. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_required_args.py +0 -0
  96. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_response.py +0 -0
  97. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_streaming.py +0 -0
  98. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_transform.py +0 -0
  99. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_utils/test_datetime_parse.py +0 -0
  100. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_utils/test_proxy.py +0 -0
  101. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/test_utils/test_typing.py +0 -0
  102. {perplexityai-0.17.1 → perplexityai-0.19.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.19.0"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.0 (2025-10-30)
4
+
5
+ Full Changelog: [v0.18.0...v0.19.0](https://github.com/perplexityai/perplexity-py/compare/v0.18.0...v0.19.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([d32c134](https://github.com/perplexityai/perplexity-py/commit/d32c1346744e5521a50da56e0d5a81261fd53f27))
10
+
11
+ ## 0.18.0 (2025-10-29)
12
+
13
+ Full Changelog: [v0.17.1...v0.18.0](https://github.com/perplexityai/perplexity-py/compare/v0.17.1...v0.18.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** manual updates ([7a08c95](https://github.com/perplexityai/perplexity-py/commit/7a08c95ea7f9a04004153aac6cfd78022a68fd11))
18
+
3
19
  ## 0.17.1 (2025-10-18)
4
20
 
5
21
  Full Changelog: [v0.17.0...v0.17.1](https://github.com/perplexityai/perplexity-py/compare/v0.17.0...v0.17.1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: perplexityai
3
- Version: 0.17.1
3
+ Version: 0.19.0
4
4
  Summary: The official Python library for the perplexity API
5
5
  Project-URL: Homepage, https://github.com/perplexityai/perplexity-py
6
6
  Project-URL: Repository, https://github.com/perplexityai/perplexity-py
@@ -246,9 +246,9 @@ stream_chunk = client.chat.completions.create(
246
246
  }
247
247
  ],
248
248
  model="model",
249
- debug_params={},
249
+ web_search_options={},
250
250
  )
251
- print(stream_chunk.debug_params)
251
+ print(stream_chunk.web_search_options)
252
252
  ```
253
253
 
254
254
  ## Handling errors
@@ -331,7 +331,7 @@ client.with_options(max_retries=5).chat.completions.create(
331
331
 
332
332
  ### Timeouts
333
333
 
334
- By default requests time out after 1 minute. You can configure this with a `timeout` option,
334
+ By default requests time out after 15 minutes. You can configure this with a `timeout` option,
335
335
  which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
336
336
 
337
337
  ```python
@@ -339,7 +339,7 @@ from perplexity import Perplexity
339
339
 
340
340
  # Configure the default for all requests:
341
341
  client = Perplexity(
342
- # 20 seconds (default is 1 minute)
342
+ # 20 seconds (default is 15 minutes)
343
343
  timeout=20.0,
344
344
  )
345
345
 
@@ -211,9 +211,9 @@ stream_chunk = client.chat.completions.create(
211
211
  }
212
212
  ],
213
213
  model="model",
214
- debug_params={},
214
+ web_search_options={},
215
215
  )
216
- print(stream_chunk.debug_params)
216
+ print(stream_chunk.web_search_options)
217
217
  ```
218
218
 
219
219
  ## Handling errors
@@ -296,7 +296,7 @@ client.with_options(max_retries=5).chat.completions.create(
296
296
 
297
297
  ### Timeouts
298
298
 
299
- By default requests time out after 1 minute. You can configure this with a `timeout` option,
299
+ By default requests time out after 15 minutes. You can configure this with a `timeout` option,
300
300
  which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
301
301
 
302
302
  ```python
@@ -304,7 +304,7 @@ from perplexity import Perplexity
304
304
 
305
305
  # Configure the default for all requests:
306
306
  client = Perplexity(
307
- # 20 seconds (default is 1 minute)
307
+ # 20 seconds (default is 15 minutes)
308
308
  timeout=20.0,
309
309
  )
310
310
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "perplexityai"
3
- version = "0.17.1"
3
+ version = "0.19.0"
4
4
  description = "The official Python library for the perplexity API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -5,8 +5,8 @@ import httpx
5
5
  RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
6
6
  OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
7
7
 
8
- # default timeout is 1 minute
9
- DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
8
+ # default timeout is 15 minutes
9
+ DEFAULT_TIMEOUT = httpx.Timeout(timeout=900, connect=5.0)
10
10
  DEFAULT_MAX_RETRIES = 2
11
11
  DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
12
12
 
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "perplexity"
4
- __version__ = "0.17.1" # x-release-please-version
4
+ __version__ = "0.19.0" # x-release-please-version
@@ -59,7 +59,6 @@ class CompletionsResource(SyncAPIResource):
59
59
  best_of: Optional[int] | Omit = omit,
60
60
  country: Optional[str] | Omit = omit,
61
61
  cum_logprobs: Optional[bool] | Omit = omit,
62
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
63
62
  disable_search: Optional[bool] | Omit = omit,
64
63
  diverse_first_token: Optional[bool] | Omit = omit,
65
64
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -143,7 +142,6 @@ class CompletionsResource(SyncAPIResource):
143
142
  best_of: Optional[int] | Omit = omit,
144
143
  country: Optional[str] | Omit = omit,
145
144
  cum_logprobs: Optional[bool] | Omit = omit,
146
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
147
145
  disable_search: Optional[bool] | Omit = omit,
148
146
  diverse_first_token: Optional[bool] | Omit = omit,
149
147
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -226,7 +224,6 @@ class CompletionsResource(SyncAPIResource):
226
224
  best_of: Optional[int] | Omit = omit,
227
225
  country: Optional[str] | Omit = omit,
228
226
  cum_logprobs: Optional[bool] | Omit = omit,
229
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
230
227
  disable_search: Optional[bool] | Omit = omit,
231
228
  diverse_first_token: Optional[bool] | Omit = omit,
232
229
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -308,7 +305,6 @@ class CompletionsResource(SyncAPIResource):
308
305
  best_of: Optional[int] | Omit = omit,
309
306
  country: Optional[str] | Omit = omit,
310
307
  cum_logprobs: Optional[bool] | Omit = omit,
311
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
312
308
  disable_search: Optional[bool] | Omit = omit,
313
309
  diverse_first_token: Optional[bool] | Omit = omit,
314
310
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -377,7 +373,6 @@ class CompletionsResource(SyncAPIResource):
377
373
  "best_of": best_of,
378
374
  "country": country,
379
375
  "cum_logprobs": cum_logprobs,
380
- "debug_params": debug_params,
381
376
  "disable_search": disable_search,
382
377
  "diverse_first_token": diverse_first_token,
383
378
  "enable_search_classifier": enable_search_classifier,
@@ -473,7 +468,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
473
468
  best_of: Optional[int] | Omit = omit,
474
469
  country: Optional[str] | Omit = omit,
475
470
  cum_logprobs: Optional[bool] | Omit = omit,
476
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
477
471
  disable_search: Optional[bool] | Omit = omit,
478
472
  diverse_first_token: Optional[bool] | Omit = omit,
479
473
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -557,7 +551,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
557
551
  best_of: Optional[int] | Omit = omit,
558
552
  country: Optional[str] | Omit = omit,
559
553
  cum_logprobs: Optional[bool] | Omit = omit,
560
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
561
554
  disable_search: Optional[bool] | Omit = omit,
562
555
  diverse_first_token: Optional[bool] | Omit = omit,
563
556
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -640,7 +633,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
640
633
  best_of: Optional[int] | Omit = omit,
641
634
  country: Optional[str] | Omit = omit,
642
635
  cum_logprobs: Optional[bool] | Omit = omit,
643
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
644
636
  disable_search: Optional[bool] | Omit = omit,
645
637
  diverse_first_token: Optional[bool] | Omit = omit,
646
638
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -722,7 +714,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
722
714
  best_of: Optional[int] | Omit = omit,
723
715
  country: Optional[str] | Omit = omit,
724
716
  cum_logprobs: Optional[bool] | Omit = omit,
725
- debug_params: Optional[completion_create_params.DebugParams] | Omit = omit,
726
717
  disable_search: Optional[bool] | Omit = omit,
727
718
  diverse_first_token: Optional[bool] | Omit = omit,
728
719
  enable_search_classifier: Optional[bool] | Omit = omit,
@@ -791,7 +782,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
791
782
  "best_of": best_of,
792
783
  "country": country,
793
784
  "cum_logprobs": cum_logprobs,
794
- "debug_params": debug_params,
795
785
  "disable_search": disable_search,
796
786
  "diverse_first_token": diverse_first_token,
797
787
  "enable_search_classifier": enable_search_classifier,
@@ -11,7 +11,6 @@ from ...shared_params.chat_message_input import ChatMessageInput
11
11
  __all__ = [
12
12
  "CompletionCreateParams",
13
13
  "Request",
14
- "RequestDebugParams",
15
14
  "RequestResponseFormat",
16
15
  "RequestResponseFormatResponseFormatText",
17
16
  "RequestResponseFormatResponseFormatJsonSchema",
@@ -32,12 +31,6 @@ class CompletionCreateParams(TypedDict, total=False):
32
31
  idempotency_key: Optional[str]
33
32
 
34
33
 
35
- class RequestDebugParams(TypedDict, total=False):
36
- summarizer_model_override: Optional[str]
37
-
38
- summarizer_prompt_override: Optional[str]
39
-
40
-
41
34
  class RequestResponseFormatResponseFormatText(TypedDict, total=False):
42
35
  type: Required[Literal["text"]]
43
36
 
@@ -148,8 +141,6 @@ class Request(TypedDict, total=False):
148
141
 
149
142
  cum_logprobs: Optional[bool]
150
143
 
151
- debug_params: Optional[RequestDebugParams]
152
-
153
144
  disable_search: Optional[bool]
154
145
 
155
146
  diverse_first_token: Optional[bool]
@@ -10,7 +10,6 @@ from ..shared_params.chat_message_input import ChatMessageInput
10
10
 
11
11
  __all__ = [
12
12
  "CompletionCreateParamsBase",
13
- "DebugParams",
14
13
  "ResponseFormat",
15
14
  "ResponseFormatResponseFormatText",
16
15
  "ResponseFormatResponseFormatJsonSchema",
@@ -46,8 +45,6 @@ class CompletionCreateParamsBase(TypedDict, total=False):
46
45
 
47
46
  cum_logprobs: Optional[bool]
48
47
 
49
- debug_params: Optional[DebugParams]
50
-
51
48
  disable_search: Optional[bool]
52
49
 
53
50
  diverse_first_token: Optional[bool]
@@ -143,12 +140,6 @@ class CompletionCreateParamsBase(TypedDict, total=False):
143
140
  web_search_options: WebSearchOptions
144
141
 
145
142
 
146
- class DebugParams(TypedDict, total=False):
147
- summarizer_model_override: Optional[str]
148
-
149
- summarizer_prompt_override: Optional[str]
150
-
151
-
152
143
  class ResponseFormatResponseFormatText(TypedDict, total=False):
153
144
  type: Required[Literal["text"]]
154
145
 
@@ -155,16 +155,6 @@ class ReasoningStepWebSearch(BaseModel):
155
155
  class ReasoningStep(BaseModel):
156
156
  thought: str
157
157
 
158
- type: Literal[
159
- "web_search",
160
- "fetch_url_content",
161
- "execute_python",
162
- "agent_progress",
163
- "browser_agent",
164
- "browser_tool_execution",
165
- "file_attachment_search",
166
- ]
167
-
168
158
  agent_progress: Optional[ReasoningStepAgentProgress] = None
169
159
  """Agent progress class for live-browsing updates"""
170
160
 
@@ -183,6 +173,8 @@ class ReasoningStep(BaseModel):
183
173
  file_attachment_search: Optional[ReasoningStepFileAttachmentSearch] = None
184
174
  """File attachment search step details wrapper class"""
185
175
 
176
+ type: Optional[str] = None
177
+
186
178
  web_search: Optional[ReasoningStepWebSearch] = None
187
179
  """Web search step details wrapper class"""
188
180
 
@@ -155,16 +155,6 @@ class ReasoningStepWebSearch(BaseModel):
155
155
  class ReasoningStep(BaseModel):
156
156
  thought: str
157
157
 
158
- type: Literal[
159
- "web_search",
160
- "fetch_url_content",
161
- "execute_python",
162
- "agent_progress",
163
- "browser_agent",
164
- "browser_tool_execution",
165
- "file_attachment_search",
166
- ]
167
-
168
158
  agent_progress: Optional[ReasoningStepAgentProgress] = None
169
159
  """Agent progress class for live-browsing updates"""
170
160
 
@@ -183,6 +173,8 @@ class ReasoningStep(BaseModel):
183
173
  file_attachment_search: Optional[ReasoningStepFileAttachmentSearch] = None
184
174
  """File attachment search step details wrapper class"""
185
175
 
176
+ type: Optional[str] = None
177
+
186
178
  web_search: Optional[ReasoningStepWebSearch] = None
187
179
  """Web search step details wrapper class"""
188
180
 
@@ -157,18 +157,6 @@ class ReasoningStepWebSearch(TypedDict, total=False):
157
157
  class ReasoningStep(TypedDict, total=False):
158
158
  thought: Required[str]
159
159
 
160
- type: Required[
161
- Literal[
162
- "web_search",
163
- "fetch_url_content",
164
- "execute_python",
165
- "agent_progress",
166
- "browser_agent",
167
- "browser_tool_execution",
168
- "file_attachment_search",
169
- ]
170
- ]
171
-
172
160
  agent_progress: Optional[ReasoningStepAgentProgress]
173
161
  """Agent progress class for live-browsing updates"""
174
162
 
@@ -187,6 +175,8 @@ class ReasoningStep(TypedDict, total=False):
187
175
  file_attachment_search: Optional[ReasoningStepFileAttachmentSearch]
188
176
  """File attachment search step details wrapper class"""
189
177
 
178
+ type: Optional[str]
179
+
190
180
  web_search: Optional[ReasoningStepWebSearch]
191
181
  """Web search step details wrapper class"""
192
182
 
@@ -49,7 +49,6 @@ class TestCompletions:
49
49
  "reasoning_steps": [
50
50
  {
51
51
  "thought": "thought",
52
- "type": "web_search",
53
52
  "agent_progress": {
54
53
  "action": "action",
55
54
  "screenshot": "screenshot",
@@ -77,6 +76,7 @@ class TestCompletions:
77
76
  ]
78
77
  },
79
78
  "file_attachment_search": {"attachment_urls": ["string"]},
79
+ "type": "type",
80
80
  "web_search": {
81
81
  "search_keywords": ["string"],
82
82
  "search_results": [
@@ -112,10 +112,6 @@ class TestCompletions:
112
112
  "best_of": 0,
113
113
  "country": "country",
114
114
  "cum_logprobs": True,
115
- "debug_params": {
116
- "summarizer_model_override": "summarizer_model_override",
117
- "summarizer_prompt_override": "summarizer_prompt_override",
118
- },
119
115
  "disable_search": True,
120
116
  "diverse_first_token": True,
121
117
  "enable_search_classifier": True,
@@ -356,7 +352,6 @@ class TestAsyncCompletions:
356
352
  "reasoning_steps": [
357
353
  {
358
354
  "thought": "thought",
359
- "type": "web_search",
360
355
  "agent_progress": {
361
356
  "action": "action",
362
357
  "screenshot": "screenshot",
@@ -384,6 +379,7 @@ class TestAsyncCompletions:
384
379
  ]
385
380
  },
386
381
  "file_attachment_search": {"attachment_urls": ["string"]},
382
+ "type": "type",
387
383
  "web_search": {
388
384
  "search_keywords": ["string"],
389
385
  "search_results": [
@@ -419,10 +415,6 @@ class TestAsyncCompletions:
419
415
  "best_of": 0,
420
416
  "country": "country",
421
417
  "cum_logprobs": True,
422
- "debug_params": {
423
- "summarizer_model_override": "summarizer_model_override",
424
- "summarizer_prompt_override": "summarizer_prompt_override",
425
- },
426
418
  "disable_search": True,
427
419
  "diverse_first_token": True,
428
420
  "enable_search_classifier": True,
@@ -42,7 +42,6 @@ class TestCompletions:
42
42
  "reasoning_steps": [
43
43
  {
44
44
  "thought": "thought",
45
- "type": "web_search",
46
45
  "agent_progress": {
47
46
  "action": "action",
48
47
  "screenshot": "screenshot",
@@ -70,6 +69,7 @@ class TestCompletions:
70
69
  ]
71
70
  },
72
71
  "file_attachment_search": {"attachment_urls": ["string"]},
72
+ "type": "type",
73
73
  "web_search": {
74
74
  "search_keywords": ["string"],
75
75
  "search_results": [
@@ -105,10 +105,6 @@ class TestCompletions:
105
105
  best_of=0,
106
106
  country="country",
107
107
  cum_logprobs=True,
108
- debug_params={
109
- "summarizer_model_override": "summarizer_model_override",
110
- "summarizer_prompt_override": "summarizer_prompt_override",
111
- },
112
108
  disable_search=True,
113
109
  diverse_first_token=True,
114
110
  enable_search_classifier=True,
@@ -250,7 +246,6 @@ class TestCompletions:
250
246
  "reasoning_steps": [
251
247
  {
252
248
  "thought": "thought",
253
- "type": "web_search",
254
249
  "agent_progress": {
255
250
  "action": "action",
256
251
  "screenshot": "screenshot",
@@ -278,6 +273,7 @@ class TestCompletions:
278
273
  ]
279
274
  },
280
275
  "file_attachment_search": {"attachment_urls": ["string"]},
276
+ "type": "type",
281
277
  "web_search": {
282
278
  "search_keywords": ["string"],
283
279
  "search_results": [
@@ -314,10 +310,6 @@ class TestCompletions:
314
310
  best_of=0,
315
311
  country="country",
316
312
  cum_logprobs=True,
317
- debug_params={
318
- "summarizer_model_override": "summarizer_model_override",
319
- "summarizer_prompt_override": "summarizer_prompt_override",
320
- },
321
313
  disable_search=True,
322
314
  diverse_first_token=True,
323
315
  enable_search_classifier=True,
@@ -464,7 +456,6 @@ class TestAsyncCompletions:
464
456
  "reasoning_steps": [
465
457
  {
466
458
  "thought": "thought",
467
- "type": "web_search",
468
459
  "agent_progress": {
469
460
  "action": "action",
470
461
  "screenshot": "screenshot",
@@ -492,6 +483,7 @@ class TestAsyncCompletions:
492
483
  ]
493
484
  },
494
485
  "file_attachment_search": {"attachment_urls": ["string"]},
486
+ "type": "type",
495
487
  "web_search": {
496
488
  "search_keywords": ["string"],
497
489
  "search_results": [
@@ -527,10 +519,6 @@ class TestAsyncCompletions:
527
519
  best_of=0,
528
520
  country="country",
529
521
  cum_logprobs=True,
530
- debug_params={
531
- "summarizer_model_override": "summarizer_model_override",
532
- "summarizer_prompt_override": "summarizer_prompt_override",
533
- },
534
522
  disable_search=True,
535
523
  diverse_first_token=True,
536
524
  enable_search_classifier=True,
@@ -672,7 +660,6 @@ class TestAsyncCompletions:
672
660
  "reasoning_steps": [
673
661
  {
674
662
  "thought": "thought",
675
- "type": "web_search",
676
663
  "agent_progress": {
677
664
  "action": "action",
678
665
  "screenshot": "screenshot",
@@ -700,6 +687,7 @@ class TestAsyncCompletions:
700
687
  ]
701
688
  },
702
689
  "file_attachment_search": {"attachment_urls": ["string"]},
690
+ "type": "type",
703
691
  "web_search": {
704
692
  "search_keywords": ["string"],
705
693
  "search_results": [
@@ -736,10 +724,6 @@ class TestAsyncCompletions:
736
724
  best_of=0,
737
725
  country="country",
738
726
  cum_logprobs=True,
739
- debug_params={
740
- "summarizer_model_override": "summarizer_model_override",
741
- "summarizer_prompt_override": "summarizer_prompt_override",
742
- },
743
727
  disable_search=True,
744
728
  diverse_first_token=True,
745
729
  enable_search_classifier=True,
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.17.1"
3
- }
File without changes
File without changes
File without changes
@@ -24,6 +24,18 @@ Methods:
24
24
 
25
25
  - <code title="post /chat/completions">client.chat.completions.<a href="./src/perplexity/resources/chat/completions.py">create</a>(\*\*<a href="src/perplexity/types/chat/completion_create_params.py">params</a>) -> <a href="./src/perplexity/types/stream_chunk.py">StreamChunk</a></code>
26
26
 
27
+ # Search
28
+
29
+ Types:
30
+
31
+ ```python
32
+ from perplexity.types import SearchCreateResponse
33
+ ```
34
+
35
+ Methods:
36
+
37
+ - <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>
38
+
27
39
  # Async
28
40
 
29
41
  ## Chat
@@ -45,15 +57,3 @@ Methods:
45
57
  - <code title="post /async/chat/completions">client.async*.chat.completions.<a href="./src/perplexity/resources/async*/chat/completions.py">create</a>(\*\*<a href="src/perplexity/types/async_/chat/completion_create_params.py">params</a>) -> <a href="./src/perplexity/types/async_/chat/completion_create_response.py">CompletionCreateResponse</a></code>
46
58
  - <code title="get /async/chat/completions">client.async*.chat.completions.<a href="./src/perplexity/resources/async*/chat/completions.py">list</a>() -> <a href="./src/perplexity/types/async_/chat/completion_list_response.py">CompletionListResponse</a></code>
47
59
  - <code title="get /async/chat/completions/{api_request}">client.async*.chat.completions.<a href="./src/perplexity/resources/async*/chat/completions.py">get</a>(api*request, \*\*<a href="src/perplexity/types/async*/chat/completion*get_params.py">params</a>) -> <a href="./src/perplexity/types/async*/chat/completion_get_response.py">CompletionGetResponse</a></code>
48
-
49
- # Search
50
-
51
- Types:
52
-
53
- ```python
54
- from perplexity.types import SearchCreateResponse
55
- ```
56
-
57
- Methods:
58
-
59
- - <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>
File without changes
@@ -46,8 +46,8 @@ __all__ = [
46
46
 
47
47
  class Perplexity(SyncAPIClient):
48
48
  chat: chat.ChatResource
49
- async_: async_.AsyncResource
50
49
  search: search.SearchResource
50
+ async_: async_.AsyncResource
51
51
  with_raw_response: PerplexityWithRawResponse
52
52
  with_streaming_response: PerplexityWithStreamedResponse
53
53
 
@@ -108,8 +108,8 @@ class Perplexity(SyncAPIClient):
108
108
  self._default_stream_cls = Stream
109
109
 
110
110
  self.chat = chat.ChatResource(self)
111
- self.async_ = async_.AsyncResource(self)
112
111
  self.search = search.SearchResource(self)
112
+ self.async_ = async_.AsyncResource(self)
113
113
  self.with_raw_response = PerplexityWithRawResponse(self)
114
114
  self.with_streaming_response = PerplexityWithStreamedResponse(self)
115
115
 
@@ -220,8 +220,8 @@ class Perplexity(SyncAPIClient):
220
220
 
221
221
  class AsyncPerplexity(AsyncAPIClient):
222
222
  chat: chat.AsyncChatResource
223
- async_: async_.AsyncAsyncResource
224
223
  search: search.AsyncSearchResource
224
+ async_: async_.AsyncAsyncResource
225
225
  with_raw_response: AsyncPerplexityWithRawResponse
226
226
  with_streaming_response: AsyncPerplexityWithStreamedResponse
227
227
 
@@ -282,8 +282,8 @@ class AsyncPerplexity(AsyncAPIClient):
282
282
  self._default_stream_cls = AsyncStream
283
283
 
284
284
  self.chat = chat.AsyncChatResource(self)
285
- self.async_ = async_.AsyncAsyncResource(self)
286
285
  self.search = search.AsyncSearchResource(self)
286
+ self.async_ = async_.AsyncAsyncResource(self)
287
287
  self.with_raw_response = AsyncPerplexityWithRawResponse(self)
288
288
  self.with_streaming_response = AsyncPerplexityWithStreamedResponse(self)
289
289
 
@@ -395,29 +395,29 @@ class AsyncPerplexity(AsyncAPIClient):
395
395
  class PerplexityWithRawResponse:
396
396
  def __init__(self, client: Perplexity) -> None:
397
397
  self.chat = chat.ChatResourceWithRawResponse(client.chat)
398
- self.async_ = async_.AsyncResourceWithRawResponse(client.async_)
399
398
  self.search = search.SearchResourceWithRawResponse(client.search)
399
+ self.async_ = async_.AsyncResourceWithRawResponse(client.async_)
400
400
 
401
401
 
402
402
  class AsyncPerplexityWithRawResponse:
403
403
  def __init__(self, client: AsyncPerplexity) -> None:
404
404
  self.chat = chat.AsyncChatResourceWithRawResponse(client.chat)
405
- self.async_ = async_.AsyncAsyncResourceWithRawResponse(client.async_)
406
405
  self.search = search.AsyncSearchResourceWithRawResponse(client.search)
406
+ self.async_ = async_.AsyncAsyncResourceWithRawResponse(client.async_)
407
407
 
408
408
 
409
409
  class PerplexityWithStreamedResponse:
410
410
  def __init__(self, client: Perplexity) -> None:
411
411
  self.chat = chat.ChatResourceWithStreamingResponse(client.chat)
412
- self.async_ = async_.AsyncResourceWithStreamingResponse(client.async_)
413
412
  self.search = search.SearchResourceWithStreamingResponse(client.search)
413
+ self.async_ = async_.AsyncResourceWithStreamingResponse(client.async_)
414
414
 
415
415
 
416
416
  class AsyncPerplexityWithStreamedResponse:
417
417
  def __init__(self, client: AsyncPerplexity) -> None:
418
418
  self.chat = chat.AsyncChatResourceWithStreamingResponse(client.chat)
419
- self.async_ = async_.AsyncAsyncResourceWithStreamingResponse(client.async_)
420
419
  self.search = search.AsyncSearchResourceWithStreamingResponse(client.search)
420
+ self.async_ = async_.AsyncAsyncResourceWithStreamingResponse(client.async_)
421
421
 
422
422
 
423
423
  Client = Perplexity
@@ -32,16 +32,16 @@ __all__ = [
32
32
  "AsyncChatResourceWithRawResponse",
33
33
  "ChatResourceWithStreamingResponse",
34
34
  "AsyncChatResourceWithStreamingResponse",
35
- "AsyncResource",
36
- "AsyncAsyncResource",
37
- "AsyncResourceWithRawResponse",
38
- "AsyncAsyncResourceWithRawResponse",
39
- "AsyncResourceWithStreamingResponse",
40
- "AsyncAsyncResourceWithStreamingResponse",
41
35
  "SearchResource",
42
36
  "AsyncSearchResource",
43
37
  "SearchResourceWithRawResponse",
44
38
  "AsyncSearchResourceWithRawResponse",
45
39
  "SearchResourceWithStreamingResponse",
46
40
  "AsyncSearchResourceWithStreamingResponse",
41
+ "AsyncResource",
42
+ "AsyncAsyncResource",
43
+ "AsyncResourceWithRawResponse",
44
+ "AsyncAsyncResourceWithRawResponse",
45
+ "AsyncResourceWithStreamingResponse",
46
+ "AsyncAsyncResourceWithStreamingResponse",
47
47
  ]