perplexityai 0.8.0__py3-none-any.whl → 0.10.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 CHANGED
@@ -21,7 +21,7 @@ from ._types import (
21
21
  )
22
22
  from ._utils import is_given, get_async_library
23
23
  from ._version import __version__
24
- from .resources import search, content
24
+ from .resources import search
25
25
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
26
26
  from ._exceptions import APIStatusError, PerplexityError
27
27
  from ._base_client import (
@@ -48,7 +48,6 @@ class Perplexity(SyncAPIClient):
48
48
  chat: chat.ChatResource
49
49
  async_: async_.AsyncResource
50
50
  search: search.SearchResource
51
- content: content.ContentResource
52
51
  with_raw_response: PerplexityWithRawResponse
53
52
  with_streaming_response: PerplexityWithStreamedResponse
54
53
 
@@ -109,7 +108,6 @@ class Perplexity(SyncAPIClient):
109
108
  self.chat = chat.ChatResource(self)
110
109
  self.async_ = async_.AsyncResource(self)
111
110
  self.search = search.SearchResource(self)
112
- self.content = content.ContentResource(self)
113
111
  self.with_raw_response = PerplexityWithRawResponse(self)
114
112
  self.with_streaming_response = PerplexityWithStreamedResponse(self)
115
113
 
@@ -222,7 +220,6 @@ class AsyncPerplexity(AsyncAPIClient):
222
220
  chat: chat.AsyncChatResource
223
221
  async_: async_.AsyncAsyncResource
224
222
  search: search.AsyncSearchResource
225
- content: content.AsyncContentResource
226
223
  with_raw_response: AsyncPerplexityWithRawResponse
227
224
  with_streaming_response: AsyncPerplexityWithStreamedResponse
228
225
 
@@ -283,7 +280,6 @@ class AsyncPerplexity(AsyncAPIClient):
283
280
  self.chat = chat.AsyncChatResource(self)
284
281
  self.async_ = async_.AsyncAsyncResource(self)
285
282
  self.search = search.AsyncSearchResource(self)
286
- self.content = content.AsyncContentResource(self)
287
283
  self.with_raw_response = AsyncPerplexityWithRawResponse(self)
288
284
  self.with_streaming_response = AsyncPerplexityWithStreamedResponse(self)
289
285
 
@@ -397,7 +393,6 @@ class PerplexityWithRawResponse:
397
393
  self.chat = chat.ChatResourceWithRawResponse(client.chat)
398
394
  self.async_ = async_.AsyncResourceWithRawResponse(client.async_)
399
395
  self.search = search.SearchResourceWithRawResponse(client.search)
400
- self.content = content.ContentResourceWithRawResponse(client.content)
401
396
 
402
397
 
403
398
  class AsyncPerplexityWithRawResponse:
@@ -405,7 +400,6 @@ class AsyncPerplexityWithRawResponse:
405
400
  self.chat = chat.AsyncChatResourceWithRawResponse(client.chat)
406
401
  self.async_ = async_.AsyncAsyncResourceWithRawResponse(client.async_)
407
402
  self.search = search.AsyncSearchResourceWithRawResponse(client.search)
408
- self.content = content.AsyncContentResourceWithRawResponse(client.content)
409
403
 
410
404
 
411
405
  class PerplexityWithStreamedResponse:
@@ -413,7 +407,6 @@ class PerplexityWithStreamedResponse:
413
407
  self.chat = chat.ChatResourceWithStreamingResponse(client.chat)
414
408
  self.async_ = async_.AsyncResourceWithStreamingResponse(client.async_)
415
409
  self.search = search.SearchResourceWithStreamingResponse(client.search)
416
- self.content = content.ContentResourceWithStreamingResponse(client.content)
417
410
 
418
411
 
419
412
  class AsyncPerplexityWithStreamedResponse:
@@ -421,7 +414,6 @@ class AsyncPerplexityWithStreamedResponse:
421
414
  self.chat = chat.AsyncChatResourceWithStreamingResponse(client.chat)
422
415
  self.async_ = async_.AsyncAsyncResourceWithStreamingResponse(client.async_)
423
416
  self.search = search.AsyncSearchResourceWithStreamingResponse(client.search)
424
- self.content = content.AsyncContentResourceWithStreamingResponse(client.content)
425
417
 
426
418
 
427
419
  Client = Perplexity
perplexity/_models.py CHANGED
@@ -256,7 +256,7 @@ class BaseModel(pydantic.BaseModel):
256
256
  mode: Literal["json", "python"] | str = "python",
257
257
  include: IncEx | None = None,
258
258
  exclude: IncEx | None = None,
259
- by_alias: bool = False,
259
+ by_alias: bool | None = None,
260
260
  exclude_unset: bool = False,
261
261
  exclude_defaults: bool = False,
262
262
  exclude_none: bool = False,
@@ -264,6 +264,7 @@ class BaseModel(pydantic.BaseModel):
264
264
  warnings: bool | Literal["none", "warn", "error"] = True,
265
265
  context: dict[str, Any] | None = None,
266
266
  serialize_as_any: bool = False,
267
+ fallback: Callable[[Any], Any] | None = None,
267
268
  ) -> dict[str, Any]:
