@perplexity-ai/perplexity_ai 0.2.1 → 0.4.0

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +4 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +0 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/async/chat/chat.d.mts +2 -2
  12. package/resources/async/chat/chat.d.mts.map +1 -1
  13. package/resources/async/chat/chat.d.ts +2 -2
  14. package/resources/async/chat/chat.d.ts.map +1 -1
  15. package/resources/async/chat/completions.d.mts +160 -134
  16. package/resources/async/chat/completions.d.mts.map +1 -1
  17. package/resources/async/chat/completions.d.ts +160 -134
  18. package/resources/async/chat/completions.d.ts.map +1 -1
  19. package/resources/async/chat/completions.js +25 -7
  20. package/resources/async/chat/completions.js.map +1 -1
  21. package/resources/async/chat/completions.mjs +25 -7
  22. package/resources/async/chat/completions.mjs.map +1 -1
  23. package/resources/async/chat/index.d.mts +1 -1
  24. package/resources/async/chat/index.d.mts.map +1 -1
  25. package/resources/async/chat/index.d.ts +1 -1
  26. package/resources/async/chat/index.d.ts.map +1 -1
  27. package/resources/chat/completions.d.mts +115 -83
  28. package/resources/chat/completions.d.mts.map +1 -1
  29. package/resources/chat/completions.d.ts +115 -83
  30. package/resources/chat/completions.d.ts.map +1 -1
  31. package/resources/chat/completions.js +1 -2
  32. package/resources/chat/completions.js.map +1 -1
  33. package/resources/chat/completions.mjs +1 -2
  34. package/resources/chat/completions.mjs.map +1 -1
  35. package/resources/index.d.mts +0 -1
  36. package/resources/index.d.mts.map +1 -1
  37. package/resources/index.d.ts +0 -1
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +1 -3
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +0 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/search.d.mts +1 -70
  44. package/resources/search.d.mts.map +1 -1
  45. package/resources/search.d.ts +1 -70
  46. package/resources/search.d.ts.map +1 -1
  47. package/resources/search.js +1 -1
  48. package/resources/search.mjs +1 -1
  49. package/resources/shared.d.mts +310 -25
  50. package/resources/shared.d.mts.map +1 -1
  51. package/resources/shared.d.ts +310 -25
  52. package/resources/shared.d.ts.map +1 -1
  53. package/src/client.ts +4 -12
  54. package/src/resources/async/chat/chat.ts +2 -2
  55. package/src/resources/async/chat/completions.ts +263 -142
  56. package/src/resources/async/chat/index.ts +1 -1
  57. package/src/resources/chat/completions.ts +181 -85
  58. package/src/resources/index.ts +0 -1
  59. package/src/resources/search.ts +1 -70
  60. package/src/resources/shared.ts +434 -25
  61. package/src/version.ts +1 -1
  62. package/version.d.mts +1 -1
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/version.mjs +1 -1
  66. package/resources/content.d.mts +0 -55
  67. package/resources/content.d.mts.map +0 -1
  68. package/resources/content.d.ts +0 -55
  69. package/resources/content.d.ts.map +0 -1
  70. package/resources/content.js +0 -15
  71. package/resources/content.js.map +0 -1
  72. package/resources/content.mjs +0 -11
  73. package/resources/content.mjs.map +0 -1
  74. package/src/resources/content.ts +0 -70
@@ -1,70 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { RequestOptions } from '../internal/request-options';
6
-
7
- export class Content extends APIResource {
8
- /**
9
- * Retrieve the full content from specified URLs
10
- */
11
- create(body: ContentCreateParams, options?: RequestOptions): APIPromise<ContentCreateResponse> {
12
- return this._client.post('/content', { body, ...options });
13
- }
14
- }
15
-
16
- /**
17
- * Response containing the retrieved content from URLs
18
- */
19
- export interface ContentCreateResponse {
20
- /**
21
- * Unique identifier for this content retrieval request
22
- */
23
- id: string;
24
-
25
- /**
26
- * Array of content objects retrieved from the requested URLs
27
- */
28
- results: Array<ContentCreateResponse.Result>;
29
- }
30
-
31
- export namespace ContentCreateResponse {
32
- /**
33
- * Content retrieved from a specific URL
34
- */
35
- export interface Result {
36
- /**
37
- * The full text content of the web page or document
38
- */
39
- content: string;
40
-
41
- /**
42
- * The title of the web page or document
43
- */
44
- title: string;
45
-
46
- /**
47
- * The URL of the web page or document
48
- */
49
- url: string;
50
-
51
- /**
52
- * The publication date of the content (if available)
53
- */
54
- date?: string | null;
55
- }
56
- }
57
-
58
- export interface ContentCreateParams {
59
- /**
60
- * List of URLs to retrieve content from
61
- */
62
- urls: Array<string>;
63
- }
64
-
65
- export declare namespace Content {
66
- export {
67
- type ContentCreateResponse as ContentCreateResponse,
68
- type ContentCreateParams as ContentCreateParams,
69
- };
70
- }