perplexityai 0.19.0__py3-none-any.whl → 0.19.1__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/_streaming.py CHANGED
@@ -76,9 +76,8 @@ class Stream(Generic[_T]):
76
76
  if sse.event is None:
77
77
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
78
78
 
79
- # Ensure the entire stream is consumed
80
- for _sse in iterator:
81
- ...
79
+ # As we might not fully consume the response stream, we need to close it explicitly
80
+ response.close()
82
81
 
83
82
  def __enter__(self) -> Self:
84
83
  return self
@@ -159,9 +158,8 @@ class AsyncStream(Generic[_T]):
159
158
  if sse.event is None:
160
159
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
161
160
 
162
- # Ensure the entire stream is consumed
163
- async for _sse in iterator:
164
- ...
161
+ # As we might not fully consume the response stream, we need to close it explicitly
162
+ await response.aclose()
165
163
 
166
164
  async def __aenter__(self) -> Self:
167
165
  return self
perplexity/_version.py CHANGED
@@ -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.19.0" # x-release-please-version
4
+ __version__ = "0.19.1" # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: perplexityai
3
- Version: 0.19.0
3
+ Version: 0.19.1
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
@@ -9,9 +9,9 @@ perplexity/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
9
9
  perplexity/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  perplexity/_resource.py,sha256=Pgc8KNBsIc1ltJn94uhDcDl0-3n5RLbe3iC2AiiNRnE,1124
11
11
  perplexity/_response.py,sha256=bpqzmVGq6jnivoMkUgt3OI0Rh6xHd6BMcp5PHgSFPb0,28842
12
- perplexity/_streaming.py,sha256=0IcQb2A1XAarVUZD3Wgll7S8D4ps1qVXSu5-HEI7-vw,11254
12
+ perplexity/_streaming.py,sha256=OW6UCIr_Infzx1stEw2jPDP0me11Fq5MwRxUo0qy-6A,11303
13
13
  perplexity/_types.py,sha256=BPuUCddonHjZ2AeEModCeb-zAYCRRT5XtxneIQhJxAk,7240
14
- perplexity/_version.py,sha256=d8X0qoDOWsRrDfk48HMW1Xvw6is9UptwKdZtaCftdck,163
14
+ perplexity/_version.py,sha256=HdT5N1qmno0UNN9gTGod__wm32kvt8VPcQKrEKVVQsY,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
@@ -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=2SMhAVszUh09DBH0wzhZDMFNWygYSlu5qO4VkgG0F4w,6437
61
- perplexityai-0.19.0.dist-info/METADATA,sha256=js71b2akEsD9hhblJyHLM67AWshuAW7PMsDAfaF7Bnc,16688
62
- perplexityai-0.19.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
- perplexityai-0.19.0.dist-info/licenses/LICENSE,sha256=hkCriG3MT4vBhhc0roAOsrCE7IEDr1ywVEMonVHGmAQ,11340
64
- perplexityai-0.19.0.dist-info/RECORD,,
61
+ perplexityai-0.19.1.dist-info/METADATA,sha256=PFei_mH04slUXujIQMB8gR1EbEox3LX9Niw8l2T5kfs,16688
62
+ perplexityai-0.19.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
+ perplexityai-0.19.1.dist-info/licenses/LICENSE,sha256=hkCriG3MT4vBhhc0roAOsrCE7IEDr1ywVEMonVHGmAQ,11340
64
+ perplexityai-0.19.1.dist-info/RECORD,,