268
269
  """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
269
270
 
@@ -295,10 +296,12 @@ class BaseModel(pydantic.BaseModel):
295
296
  raise ValueError("context is only supported in Pydantic v2")
296
297
  if serialize_as_any != False:
297
298
  raise ValueError("serialize_as_any is only supported in Pydantic v2")
299
+ if fallback is not None:
300
+ raise ValueError("fallback is only supported in Pydantic v2")
298
301
  dumped = super().dict( # pyright: ignore[reportDeprecated]
299
302
  include=include,
300
303
  exclude=exclude,
301
- by_alias=by_alias,
304
+ by_alias=by_alias if by_alias is not None else False,
302
305
  exclude_unset=exclude_unset,
303
306
  exclude_defaults=exclude_defaults,
304
307
  exclude_none=exclude_none,
@@ -313,13 +316,14 @@ class BaseModel(pydantic.BaseModel):
313
316
  indent: int | None = None,
314
317
  include: IncEx | None = None,
315
318
  exclude: IncEx | None = None,
316
- by_alias: bool = False,
319
+ by_alias: bool | None = None,
317
320
  exclude_unset: bool = False,
318
321
  exclude_defaults: bool = False,
319
322
  exclude_none: bool = False,
320
323
  round_trip: bool = False,
321
324
  warnings: bool | Literal["none", "warn", "error"] = True,
322
325
  context: dict[str, Any] | None = None,
326
+ fallback: Callable[[Any], Any] | None = None,
323
327
  serialize_as_any: bool = False,
324
328
  ) -> str:
325
329
  """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
@@ -348,11 +352,13 @@ class BaseModel(pydantic.BaseModel):
348
352
  raise ValueError("context is only supported in Pydantic v2")
349
353
  if serialize_as_any != False:
350
354
  raise ValueError("serialize_as_any is only supported in Pydantic v2")
