perplexityai 0.17.0__py3-none-any.whl → 0.18.0__py3-none-any.whl
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.
- perplexity/_client.py +8 -8
- perplexity/_constants.py +2 -2
- perplexity/_version.py +1 -1
- perplexity/resources/__init__.py +6 -6
- {perplexityai-0.17.0.dist-info → perplexityai-0.18.0.dist-info}/METADATA +4 -4
- {perplexityai-0.17.0.dist-info → perplexityai-0.18.0.dist-info}/RECORD +8 -8
- {perplexityai-0.17.0.dist-info → perplexityai-0.18.0.dist-info}/WHEEL +0 -0
- {perplexityai-0.17.0.dist-info → perplexityai-0.18.0.dist-info}/licenses/LICENSE +0 -0
perplexity/_client.py
CHANGED
|
@@ -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
|
perplexity/_constants.py
CHANGED
|
@@ -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
|
|
9
|
-
DEFAULT_TIMEOUT = httpx.Timeout(timeout=
|
|
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
|
|
perplexity/_version.py
CHANGED
perplexity/resources/__init__.py
CHANGED
|
@@ -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
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: perplexityai
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.18.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
|
|
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
|
|
|
30
30
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
31
31
|
Provides-Extra: aiohttp
|
|
32
32
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
33
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
|
33
|
+
Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
|
|
36
36
|
# Perplexity Python API library
|
|
@@ -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
|
|
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
|
|
342
|
+
# 20 seconds (default is 15 minutes)
|
|
343
343
|
timeout=20.0,
|
|
344
344
|
)
|
|
345
345
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
perplexity/__init__.py,sha256=tK4KC0qHjpk-ym2IM9lG56HeBXAHz36gMzb0rmWEa7Y,2701
|
|
2
2
|
perplexity/_base_client.py,sha256=aOipaCx-xU9FMpoqKMCzs6LHxmeGlLUlGiihUUNLGUc,67051
|
|
3
|
-
perplexity/_client.py,sha256=
|
|
3
|
+
perplexity/_client.py,sha256=66CA-d26BAzbWzsjgIx73UGWTJbkCaipj21UVkxYSAI,16154
|
|
4
4
|
perplexity/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
|
|
5
|
-
perplexity/_constants.py,sha256=
|
|
5
|
+
perplexity/_constants.py,sha256=oW-FKtjJhtWarQ-F2rUj1t-cL1dM5ksKu9d5yst1l7c,465
|
|
6
6
|
perplexity/_exceptions.py,sha256=v-hOXWSDTEtXcn_By7pPml3HjEmG5HXpbE-RK_A6_0Q,3228
|
|
7
7
|
perplexity/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
|
|
8
8
|
perplexity/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
|
|
@@ -11,7 +11,7 @@ perplexity/_resource.py,sha256=Pgc8KNBsIc1ltJn94uhDcDl0-3n5RLbe3iC2AiiNRnE,1124
|
|
|
11
11
|
perplexity/_response.py,sha256=bpqzmVGq6jnivoMkUgt3OI0Rh6xHd6BMcp5PHgSFPb0,28842
|
|
12
12
|
perplexity/_streaming.py,sha256=0IcQb2A1XAarVUZD3Wgll7S8D4ps1qVXSu5-HEI7-vw,11254
|
|
13
13
|
perplexity/_types.py,sha256=BPuUCddonHjZ2AeEModCeb-zAYCRRT5XtxneIQhJxAk,7240
|
|
14
|
-
perplexity/_version.py,sha256=
|
|
14
|
+
perplexity/_version.py,sha256=MsoWBrMJ08S04RfThrnUf_79EXHPYzG_fcSS8DuO-h4,163
|
|
15
15
|
perplexity/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
perplexity/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
perplexity/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -26,7 +26,7 @@ perplexity/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF
|
|
|
26
26
|
perplexity/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
|
|
27
27
|
perplexity/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,12253
|
|
28
28
|
perplexity/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
29
|
-
perplexity/resources/__init__.py,sha256=
|
|
29
|
+
perplexity/resources/__init__.py,sha256=GGUtTVP3Hlh9qMVd62OlwpV5t7WswIQ1fKqnKiTmyjc,1414
|
|
30
30
|
perplexity/resources/search.py,sha256=84N99MJj3Q1_lSjX-aEe6x2gRBvszxPh8np9Mq7bMag,8478
|
|
31
31
|
perplexity/resources/async_/__init__.py,sha256=hvcoEKx4nCYPDoBSO_sk-uNVQ7y-fmNhzvAlvX19TIo,964
|
|
32
32
|
perplexity/resources/async_/async_.py,sha256=XzvC3AMbXXQ9mqe9TI10ZSmEuXaWPRwNC4E7AjvNdg0,3534
|
|
@@ -58,7 +58,7 @@ perplexity/types/shared/usage_info.py,sha256=_jE7Nal9cMxtEpJjT4t2SAs6z3MufrjwPug
|
|
|
58
58
|
perplexity/types/shared_params/__init__.py,sha256=v5gr6-wq7IWgrQ8un401oApylzh3KnsIF_ilz-roX0s,241
|
|
59
59
|
perplexity/types/shared_params/api_public_search_result.py,sha256=JPT8jm4IALOc51HgTQGUiMbSgTt10oeh4zti4KjcnkU,469
|
|
60
60
|
perplexity/types/shared_params/chat_message_input.py,sha256=BsNwhjwOFydvUo2OfrF9AHx--a1uPidSxdDyBGrK-sc,6690
|
|
61
|
-
perplexityai-0.
|
|
62
|
-
perplexityai-0.
|
|
63
|
-
perplexityai-0.
|
|
64
|
-
perplexityai-0.
|
|
61
|
+
perplexityai-0.18.0.dist-info/METADATA,sha256=jGKtr5BrTXP6RmaJKq5R1_3V_KLT7KeNJgQtXPmvgvU,16676
|
|
62
|
+
perplexityai-0.18.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
63
|
+
perplexityai-0.18.0.dist-info/licenses/LICENSE,sha256=hkCriG3MT4vBhhc0roAOsrCE7IEDr1ywVEMonVHGmAQ,11340
|
|
64
|
+
perplexityai-0.18.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|