@perplexity-ai/perplexity_ai 0.2.0 → 0.3.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.
- package/CHANGELOG.md +12 -0
- package/README.md +171 -14
- package/client.d.mts +4 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -3
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/async/chat/chat.d.mts +2 -2
- package/resources/async/chat/chat.d.mts.map +1 -1
- package/resources/async/chat/chat.d.ts +2 -2
- package/resources/async/chat/chat.d.ts.map +1 -1
- package/resources/async/chat/completions.d.mts +161 -134
- package/resources/async/chat/completions.d.mts.map +1 -1
- package/resources/async/chat/completions.d.ts +161 -134
- package/resources/async/chat/completions.d.ts.map +1 -1
- package/resources/async/chat/completions.js +25 -7
- package/resources/async/chat/completions.js.map +1 -1
- package/resources/async/chat/completions.mjs +25 -7
- package/resources/async/chat/completions.mjs.map +1 -1
- package/resources/async/chat/index.d.mts +1 -1
- package/resources/async/chat/index.d.mts.map +1 -1
- package/resources/async/chat/index.d.ts +1 -1
- package/resources/async/chat/index.d.ts.map +1 -1
- package/resources/chat/completions.d.mts +116 -83
- package/resources/chat/completions.d.mts.map +1 -1
- package/resources/chat/completions.d.ts +116 -83
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +1 -2
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +1 -2
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/content.d.mts +1 -28
- package/resources/content.d.mts.map +1 -1
- package/resources/content.d.ts +1 -28
- package/resources/content.d.ts.map +1 -1
- package/resources/content.js +1 -1
- package/resources/content.mjs +1 -1
- package/resources/search.d.mts +1 -70
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +1 -70
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +1 -1
- package/resources/search.mjs +1 -1
- package/resources/shared.d.mts +310 -25
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +310 -25
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +4 -3
- package/src/resources/async/chat/chat.ts +2 -2
- package/src/resources/async/chat/completions.ts +265 -142
- package/src/resources/async/chat/index.ts +1 -1
- package/src/resources/chat/completions.ts +183 -85
- package/src/resources/content.ts +1 -28
- package/src/resources/search.ts +1 -70
- package/src/resources/shared.ts +434 -25
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/shared.d.ts
CHANGED
|
@@ -1,46 +1,320 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as Shared from "./shared.js";
|
|
2
|
+
export interface APIPublicSearchResult {
|
|
3
|
+
title: string;
|
|
4
|
+
url: string;
|
|
5
|
+
date?: string | null;
|
|
6
|
+
last_updated?: string | null;
|
|
7
|
+
snippet?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ChatMessageInput {
|
|
10
|
+
content: string | Array<ChatMessageInput.ChatMessageContentTextChunk | ChatMessageInput.ChatMessageContentImageChunk | ChatMessageInput.ChatMessageContentFileChunk | ChatMessageInput.ChatMessageContentPdfChunk | ChatMessageInput.ChatMessageContentVideoChunk>;
|
|
11
|
+
/**
|
|
12
|
+
* Chat roles enum
|
|
13
|
+
*/
|
|
14
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
15
|
+
reasoning_steps?: Array<ChatMessageInput.ReasoningStep> | null;
|
|
16
|
+
tool_calls?: Array<ChatMessageInput.ToolCall> | null;
|
|
5
17
|
}
|
|
6
|
-
export
|
|
18
|
+
export declare namespace ChatMessageInput {
|
|
19
|
+
interface ChatMessageContentTextChunk {
|
|
20
|
+
text: string;
|
|
21
|
+
type: 'text';
|
|
22
|
+
}
|
|
23
|
+
interface ChatMessageContentImageChunk {
|
|
24
|
+
image_url: ChatMessageContentImageChunk.URL | string;
|
|
25
|
+
type: 'image_url';
|
|
26
|
+
}
|
|
27
|
+
namespace ChatMessageContentImageChunk {
|
|
28
|
+
interface URL {
|
|
29
|
+
url: string;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
interface ChatMessageContentFileChunk {
|
|
33
|
+
file_url: ChatMessageContentFileChunk.URL | string;
|
|
34
|
+
type: 'file_url';
|
|
35
|
+
file_name?: string | null;
|
|
36
|
+
}
|
|
37
|
+
namespace ChatMessageContentFileChunk {
|
|
38
|
+
interface URL {
|
|
39
|
+
url: string;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
interface ChatMessageContentPdfChunk {
|
|
43
|
+
pdf_url: ChatMessageContentPdfChunk.URL | string;
|
|
44
|
+
type: 'pdf_url';
|
|
45
|
+
}
|
|
46
|
+
namespace ChatMessageContentPdfChunk {
|
|
47
|
+
interface URL {
|
|
48
|
+
url: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
interface ChatMessageContentVideoChunk {
|
|
52
|
+
type: 'video_url';
|
|
53
|
+
video_url: ChatMessageContentVideoChunk.VideoURL | string;
|
|
54
|
+
}
|
|
55
|
+
namespace ChatMessageContentVideoChunk {
|
|
56
|
+
interface VideoURL {
|
|
57
|
+
url: string;
|
|
58
|
+
frame_interval?: string | number;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
7
61
|
/**
|
|
8
|
-
*
|
|
62
|
+
* Reasoning step wrapper class
|
|
9
63
|
*/
|
|
10
|
-
|
|
64
|
+
interface ReasoningStep {
|
|
65
|
+
thought: string;
|
|
66
|
+
type: 'web_search' | 'fetch_url_content' | 'execute_python' | 'agent_progress' | 'browser_agent' | 'browser_tool_execution' | 'file_attachment_search';
|
|
67
|
+
/**
|
|
68
|
+
* Agent progress class for live-browsing updates
|
|
69
|
+
*/
|
|
70
|
+
agent_progress?: ReasoningStep.AgentProgress | null;
|
|
71
|
+
/**
|
|
72
|
+
* Browser agent step summary class
|
|
73
|
+
*/
|
|
74
|
+
browser_agent?: ReasoningStep.BrowserAgent | null;
|
|
75
|
+
/**
|
|
76
|
+
* Tool input for kicking off browser tool automation
|
|
77
|
+
*/
|
|
78
|
+
browser_tool_execution?: ReasoningStep.BrowserToolExecution | null;
|
|
79
|
+
/**
|
|
80
|
+
* Code generation step details wrapper class
|
|
81
|
+
*/
|
|
82
|
+
execute_python?: ReasoningStep.ExecutePython | null;
|
|
83
|
+
/**
|
|
84
|
+
* Fetch url content step details wrapper class
|
|
85
|
+
*/
|
|
86
|
+
fetch_url_content?: ReasoningStep.FetchURLContent | null;
|
|
87
|
+
/**
|
|
88
|
+
* File attachment search step details wrapper class
|
|
89
|
+
*/
|
|
90
|
+
file_attachment_search?: ReasoningStep.FileAttachmentSearch | null;
|
|
91
|
+
/**
|
|
92
|
+
* Web search step details wrapper class
|
|
93
|
+
*/
|
|
94
|
+
web_search?: ReasoningStep.WebSearch | null;
|
|
95
|
+
}
|
|
96
|
+
namespace ReasoningStep {
|
|
97
|
+
/**
|
|
98
|
+
* Agent progress class for live-browsing updates
|
|
99
|
+
*/
|
|
100
|
+
interface AgentProgress {
|
|
101
|
+
action: string | null;
|
|
102
|
+
screenshot: string | null;
|
|
103
|
+
url: string | null;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Browser agent step summary class
|
|
107
|
+
*/
|
|
108
|
+
interface BrowserAgent {
|
|
109
|
+
result: string;
|
|
110
|
+
url: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Tool input for kicking off browser tool automation
|
|
114
|
+
*/
|
|
115
|
+
interface BrowserToolExecution {
|
|
116
|
+
tool: {
|
|
117
|
+
[key: string]: unknown;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Code generation step details wrapper class
|
|
122
|
+
*/
|
|
123
|
+
interface ExecutePython {
|
|
124
|
+
code: string;
|
|
125
|
+
result: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Fetch url content step details wrapper class
|
|
129
|
+
*/
|
|
130
|
+
interface FetchURLContent {
|
|
131
|
+
contents: Array<Shared.APIPublicSearchResult>;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* File attachment search step details wrapper class
|
|
135
|
+
*/
|
|
136
|
+
interface FileAttachmentSearch {
|
|
137
|
+
attachment_urls: Array<string>;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Web search step details wrapper class
|
|
141
|
+
*/
|
|
142
|
+
interface WebSearch {
|
|
143
|
+
search_keywords: Array<string>;
|
|
144
|
+
search_results: Array<Shared.APIPublicSearchResult>;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
interface ToolCall {
|
|
148
|
+
id?: string | null;
|
|
149
|
+
function?: ToolCall.Function | null;
|
|
150
|
+
type?: 'function' | null;
|
|
151
|
+
}
|
|
152
|
+
namespace ToolCall {
|
|
153
|
+
interface Function {
|
|
154
|
+
arguments?: string | null;
|
|
155
|
+
name?: string | null;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export interface ChatMessageOutput {
|
|
160
|
+
content: string | Array<ChatMessageOutput.ChatMessageContentTextChunk | ChatMessageOutput.ChatMessageContentImageChunk | ChatMessageOutput.ChatMessageContentFileChunk | ChatMessageOutput.ChatMessageContentPdfChunk | ChatMessageOutput.ChatMessageContentVideoChunk>;
|
|
11
161
|
/**
|
|
12
|
-
*
|
|
162
|
+
* Chat roles enum
|
|
13
163
|
*/
|
|
14
|
-
role: 'system' | 'user' | 'assistant';
|
|
164
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
165
|
+
reasoning_steps?: Array<ChatMessageOutput.ReasoningStep> | null;
|
|
166
|
+
tool_calls?: Array<ChatMessageOutput.ToolCall> | null;
|
|
15
167
|
}
|
|
16
|
-
export declare namespace
|
|
17
|
-
interface
|
|
168
|
+
export declare namespace ChatMessageOutput {
|
|
169
|
+
interface ChatMessageContentTextChunk {
|
|
170
|
+
text: string;
|
|
171
|
+
type: 'text';
|
|
172
|
+
}
|
|
173
|
+
interface ChatMessageContentImageChunk {
|
|
174
|
+
image_url: ChatMessageContentImageChunk.URL | string;
|
|
175
|
+
type: 'image_url';
|
|
176
|
+
}
|
|
177
|
+
namespace ChatMessageContentImageChunk {
|
|
178
|
+
interface URL {
|
|
179
|
+
url: string;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
interface ChatMessageContentFileChunk {
|
|
183
|
+
file_url: ChatMessageContentFileChunk.URL | string;
|
|
184
|
+
type: 'file_url';
|
|
185
|
+
file_name?: string | null;
|
|
186
|
+
}
|
|
187
|
+
namespace ChatMessageContentFileChunk {
|
|
188
|
+
interface URL {
|
|
189
|
+
url: string;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
interface ChatMessageContentPdfChunk {
|
|
193
|
+
pdf_url: ChatMessageContentPdfChunk.URL | string;
|
|
194
|
+
type: 'pdf_url';
|
|
195
|
+
}
|
|
196
|
+
namespace ChatMessageContentPdfChunk {
|
|
197
|
+
interface URL {
|
|
198
|
+
url: string;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
interface ChatMessageContentVideoChunk {
|
|
202
|
+
type: 'video_url';
|
|
203
|
+
video_url: ChatMessageContentVideoChunk.VideoURL | string;
|
|
204
|
+
}
|
|
205
|
+
namespace ChatMessageContentVideoChunk {
|
|
206
|
+
interface VideoURL {
|
|
207
|
+
url: string;
|
|
208
|
+
frame_interval?: string | number;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Reasoning step wrapper class
|
|
213
|
+
*/
|
|
214
|
+
interface ReasoningStep {
|
|
215
|
+
thought: string;
|
|
216
|
+
type: 'web_search' | 'fetch_url_content' | 'execute_python' | 'agent_progress' | 'browser_agent' | 'browser_tool_execution' | 'file_attachment_search';
|
|
217
|
+
/**
|
|
218
|
+
* Agent progress class for live-browsing updates
|
|
219
|
+
*/
|
|
220
|
+
agent_progress?: ReasoningStep.AgentProgress | null;
|
|
221
|
+
/**
|
|
222
|
+
* Browser agent step summary class
|
|
223
|
+
*/
|
|
224
|
+
browser_agent?: ReasoningStep.BrowserAgent | null;
|
|
225
|
+
/**
|
|
226
|
+
* Tool input for kicking off browser tool automation
|
|
227
|
+
*/
|
|
228
|
+
browser_tool_execution?: ReasoningStep.BrowserToolExecution | null;
|
|
229
|
+
/**
|
|
230
|
+
* Code generation step details wrapper class
|
|
231
|
+
*/
|
|
232
|
+
execute_python?: ReasoningStep.ExecutePython | null;
|
|
18
233
|
/**
|
|
19
|
-
*
|
|
234
|
+
* Fetch url content step details wrapper class
|
|
20
235
|
*/
|
|
21
|
-
|
|
22
|
-
image_url?: MultipartContent.ImageURL | null;
|
|
236
|
+
fetch_url_content?: ReasoningStep.FetchURLContent | null;
|
|
23
237
|
/**
|
|
24
|
-
*
|
|
238
|
+
* File attachment search step details wrapper class
|
|
25
239
|
*/
|
|
26
|
-
|
|
240
|
+
file_attachment_search?: ReasoningStep.FileAttachmentSearch | null;
|
|
241
|
+
/**
|
|
242
|
+
* Web search step details wrapper class
|
|
243
|
+
*/
|
|
244
|
+
web_search?: ReasoningStep.WebSearch | null;
|
|
27
245
|
}
|
|
28
|
-
namespace
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
246
|
+
namespace ReasoningStep {
|
|
247
|
+
/**
|
|
248
|
+
* Agent progress class for live-browsing updates
|
|
249
|
+
*/
|
|
250
|
+
interface AgentProgress {
|
|
251
|
+
action: string | null;
|
|
252
|
+
screenshot: string | null;
|
|
253
|
+
url: string | null;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Browser agent step summary class
|
|
257
|
+
*/
|
|
258
|
+
interface BrowserAgent {
|
|
259
|
+
result: string;
|
|
33
260
|
url: string;
|
|
34
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Tool input for kicking off browser tool automation
|
|
264
|
+
*/
|
|
265
|
+
interface BrowserToolExecution {
|
|
266
|
+
tool: {
|
|
267
|
+
[key: string]: unknown;
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Code generation step details wrapper class
|
|
272
|
+
*/
|
|
273
|
+
interface ExecutePython {
|
|
274
|
+
code: string;
|
|
275
|
+
result: string;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Fetch url content step details wrapper class
|
|
279
|
+
*/
|
|
280
|
+
interface FetchURLContent {
|
|
281
|
+
contents: Array<Shared.APIPublicSearchResult>;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* File attachment search step details wrapper class
|
|
285
|
+
*/
|
|
286
|
+
interface FileAttachmentSearch {
|
|
287
|
+
attachment_urls: Array<string>;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Web search step details wrapper class
|
|
291
|
+
*/
|
|
292
|
+
interface WebSearch {
|
|
293
|
+
search_keywords: Array<string>;
|
|
294
|
+
search_results: Array<Shared.APIPublicSearchResult>;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
interface ToolCall {
|
|
298
|
+
id?: string | null;
|
|
299
|
+
function?: ToolCall.Function | null;
|
|
300
|
+
type?: 'function' | null;
|
|
301
|
+
}
|
|
302
|
+
namespace ToolCall {
|
|
303
|
+
interface Function {
|
|
304
|
+
arguments?: string | null;
|
|
305
|
+
name?: string | null;
|
|
306
|
+
}
|
|
35
307
|
}
|
|
36
308
|
}
|
|
37
|
-
export interface
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
309
|
+
export interface Choice {
|
|
310
|
+
delta: ChatMessageOutput;
|
|
311
|
+
index: number;
|
|
312
|
+
message: ChatMessageOutput;
|
|
313
|
+
finish_reason?: 'stop' | 'length' | null;
|
|
41
314
|
}
|
|
42
315
|
export interface UsageInfo {
|
|
43
316
|
completion_tokens: number;
|
|
317
|
+
cost: UsageInfo.Cost;
|
|
44
318
|
prompt_tokens: number;
|
|
45
319
|
total_tokens: number;
|
|
46
320
|
citation_tokens?: number | null;
|
|
@@ -48,4 +322,15 @@ export interface UsageInfo {
|
|
|
48
322
|
reasoning_tokens?: number | null;
|
|
49
323
|
search_context_size?: string | null;
|
|
50
324
|
}
|
|
325
|
+
export declare namespace UsageInfo {
|
|
326
|
+
interface Cost {
|
|
327
|
+
input_tokens_cost: number;
|
|
328
|
+
output_tokens_cost: number;
|
|
329
|
+
total_cost: number;
|
|
330
|
+
citation_tokens_cost?: number | null;
|
|
331
|
+
reasoning_tokens_cost?: number | null;
|
|
332
|
+
request_cost?: number | null;
|
|
333
|
+
search_queries_cost?: number | null;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
51
336
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,KAAK,MAAM;AAElB,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EACH,MAAM,GACN,KAAK,CACD,gBAAgB,CAAC,2BAA2B,GAC5C,gBAAgB,CAAC,4BAA4B,GAC7C,gBAAgB,CAAC,2BAA2B,GAC5C,gBAAgB,CAAC,0BAA0B,GAC3C,gBAAgB,CAAC,4BAA4B,CAChD,CAAC;IAEN;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAE/C,eAAe,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,GAAG,IA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{
|
|
|
747
747
|
type ContentCreateParams as ContentCreateParams,
|
|
748
748
|
};
|
|
749
749
|
|
|
750
|
-
export type
|
|
751
|
-
export type
|
|
752
|
-
export type
|
|
750
|
+
export type APIPublicSearchResult = API.APIPublicSearchResult;
|
|
751
|
+
export type ChatMessageInput = API.ChatMessageInput;
|
|
752
|
+
export type ChatMessageOutput = API.ChatMessageOutput;
|
|
753
|
+
export type Choice = API.Choice;
|
|
753
754
|
export type UsageInfo = API.UsageInfo;
|
|
754
755
|
}
|
|
@@ -5,8 +5,8 @@ import * as CompletionsAPI from './completions';
|
|
|
5
5
|
import {
|
|
6
6
|
CompletionCreateParams,
|
|
7
7
|
CompletionCreateResponse,
|
|
8
|
+
CompletionGetParams,
|
|
8
9
|
CompletionGetResponse,
|
|
9
|
-
CompletionListParams,
|
|
10
10
|
CompletionListResponse,
|
|
11
11
|
Completions,
|
|
12
12
|
} from './completions';
|
|
@@ -24,6 +24,6 @@ export declare namespace Chat {
|
|
|
24
24
|
type CompletionListResponse as CompletionListResponse,
|
|
25
25
|
type CompletionGetResponse as CompletionGetResponse,
|
|
26
26
|
type CompletionCreateParams as CompletionCreateParams,
|
|
27
|
-
type
|
|
27
|
+
type CompletionGetParams as CompletionGetParams,
|
|
28
28
|
};
|
|
29
29
|
}
|