355
+ if fallback is not None:
356
+ raise ValueError("fallback is only supported in Pydantic v2")
351
357
  return super().json( # type: ignore[reportDeprecated]
352
358
  indent=indent,
353
359
  include=include,
354
360
  exclude=exclude,
355
- by_alias=by_alias,
361
+ by_alias=by_alias if by_alias is not None else False,
356
362
  exclude_unset=exclude_unset,
357
363
  exclude_defaults=exclude_defaults,
358
364
  exclude_none=exclude_none,
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.8.0" # x-release-please-version
4
+ __version__ = "0.10.0" # x-release-please-version
@@ -24,14 +24,6 @@ from .search import (
24
24
  SearchResourceWithStreamingResponse,
25
25
  AsyncSearchResourceWithStreamingResponse,
26
26
  )
27
- from .content import (
28
- ContentResource,
29
- AsyncContentResource,
30
- ContentResourceWithRawResponse,
31
- AsyncContentResourceWithRawResponse,
32
- ContentResourceWithStreamingResponse,
33
- AsyncContentResourceWithStreamingResponse,
34
- )
35
27
 
36
28
  __all__ = [
37
29
  "ChatResource",
@@ -52,10 +44,4 @@ __all__ = [
52
44
  "AsyncSearchResourceWithRawResponse",
53
45
  "SearchResourceWithStreamingResponse",
54
46
  "AsyncSearchResourceWithStreamingResponse",
55
- "ContentResource",
56
- "AsyncContentResource",
57
- "ContentResourceWithRawResponse",
58
- "AsyncContentResourceWithRawResponse",
59
- "ContentResourceWithStreamingResponse",
60
- "AsyncContentResourceWithStreamingResponse",
61
47
  ]
@@ -83,7 +83,6 @@ class CompletionsResource(SyncAPIResource):
83
83
  response_metadata: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN,
84
84
  return_images: Optional[bool] | NotGiven = NOT_GIVEN,
85
85
  return_related_questions: Optional[bool] | NotGiven = NOT_GIVEN,
86
- return_videos: Optional[bool] | NotGiven = NOT_GIVEN,
87
86
  safe_search: Optional[bool] | NotGiven = NOT_GIVEN,
88
87
  search_after_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
89
88
  search_before_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
@@ -161,7 +160,6 @@ class CompletionsResource(SyncAPIResource):
161
160
  "response_metadata": response_metadata,
162
161
  "return_images": return_images,
163
162
  "return_related_questions": return_related_questions,
164
- "return_videos": return_videos,
165
163
  "safe_search": safe_search,
166
164
  "search_after_date_filter": search_after_date_filter,
167
165
  "search_before_date_filter": search_before_date_filter,
@@ -249,7 +247,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
249
247
  response_metadata: Optional[Dict[str, object]] | NotGiven = NOT_GIVEN,
250
248
  return_images: Optional[bool] | NotGiven = NOT_GIVEN,
251
249
  return_related_questions: Optional[bool] | NotGiven = NOT_GIVEN,
252
- return_videos: Optional[bool] | NotGiven = NOT_GIVEN,
253
250
  safe_search: Optional[bool] | NotGiven = NOT_GIVEN,
254
251
  search_after_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
255
252
  search_before_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
@@ -327,7 +324,6 @@ class AsyncCompletionsResource(AsyncAPIResource):
327
324
  "response_metadata": response_metadata,
328
325
  "return_images": return_images,
329
326
  "return_related_questions": return_related_questions,
330
- "return_videos": return_videos,
331
327
  "safe_search": safe_search,
332
328
  "search_after_date_filter": search_after_date_filter,
333
329
  "search_before_date_filter": search_before_date_filter,
@@ -48,18 +48,10 @@ class SearchResource(SyncAPIResource):
48
48
  self,
49
49
  *,
50
50
  query: Union[str, SequenceNotStr[str]],
51
- country: Optional[str] | NotGiven = NOT_GIVEN,
52
- last_updated_after_filter: Optional[str] | NotGiven = NOT_GIVEN,
53
- last_updated_before_filter: Optional[str] | NotGiven = NOT_GIVEN,
54
51
  max_results: int | NotGiven = NOT_GIVEN,
55
52
  max_tokens: int | NotGiven = NOT_GIVEN,
56
53
  max_tokens_per_page: int | NotGiven = NOT_GIVEN,
57
- safe_search: Optional[bool] | NotGiven = NOT_GIVEN,
58
- search_after_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
59
- search_before_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
60
- search_domain_filter: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
61
54
  search_mode: Optional[Literal["web", "academic", "sec"]] | NotGiven = NOT_GIVEN,
62
- search_recency_filter: Optional[Literal["hour", "day", "week", "month", "year"]] | NotGiven = NOT_GIVEN,
63
55
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
64
56
  # The extra values given here take precedence over values defined on the client or passed to this method.
65
57
  extra_headers: Headers | None = None,
@@ -84,18 +76,10 @@ class SearchResource(SyncAPIResource):
84
76
  body=maybe_transform(
85
77
  {
86
78
  "query": query,
87
- "country": country,
88
- "last_updated_after_filter": last_updated_after_filter,
89
- "last_updated_before_filter": last_updated_before_filter,
90
79
  "max_results": max_results,
91
80
  "max_tokens": max_tokens,
92
81
  "max_tokens_per_page": max_tokens_per_page,
93
- "safe_search": safe_search,
94
- "search_after_date_filter": search_after_date_filter,
95
- "search_before_date_filter": search_before_date_filter,
96
- "search_domain_filter": search_domain_filter,
97
82
  "search_mode": search_mode,
98
- "search_recency_filter": search_recency_filter,
99
83
  },
100
84
  search_create_params.SearchCreateParams,
101
85
  ),
@@ -130,18 +114,10 @@ class AsyncSearchResource(AsyncAPIResource):
130
114
  self,
131
115
  *,
132
116
  query: Union[str, SequenceNotStr[str]],
133
- country: Optional[str] | NotGiven = NOT_GIVEN,
134
- last_updated_after_filter: Optional[str] | NotGiven = NOT_GIVEN,
135
- last_updated_before_filter: Optional[str] | NotGiven = NOT_GIVEN,
136
117
  max_results: int | NotGiven = NOT_GIVEN,
137
118
  max_tokens: int | NotGiven = NOT_GIVEN,
138
119
  max_tokens_per_page: int | NotGiven = NOT_GIVEN,
139
- safe_search: Optional[bool] | NotGiven = NOT_GIVEN,
140
- search_after_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
141
- search_before_date_filter: Optional[str] | NotGiven = NOT_GIVEN,
142
- search_domain_filter: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
143
120
  search_mode: Optional[Literal["web", "academic", "sec"]] | NotGiven = NOT_GIVEN,
144
- search_recency_filter: Optional[Literal["hour", "day", "week", "month", "year"]] | NotGiven = NOT_GIVEN,
145
121
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
146
122
  # The extra values given here take precedence over values defined on the client or passed to this method.
147
123
  extra_headers: Headers | None = None,
@@ -166,18 +142,10 @@ class AsyncSearchResource(AsyncAPIResource):
166
142
  body=await async_maybe_transform(
167
143
  {
168
144
  "query": query,
169
- "country": country,
170
- "last_updated_after_filter": last_updated_after_filter,
171
- "last_updated_before_filter": last_updated_before_filter,
172
145
  "max_results": max_results,
173
146
  "max_tokens": max_tokens,
174
147
  "max_tokens_per_page": max_tokens_per_page,
175
- "safe_search": safe_search,
176
- "search_after_date_filter": search_after_date_filter,
177
- "search_before_date_filter": search_before_date_filter,
178
- "search_domain_filter": search_domain_filter,
179
148
  "search_mode": search_mode,
180
- "search_recency_filter": search_recency_filter,
181
149
  },
182
150
  search_create_params.SearchCreateParams,
183
151
  ),
@@ -10,6 +10,4 @@ from .shared import (
10
10
  APIPublicSearchResult as APIPublicSearchResult,
11
11
  )
12
12
  from .search_create_params import SearchCreateParams as SearchCreateParams
13
- from .content_create_params import ContentCreateParams as ContentCreateParams
14
13
  from .search_create_response import SearchCreateResponse as SearchCreateResponse
15
- from .content_create_response import ContentCreateResponse as ContentCreateResponse
@@ -200,8 +200,6 @@ class Request(TypedDict, total=False):
200
200
 
201
201
  return_related_questions: Optional[bool]
202
202
 
203
- return_videos: Optional[bool]
204
-
205
203
  safe_search: Optional[bool]
206
204
 
207
205
  search_after_date_filter: Optional[str]
@@ -96,8 +96,6 @@ class CompletionCreateParams(TypedDict, total=False):
96
96
 
97
97
  return_related_questions: Optional[bool]
98
98
 
99
- return_videos: Optional[bool]
100
-
101
99
  safe_search: Optional[bool]
102
100
 
103
101
  search_after_date_filter: Optional[str]
@@ -13,26 +13,10 @@ __all__ = ["SearchCreateParams"]
13
13
  class SearchCreateParams(TypedDict, total=False):
14
14
  query: Required[Union[str, SequenceNotStr[str]]]
15
15
 
16
- country: Optional[str]
17
-
18
- last_updated_after_filter: Optional[str]
19
-
20
- last_updated_before_filter: Optional[str]
21
-
22
16
  max_results: int
23
17
 
24
18
  max_tokens: int
25
19
 
26
20
  max_tokens_per_page: int
27
21
 
28
- safe_search: Optional[bool]
29
-
30
- search_after_date_filter: Optional[str]
31
-
32
- search_before_date_filter: Optional[str]
33
-
34
- search_domain_filter: Optional[SequenceNotStr[str]]
35
-
36
22
  search_mode: Optional[Literal["web", "academic", "sec"]]
37
-
38
- search_recency_filter: Optional[Literal["hour", "day", "week", "month", "year"]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: perplexityai
3
- Version: 0.8.0
3
+ Version: 0.10.0
4
4
  Summary: The official Python library for the perplexity API
5
5
  Project-URL: Homepage, https://github.com/ppl-ai/perplexity-py
6
6
  Project-URL: Repository, https://github.com/ppl-ai/perplexity-py
@@ -1,17 +1,17 @@
1
1
  perplexity/__init__.py,sha256=5epbvK3UiJEgvsBW9Ds6RFB6zObkUxYkA9fIQlgUaXA,2655
2
2
  perplexity/_base_client.py,sha256=DSeMteXutziRGJA9HqJaoLpG7ktzpU2GPcaIgQT1oZQ,67051
3
- perplexity/_client.py,sha256=Uy5nrz9S9FTCy3-s1EGLOr-b8LJ2M2GTuQAB1GclZHE,16611
3
+ perplexity/_client.py,sha256=ugPHT0ZV5WX9iHSej604Nj3WEIQkm2z2rUiARPbX_UU,16078
4
4
  perplexity/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
5
  perplexity/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  perplexity/_exceptions.py,sha256=v-hOXWSDTEtXcn_By7pPml3HjEmG5HXpbE-RK_A6_0Q,3228
7
7
  perplexity/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
- perplexity/_models.py,sha256=c29x_mRccdxlGwdUPfSR5eJxGXe74Ea5Dje5igZTrKQ,30024
8
+ perplexity/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
9
9
  perplexity/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  perplexity/_resource.py,sha256=Pgc8KNBsIc1ltJn94uhDcDl0-3n5RLbe3iC2AiiNRnE,1124
11
11
  perplexity/_response.py,sha256=bpqzmVGq6jnivoMkUgt3OI0Rh6xHd6BMcp5PHgSFPb0,28842
12
12
  perplexity/_streaming.py,sha256=SQ61v42gFmNiO57uMFUZMAuDlGE0n_EulkZcPgJXt4U,10116
13
13
  perplexity/_types.py,sha256=XZYv2_G7oQGhQkjI28-TFIMP_yZZV590TRuKAoLJ3wM,7300
14
- perplexity/_version.py,sha256=WFUYKYNg6jhaTctBBVU130bgSjL7INKzfZ7wwQgnBnA,162
14
+ perplexity/_version.py,sha256=wMd_e_2KT2gFMBL3gf_yIjVRS3s3vm2EgP5KIx529P4,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,9 +26,8 @@ perplexity/_utils/_transform.py,sha256=i_U4R82RtQJtKKCriwFqmfcWjtwmmsiiF1AEXKQ_O
26
26
  perplexity/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
27
27
  perplexity/_utils/_utils.py,sha256=D2QE7mVPNEJzaB50u8rvDQAUDS5jx7JoeFD7zdj-TeI,12231
28
28
  perplexity/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
29
- perplexity/resources/__init__.py,sha256=gQcgmiNY3uzaN5eAh9eclKJZRSaklhYcCF4ZTnFqemc,1877
30
- perplexity/resources/content.py,sha256=4BbRmRPY3qeYtP-b8toraEbRnBMAPYRZkyuri17SH-0,5905
31
- perplexity/resources/search.py,sha256=3EqjYtS5EK457YAO0QXY5QutoqscbSqKKxkwM65sRqU,9270
29
+ perplexity/resources/__init__.py,sha256=Tb4UViVZDl2k8DgP1lKfn08Qaqz1uiezsogWRW9YTfQ,1414
30
+ perplexity/resources/search.py,sha256=YQzdtA6ZsD9DPI4PXVkxSh1HlampxiI-epd9O7dNrGo,7010
32
31
  perplexity/resources/async_/__init__.py,sha256=hvcoEKx4nCYPDoBSO_sk-uNVQ7y-fmNhzvAlvX19TIo,964
33
32
  perplexity/resources/async_/async_.py,sha256=p1-C_8m2cdS0NR3oa7FfdM8gxHH13LQWX6c9lh1gnFo,3510
34
33
  perplexity/resources/async_/chat/__init__.py,sha256=BVAfz9TM3DT5W9f_mt0P9YRxL_MsUxKCWAH6u1iogmA,1041
@@ -36,21 +35,19 @@ perplexity/resources/async_/chat/chat.py,sha256=wOHHfLclvjAVv-btASi6EcdY5gJZQdwA
36
35
  perplexity/resources/async_/chat/completions.py,sha256=VGYNp5B-WSLgGRHlNJ1V4qkH-6s_pTZbw0ENGtFK9W0,14097
37
36
  perplexity/resources/chat/__init__.py,sha256=BVAfz9TM3DT5W9f_mt0P9YRxL_MsUxKCWAH6u1iogmA,1041
38
37
  perplexity/resources/chat/chat.py,sha256=P143HQo1m9MknnYtSq4JzmDofDtGHlXHzTaLEyr1a7k,3656
39
- perplexity/resources/chat/completions.py,sha256=lO0l-PulNqlWu0dLl3V4zow63BWwHO0HGwDgAAvnry8,19903
40
- perplexity/types/__init__.py,sha256=PozMGI21_KXErLZnjOMd8UA6xHPk1vmCjYmPoyi-IK0,653
41
- perplexity/types/content_create_params.py,sha256=NHj29NXYWhvY9CpcE2RuqHQ-H2_dP7yRRa3fFUbB2AM,338
42
- perplexity/types/content_create_response.py,sha256=Wr2TbU5lbEb5tHhw68erei5AGtX6hfQHmc-y8DcatLc,388
43
- perplexity/types/search_create_params.py,sha256=RHKT4toTErSF4T5g0DYD9DTDFDOvjKF0BIa0t5Pv7bk,916
38
+ perplexity/resources/chat/completions.py,sha256=tHOAzaktVNOaQBZCMgdz3sgdyguy2l7UOGENLj3k7iQ,19675
39
+ perplexity/types/__init__.py,sha256=ZONTqk9Xtih2BkldS3hQyCK5fO6dsUpMct8WUDCvBq0,491
40
+ perplexity/types/search_create_params.py,sha256=TENCoRI6XQhag-593m5qIsT_vHZYhuX4LLtCZnFgjE0,528
44
41
  perplexity/types/search_create_response.py,sha256=lOteaJs4qpULkx5GLtEs6HhetqIBhM0I1AC1moWTeI8,426
45
42
  perplexity/types/async_/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
46
43
  perplexity/types/async_/chat/__init__.py,sha256=xo2Cya_CfjEBRos2yvW_Wrq39PZiXFBT7ukZZBNvIUM,552
47
- perplexity/types/async_/chat/completion_create_params.py,sha256=Mluv9hgXXl1Glurp8_KoexWDh42gFnK0kV2zZyHIXBk,5576
44
+ perplexity/types/async_/chat/completion_create_params.py,sha256=qV8XTu_H9NDJmNEL5uiHxTgAaJD5_B6Pwyk1qe5QPss,5541
48
45
  perplexity/types/async_/chat/completion_create_response.py,sha256=qI4fKrUGSd52BHoqTK9LnoGTvlnpaDbn3xCwUOG_sA8,1200
49
46
  perplexity/types/async_/chat/completion_get_params.py,sha256=3nh10bMw1nYn3oriD5CIBPyL7hN25Xz4vbVfxEf33Zw,670
50
47
  perplexity/types/async_/chat/completion_get_response.py,sha256=pKnUzzBSPaToucLTz-AS-dASl8Azscck48yE_G_qPic,1194
51
48
  perplexity/types/async_/chat/completion_list_response.py,sha256=63QSRV-2YA6gMZhyrmiZuzxasjjwT-kM3MyFuadTnZs,658
52
49
  perplexity/types/chat/__init__.py,sha256=A5VCUPqJZydjjOqEXC01GXmcDkKM3bq6zuCu9lmi5Es,303
53
- perplexity/types/chat/completion_create_params.py,sha256=dXQwAuAuOd1ZRf_jS7Qzev9IpaM19U3mMeu1882LnX8,5190
50
+ perplexity/types/chat/completion_create_params.py,sha256=AqLRxfIoXMhgzQoYYH5cMCvHo2EBgeMpVmig_FYsupc,5155
54
51
  perplexity/types/chat/completion_create_response.py,sha256=u4zFkOce7ER_H0j76a67B6RZlErUUI3xBed81iYklF0,795
55
52
  perplexity/types/shared/__init__.py,sha256=-RlflcttJZ_q_lP6YD0mVWbKhU33j91tUVuMO5OqMAM,397
56
53
  perplexity/types/shared/api_public_search_result.py,sha256=0Wu4nwHvyQqV6jLvCVdEMWndCZ9DG7lgL3Y174rISX0,364
@@ -61,7 +58,7 @@ perplexity/types/shared/usage_info.py,sha256=_jE7Nal9cMxtEpJjT4t2SAs6z3MufrjwPug
61
58
  perplexity/types/shared_params/__init__.py,sha256=v5gr6-wq7IWgrQ8un401oApylzh3KnsIF_ilz-roX0s,241
62
59
  perplexity/types/shared_params/api_public_search_result.py,sha256=n4VUQnGOFGGWUdwYd8P5o-vEqZKhRuI5R0dBs_ZsHtE,418
63
60
  perplexity/types/shared_params/chat_message_input.py,sha256=BsNwhjwOFydvUo2OfrF9AHx--a1uPidSxdDyBGrK-sc,6690
64
- perplexityai-0.8.0.dist-info/METADATA,sha256=UcF5JgpAJeCjXBxpF8cSxzL_JZZ7y7zLN0Gm3pktWQg,15980
65
- perplexityai-0.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
66
- perplexityai-0.8.0.dist-info/licenses/LICENSE,sha256=hkCriG3MT4vBhhc0roAOsrCE7IEDr1ywVEMonVHGmAQ,11340
67
- perplexityai-0.8.0.dist-info/RECORD,,
61
+ perplexityai-0.10.0.dist-info/METADATA,sha256=0YEPDZyoJVPUqJ1FRpzED5J6Is7lAIDQY3eckvSUx38,15981
62
+ perplexityai-0.10.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
+ perplexityai-0.10.0.dist-info/licenses/LICENSE,sha256=hkCriG3MT4vBhhc0roAOsrCE7IEDr1ywVEMonVHGmAQ,11340
64
+ perplexityai-0.10.0.dist-info/RECORD,,
@@ -1,163 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- import httpx
6
-
7
- from ..types import content_create_params
8
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
9
- from .._utils import maybe_transform, async_maybe_transform
10
- from .._compat import cached_property
11
- from .._resource import SyncAPIResource, AsyncAPIResource
12
- from .._response import (
13
- to_raw_response_wrapper,
14
- to_streamed_response_wrapper,
15
- async_to_raw_response_wrapper,
16
- async_to_streamed_response_wrapper,
17
- )
18
- from .._base_client import make_request_options
19
- from ..types.content_create_response import ContentCreateResponse
20
-
21
- __all__ = ["ContentResource", "AsyncContentResource"]
22
-
23
-
24
- class ContentResource(SyncAPIResource):
25
- @cached_property
26
- def with_raw_response(self) -> ContentResourceWithRawResponse:
27
- """
28
- This property can be used as a prefix for any HTTP method call to return
29
- the raw response object instead of the parsed content.
30
-
31
- For more information, see https://www.github.com/ppl-ai/perplexity-py#accessing-raw-response-data-eg-headers
32
- """
33
- return ContentResourceWithRawResponse(self)
34
-
35
- @cached_property
36
- def with_streaming_response(self) -> ContentResourceWithStreamingResponse:
37
- """
38
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39
-
40
- For more information, see https://www.github.com/ppl-ai/perplexity-py#with_streaming_response
41
- """
42
- return ContentResourceWithStreamingResponse(self)
43
-
44
- def create(
45
- self,
46
- *,
47
- urls: SequenceNotStr[str],
48
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
49
- # The extra values given here take precedence over values defined on the client or passed to this method.
50
- extra_headers: Headers | None = None,
51
- extra_query: Query | None = None,
52
- extra_body: Body | None = None,
53
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
54
- ) -> ContentCreateResponse:
55
- """
56
- Get Urls Content
57
-
58
- Args:
59
- extra_headers: Send extra headers
60
-
61
- extra_query: Add additional query parameters to the request
62
-
63
- extra_body: Add additional JSON properties to the request
64
-
65
- timeout: Override the client-level default timeout for this request, in seconds
66
- """
67
- return self._post(
68
- "/content",
69
- body=maybe_transform({"urls": urls}, content_create_params.ContentCreateParams),
70
- options=make_request_options(
71
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
72
- ),
73
- cast_to=ContentCreateResponse,
74
- )
75
-
76
-
77
- class AsyncContentResource(AsyncAPIResource):
78
- @cached_property
79
- def with_raw_response(self) -> AsyncContentResourceWithRawResponse:
80
- """
81
- This property can be used as a prefix for any HTTP method call to return
82
- the raw response object instead of the parsed content.
83
-
84
- For more information, see https://www.github.com/ppl-ai/perplexity-py#accessing-raw-response-data-eg-headers
85
- """
86
- return AsyncContentResourceWithRawResponse(self)
87
-
88
- @cached_property
89
- def with_streaming_response(self) -> AsyncContentResourceWithStreamingResponse:
90
- """
91
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
92
-
93
- For more information, see https://www.github.com/ppl-ai/perplexity-py#with_streaming_response
94
- """
95
- return AsyncContentResourceWithStreamingResponse(self)
96
-
97
- async def create(
98
- self,
99
- *,
100
- urls: SequenceNotStr[str],
101
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
102
- # The extra values given here take precedence over values defined on the client or passed to this method.
103
- extra_headers: Headers | None = None,
104
- extra_query: Query | None = None,
105
- extra_body: Body | None = None,
106
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
107
- ) -> ContentCreateResponse:
108
- """
109
- Get Urls Content
110
-
111
- Args:
112
- extra_headers: Send extra headers
113
-
114
- extra_query: Add additional query parameters to the request
115
-
116
- extra_body: Add additional JSON properties to the request
117
-
118
- timeout: Override the client-level default timeout for this request, in seconds
119
- """
120
- return await self._post(
121
- "/content",
122
- body=await async_maybe_transform({"urls": urls}, content_create_params.ContentCreateParams),
123
- options=make_request_options(
124
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
125
- ),
126
- cast_to=ContentCreateResponse,
127
- )
128
-
129
-
130
- class ContentResourceWithRawResponse:
131
- def __init__(self, content: ContentResource) -> None:
132
- self._content = content
133
-
134
- self.create = to_raw_response_wrapper(
135
- content.create,
136
- )
137
-
138
-
139
- class AsyncContentResourceWithRawResponse:
140
- def __init__(self, content: AsyncContentResource) -> None:
141
- self._content = content
142
-
143
- self.create = async_to_raw_response_wrapper(
144
- content.create,
145
- )
146
-
147
-
148
- class ContentResourceWithStreamingResponse:
149
- def __init__(self, content: ContentResource) -> None:
150
- self._content = content
151
-
152
- self.create = to_streamed_response_wrapper(
153
- content.create,
154
- )
155
-
156
-
157
- class AsyncContentResourceWithStreamingResponse:
158
- def __init__(self, content: AsyncContentResource) -> None:
159
- self._content = content
160
-
161
- self.create = async_to_streamed_response_wrapper(
162
- content.create,
163
- )
@@ -1,13 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing_extensions import Required, TypedDict
6
-
7
- from .._types import SequenceNotStr
8
-
9
- __all__ = ["ContentCreateParams"]
10
-
11
-
12
- class ContentCreateParams(TypedDict, total=False):
13
- urls: Required[SequenceNotStr[str]]
@@ -1,23 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
-
5
- from .._models import BaseModel
6
-
7
- __all__ = ["ContentCreateResponse", "Result"]
8
-
9
-
10
- class Result(BaseModel):
11
- content: str
12
-
13
- title: str
14
-
15
- url: str
16
-
17
- date: Optional[str] = None
18
-
19
-
20
- class ContentCreateResponse(BaseModel):
21
- id: str
22
-
23
- results: List[Result]