perplexityai 0.7.1__py3-none-any.whl → 0.8.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.

Files changed (34) hide show
  1. perplexity/_version.py +1 -1
  2. perplexity/resources/async_/chat/completions.py +90 -76
  3. perplexity/resources/chat/completions.py +178 -80
  4. perplexity/resources/content.py +2 -6
  5. perplexity/resources/search.py +2 -60
  6. perplexity/types/__init__.py +4 -3
  7. perplexity/types/async_/chat/__init__.py +1 -1
  8. perplexity/types/async_/chat/completion_create_params.py +187 -40
  9. perplexity/types/async_/chat/completion_create_response.py +13 -13
  10. perplexity/types/async_/chat/completion_get_params.py +23 -0
  11. perplexity/types/async_/chat/completion_get_response.py +13 -13
  12. perplexity/types/async_/chat/completion_list_response.py +1 -1
  13. perplexity/types/chat/completion_create_params.py +182 -40
  14. perplexity/types/chat/completion_create_response.py +13 -10
  15. perplexity/types/content_create_params.py +0 -1
  16. perplexity/types/content_create_response.py +0 -6
  17. perplexity/types/search_create_params.py +0 -24
  18. perplexity/types/search_create_response.py +0 -7
  19. perplexity/types/shared/__init__.py +4 -3
  20. perplexity/types/shared/{search_result.py → api_public_search_result.py} +6 -2
  21. perplexity/types/shared/chat_message_input.py +212 -0
  22. perplexity/types/shared/chat_message_output.py +212 -0
  23. perplexity/types/shared/{chat_choice.py → choice.py} +6 -4
  24. perplexity/types/shared/usage_info.py +19 -1
  25. perplexity/types/shared_params/__init__.py +2 -1
  26. perplexity/types/shared_params/api_public_search_result.py +20 -0
  27. perplexity/types/shared_params/chat_message_input.py +216 -0
  28. {perplexityai-0.7.1.dist-info → perplexityai-0.8.0.dist-info}/METADATA +44 -5
  29. {perplexityai-0.7.1.dist-info → perplexityai-0.8.0.dist-info}/RECORD +31 -29
  30. perplexity/types/async_/chat/completion_list_params.py +0 -15
  31. perplexity/types/shared/chat_message.py +0 -31
  32. perplexity/types/shared_params/chat_message.py +0 -31
  33. {perplexityai-0.7.1.dist-info → perplexityai-0.8.0.dist-info}/WHEEL +0 -0
  34. {perplexityai-0.7.1.dist-info → perplexityai-0.8.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,31 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Union, Optional
4
- from typing_extensions import Literal
5
-
6
- from ..._models import BaseModel
7
-
8
- __all__ = ["ChatMessage", "ContentMultipartContent", "ContentMultipartContentImageURL"]
9
-
10
-
11
- class ContentMultipartContentImageURL(BaseModel):
12
- url: str
13
- """URL of the image (base64 or HTTPS)"""
14
-
15
-
16
- class ContentMultipartContent(BaseModel):
17
- type: Literal["text", "image_url"]
18
- """The type of content"""
19
-
20
- image_url: Optional[ContentMultipartContentImageURL] = None
21
-
22
- text: Optional[str] = None
23
- """Text content"""
24
-
25
-
26
- class ChatMessage(BaseModel):
27
- content: Union[str, List[ContentMultipartContent]]
28
- """The content of the message"""
29
-
30
- role: Literal["system", "user", "assistant"]
31
- """The role of the message author"""
@@ -1,31 +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 import Union, Iterable, Optional
6
- from typing_extensions import Literal, Required, TypedDict
7
-
8
- __all__ = ["ChatMessage", "ContentMultipartContent", "ContentMultipartContentImageURL"]
9
-
10
-
11
- class ContentMultipartContentImageURL(TypedDict, total=False):
12
- url: Required[str]
13
- """URL of the image (base64 or HTTPS)"""
14
-
15
-
16
- class ContentMultipartContent(TypedDict, total=False):
17
- type: Required[Literal["text", "image_url"]]
18
- """The type of content"""
19
-
20
- image_url: Optional[ContentMultipartContentImageURL]
21
-
22
- text: Optional[str]
23
- """Text content"""
24
-
25
-
26
- class ChatMessage(TypedDict, total=False):
27
- content: Required[Union[str, Iterable[ContentMultipartContent]]]
28
- """The content of the message"""
29
-
30
- role: Required[Literal["system", "user", "assistant"]]
31
- """The role of the message author"""