@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.
- package/CHANGELOG.md +16 -0
- package/client.d.mts +4 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -6
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.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 +160 -134
- package/resources/async/chat/completions.d.mts.map +1 -1
- package/resources/async/chat/completions.d.ts +160 -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 +115 -83
- package/resources/chat/completions.d.mts.map +1 -1
- package/resources/chat/completions.d.ts +115 -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/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +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 -12
- package/src/resources/async/chat/chat.ts +2 -2
- package/src/resources/async/chat/completions.ts +263 -142
- package/src/resources/async/chat/index.ts +1 -1
- package/src/resources/chat/completions.ts +181 -85
- package/src/resources/index.ts +0 -1
- 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/content.d.mts +0 -55
- package/resources/content.d.mts.map +0 -1
- package/resources/content.d.ts +0 -55
- package/resources/content.d.ts.map +0 -1
- package/resources/content.js +0 -15
- package/resources/content.js.map +0 -1
- package/resources/content.mjs +0 -11
- package/resources/content.mjs.map +0 -1
- package/src/resources/content.ts +0 -70
|
@@ -4,69 +4,51 @@ import { APIPromise } from "../../../core/api-promise.js";
|
|
|
4
4
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
5
|
export declare class Completions extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* FastAPI wrapper around async chat completions
|
|
8
|
+
*
|
|
9
|
+
* This endpoint creates an asynchronous chat completion job and returns a job ID
|
|
10
|
+
* that can be used to poll for results.
|
|
8
11
|
*/
|
|
9
12
|
create(body: CompletionCreateParams, options?: RequestOptions): APIPromise<CompletionCreateResponse>;
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* list all async chat completion requests for a given user.
|
|
12
15
|
*/
|
|
13
|
-
list(
|
|
16
|
+
list(options?: RequestOptions): APIPromise<CompletionListResponse>;
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
18
|
+
* get the response for a given async chat completion request.
|
|
16
19
|
*/
|
|
17
|
-
get(
|
|
20
|
+
get(apiRequest: string, params?: CompletionGetParams | null | undefined, options?: RequestOptions): APIPromise<CompletionGetResponse>;
|
|
18
21
|
}
|
|
19
22
|
export interface CompletionCreateResponse {
|
|
20
|
-
/**
|
|
21
|
-
* Unique identifier for the async job
|
|
22
|
-
*/
|
|
23
23
|
id: string;
|
|
24
|
-
/**
|
|
25
|
-
* Unix timestamp of creation
|
|
26
|
-
*/
|
|
27
24
|
created_at: number;
|
|
28
25
|
model: string;
|
|
26
|
+
/**
|
|
27
|
+
* Status enum for async processing.
|
|
28
|
+
*/
|
|
29
29
|
status: 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
|
|
30
30
|
completed_at?: number | null;
|
|
31
31
|
error_message?: string | null;
|
|
32
32
|
failed_at?: number | null;
|
|
33
|
-
/**
|
|
34
|
-
* The completion response when status is COMPLETED
|
|
35
|
-
*/
|
|
36
33
|
response?: CompletionCreateResponse.Response | null;
|
|
37
34
|
started_at?: number | null;
|
|
38
35
|
}
|
|
39
36
|
export declare namespace CompletionCreateResponse {
|
|
40
|
-
/**
|
|
41
|
-
* The completion response when status is COMPLETED
|
|
42
|
-
*/
|
|
43
37
|
interface Response {
|
|
44
|
-
/**
|
|
45
|
-
* Unique identifier for the chat completion
|
|
46
|
-
*/
|
|
47
38
|
id: string;
|
|
48
|
-
choices: Array<Shared.
|
|
49
|
-
/**
|
|
50
|
-
* Unix timestamp of creation
|
|
51
|
-
*/
|
|
39
|
+
choices: Array<Shared.Choice>;
|
|
52
40
|
created: number;
|
|
53
|
-
/**
|
|
54
|
-
* The model used
|
|
55
|
-
*/
|
|
56
41
|
model: string;
|
|
57
|
-
object: string;
|
|
58
42
|
usage: Shared.UsageInfo;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
43
|
+
citations?: Array<string> | null;
|
|
44
|
+
object?: string;
|
|
45
|
+
search_results?: Array<Shared.APIPublicSearchResult> | null;
|
|
46
|
+
status?: 'PENDING' | 'COMPLETED' | null;
|
|
47
|
+
type?: 'message' | 'info' | 'end_of_stream' | null;
|
|
63
48
|
}
|
|
64
49
|
}
|
|
65
50
|
export interface CompletionListResponse {
|
|
66
51
|
requests: Array<CompletionListResponse.Request>;
|
|
67
|
-
/**
|
|
68
|
-
* Token for pagination
|
|
69
|
-
*/
|
|
70
52
|
next_token?: string | null;
|
|
71
53
|
}
|
|
72
54
|
export declare namespace CompletionListResponse {
|
|
@@ -74,6 +56,9 @@ export declare namespace CompletionListResponse {
|
|
|
74
56
|
id: string;
|
|
75
57
|
created_at: number;
|
|
76
58
|
model: string;
|
|
59
|
+
/**
|
|
60
|
+
* Status enum for async processing.
|
|
61
|
+
*/
|
|
77
62
|
status: 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
|
|
78
63
|
completed_at?: number | null;
|
|
79
64
|
failed_at?: number | null;
|
|
@@ -81,157 +66,198 @@ export declare namespace CompletionListResponse {
|
|
|
81
66
|
}
|
|
82
67
|
}
|
|
83
68
|
export interface CompletionGetResponse {
|
|
84
|
-
/**
|
|
85
|
-
* Unique identifier for the async job
|
|
86
|
-
*/
|
|
87
69
|
id: string;
|
|
88
|
-
/**
|
|
89
|
-
* Unix timestamp of creation
|
|
90
|
-
*/
|
|
91
70
|
created_at: number;
|
|
92
71
|
model: string;
|
|
72
|
+
/**
|
|
73
|
+
* Status enum for async processing.
|
|
74
|
+
*/
|
|
93
75
|
status: 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
|
|
94
76
|
completed_at?: number | null;
|
|
95
77
|
error_message?: string | null;
|
|
96
78
|
failed_at?: number | null;
|
|
97
|
-
/**
|
|
98
|
-
* The completion response when status is COMPLETED
|
|
99
|
-
*/
|
|
100
79
|
response?: CompletionGetResponse.Response | null;
|
|
101
80
|
started_at?: number | null;
|
|
102
81
|
}
|
|
103
82
|
export declare namespace CompletionGetResponse {
|
|
104
|
-
/**
|
|
105
|
-
* The completion response when status is COMPLETED
|
|
106
|
-
*/
|
|
107
83
|
interface Response {
|
|
108
|
-
/**
|
|
109
|
-
* Unique identifier for the chat completion
|
|
110
|
-
*/
|
|
111
84
|
id: string;
|
|
112
|
-
choices: Array<Shared.
|
|
113
|
-
/**
|
|
114
|
-
* Unix timestamp of creation
|
|
115
|
-
*/
|
|
85
|
+
choices: Array<Shared.Choice>;
|
|
116
86
|
created: number;
|
|
117
|
-
/**
|
|
118
|
-
* The model used
|
|
119
|
-
*/
|
|
120
87
|
model: string;
|
|
121
|
-
object: string;
|
|
122
88
|
usage: Shared.UsageInfo;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
89
|
+
citations?: Array<string> | null;
|
|
90
|
+
object?: string;
|
|
91
|
+
search_results?: Array<Shared.APIPublicSearchResult> | null;
|
|
92
|
+
status?: 'PENDING' | 'COMPLETED' | null;
|
|
93
|
+
type?: 'message' | 'info' | 'end_of_stream' | null;
|
|
127
94
|
}
|
|
128
95
|
}
|
|
129
96
|
export interface CompletionCreateParams {
|
|
130
97
|
request: CompletionCreateParams.Request;
|
|
98
|
+
idempotency_key?: string | null;
|
|
131
99
|
}
|
|
132
100
|
export declare namespace CompletionCreateParams {
|
|
133
101
|
interface Request {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
*/
|
|
102
|
+
messages: Array<Shared.ChatMessageInput>;
|
|
103
|
+
model: string;
|
|
104
|
+
_debug_pro_search?: boolean;
|
|
105
|
+
_inputs?: Array<number> | null;
|
|
106
|
+
_is_browser_agent?: boolean | null;
|
|
107
|
+
_prompt_token_length?: number | null;
|
|
108
|
+
best_of?: number | null;
|
|
109
|
+
country?: string | null;
|
|
110
|
+
cum_logprobs?: boolean | null;
|
|
111
|
+
debug_params?: Request.DebugParams | null;
|
|
112
|
+
disable_search?: boolean | null;
|
|
113
|
+
diverse_first_token?: boolean | null;
|
|
114
|
+
enable_search_classifier?: boolean | null;
|
|
115
|
+
file_workspace_id?: string | null;
|
|
116
|
+
frequency_penalty?: number | null;
|
|
117
|
+
has_image_url?: boolean;
|
|
118
|
+
image_domain_filter?: Array<string> | null;
|
|
119
|
+
image_format_filter?: Array<string> | null;
|
|
153
120
|
last_updated_after_filter?: string | null;
|
|
154
|
-
/**
|
|
155
|
-
* Only include content last updated before this date (YYYY-MM-DD)
|
|
156
|
-
*/
|
|
157
121
|
last_updated_before_filter?: string | null;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
122
|
+
latitude?: number | null;
|
|
123
|
+
logprobs?: boolean | null;
|
|
124
|
+
longitude?: number | null;
|
|
125
|
+
max_tokens?: number | null;
|
|
126
|
+
n?: number | null;
|
|
127
|
+
num_images?: number;
|
|
128
|
+
num_search_results?: number;
|
|
129
|
+
parallel_tool_calls?: boolean | null;
|
|
130
|
+
presence_penalty?: number | null;
|
|
131
|
+
ranking_model?: string | null;
|
|
132
|
+
reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
133
|
+
response_format?: Request.ResponseFormatText | Request.ResponseFormatJsonSchema | Request.ResponseFormatRegex | null;
|
|
134
|
+
response_metadata?: {
|
|
135
|
+
[key: string]: unknown;
|
|
136
|
+
} | null;
|
|
137
|
+
return_images?: boolean | null;
|
|
138
|
+
return_related_questions?: boolean | null;
|
|
139
|
+
safe_search?: boolean | null;
|
|
174
140
|
search_after_date_filter?: string | null;
|
|
175
|
-
/**
|
|
176
|
-
* Only include content published before this date (YYYY-MM-DD)
|
|
177
|
-
*/
|
|
178
141
|
search_before_date_filter?: string | null;
|
|
179
|
-
/**
|
|
180
|
-
* List of domains to limit search results to. Use '-' prefix to exclude domains
|
|
181
|
-
*/
|
|
182
142
|
search_domain_filter?: Array<string> | null;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
*/
|
|
143
|
+
search_internal_properties?: {
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
} | null;
|
|
187
146
|
search_mode?: 'web' | 'academic' | 'sec' | null;
|
|
188
|
-
/**
|
|
189
|
-
* Filter results by how recently they were published
|
|
190
|
-
*/
|
|
191
147
|
search_recency_filter?: 'hour' | 'day' | 'week' | 'month' | 'year' | null;
|
|
148
|
+
search_tenant?: string | null;
|
|
149
|
+
stop?: string | Array<string> | null;
|
|
150
|
+
stream?: boolean | null;
|
|
151
|
+
temperature?: number | null;
|
|
152
|
+
tool_choice?: 'none' | 'auto' | 'required' | null;
|
|
153
|
+
tools?: Array<Request.Tool> | null;
|
|
154
|
+
top_k?: number | null;
|
|
155
|
+
top_logprobs?: number | null;
|
|
156
|
+
top_p?: number | null;
|
|
157
|
+
updated_after_timestamp?: number | null;
|
|
158
|
+
updated_before_timestamp?: number | null;
|
|
192
159
|
web_search_options?: Request.WebSearchOptions;
|
|
193
160
|
}
|
|
194
161
|
namespace Request {
|
|
162
|
+
interface DebugParams {
|
|
163
|
+
summarizer_model_override?: string | null;
|
|
164
|
+
summarizer_prompt_override?: string | null;
|
|
165
|
+
}
|
|
166
|
+
interface ResponseFormatText {
|
|
167
|
+
type: 'text';
|
|
168
|
+
}
|
|
169
|
+
interface ResponseFormatJsonSchema {
|
|
170
|
+
json_schema: ResponseFormatJsonSchema.JsonSchema;
|
|
171
|
+
type: 'json_schema';
|
|
172
|
+
}
|
|
173
|
+
namespace ResponseFormatJsonSchema {
|
|
174
|
+
interface JsonSchema {
|
|
175
|
+
schema: {
|
|
176
|
+
[key: string]: unknown;
|
|
177
|
+
};
|
|
178
|
+
description?: string | null;
|
|
179
|
+
name?: string | null;
|
|
180
|
+
strict?: boolean | null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
interface ResponseFormatRegex {
|
|
184
|
+
regex: ResponseFormatRegex.Regex;
|
|
185
|
+
type: 'regex';
|
|
186
|
+
}
|
|
187
|
+
namespace ResponseFormatRegex {
|
|
188
|
+
interface Regex {
|
|
189
|
+
regex: string;
|
|
190
|
+
description?: string | null;
|
|
191
|
+
name?: string | null;
|
|
192
|
+
strict?: boolean | null;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
interface Tool {
|
|
196
|
+
function: Tool.Function;
|
|
197
|
+
type: 'function';
|
|
198
|
+
}
|
|
199
|
+
namespace Tool {
|
|
200
|
+
interface Function {
|
|
201
|
+
description: string;
|
|
202
|
+
name: string;
|
|
203
|
+
parameters: Function.Parameters;
|
|
204
|
+
strict?: boolean | null;
|
|
205
|
+
}
|
|
206
|
+
namespace Function {
|
|
207
|
+
interface Parameters {
|
|
208
|
+
properties: {
|
|
209
|
+
[key: string]: unknown;
|
|
210
|
+
};
|
|
211
|
+
type: string;
|
|
212
|
+
additional_properties?: boolean | null;
|
|
213
|
+
required?: Array<string> | null;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
195
217
|
interface WebSearchOptions {
|
|
196
|
-
|
|
197
|
-
* Improves relevance of image search results
|
|
198
|
-
*/
|
|
199
|
-
image_search_relevance_enhanced?: boolean;
|
|
200
|
-
/**
|
|
201
|
-
* Amount of search context retrieved: low (cost-saving), medium (balanced), high
|
|
202
|
-
* (comprehensive)
|
|
203
|
-
*/
|
|
218
|
+
image_results_enhanced_relevance?: boolean;
|
|
204
219
|
search_context_size?: 'low' | 'medium' | 'high';
|
|
205
|
-
|
|
220
|
+
search_type?: 'fast' | 'pro' | 'auto';
|
|
221
|
+
user_location?: WebSearchOptions.UserLocation | null;
|
|
206
222
|
}
|
|
207
223
|
namespace WebSearchOptions {
|
|
208
224
|
interface UserLocation {
|
|
209
225
|
city?: string | null;
|
|
210
|
-
/**
|
|
211
|
-
* Two-letter ISO country code
|
|
212
|
-
*/
|
|
213
226
|
country?: string | null;
|
|
214
227
|
latitude?: number | null;
|
|
215
228
|
longitude?: number | null;
|
|
216
|
-
/**
|
|
217
|
-
* State/province name
|
|
218
|
-
*/
|
|
219
229
|
region?: string | null;
|
|
220
230
|
}
|
|
221
231
|
}
|
|
222
232
|
}
|
|
223
233
|
}
|
|
224
|
-
export interface
|
|
234
|
+
export interface CompletionGetParams {
|
|
235
|
+
/**
|
|
236
|
+
* Query param:
|
|
237
|
+
*/
|
|
238
|
+
local_mode?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Header param:
|
|
241
|
+
*/
|
|
242
|
+
'x-client-env'?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Header param:
|
|
245
|
+
*/
|
|
246
|
+
'x-client-name'?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Header param:
|
|
249
|
+
*/
|
|
250
|
+
'x-request-time'?: string;
|
|
225
251
|
/**
|
|
226
|
-
*
|
|
252
|
+
* Header param:
|
|
227
253
|
*/
|
|
228
|
-
|
|
254
|
+
'x-usage-tier'?: string;
|
|
229
255
|
/**
|
|
230
|
-
*
|
|
256
|
+
* Header param:
|
|
231
257
|
*/
|
|
232
|
-
|
|
258
|
+
'x-user-id'?: string;
|
|
233
259
|
}
|
|
234
260
|
export declare namespace Completions {
|
|
235
|
-
export { type CompletionCreateResponse as CompletionCreateResponse, type CompletionListResponse as CompletionListResponse, type CompletionGetResponse as CompletionGetResponse, type CompletionCreateParams as CompletionCreateParams, type
|
|
261
|
+
export { type CompletionCreateResponse as CompletionCreateResponse, type CompletionListResponse as CompletionListResponse, type CompletionGetResponse as CompletionGetResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionGetParams as CompletionGetParams, };
|
|
236
262
|
}
|
|
237
263
|
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../../src/resources/async/chat/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../../../src/resources/async/chat/completions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpG;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIlE;;OAEG;IACH,GAAG,CACD,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;CAwBrC;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IAEX,UAAU,EAAE,MAAM,CAAC;IAEnB,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE3D,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,QAAQ,CAAC,EAAE,wBAAwB,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEpD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,QAAQ;QACvB,EAAE,EAAE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CAAC;gBAE1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;aACxB;SACF;KACF;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -3,25 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Completions = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
6
7
|
const path_1 = require("../../../internal/utils/path.js");
|
|
7
8
|
class Completions extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* FastAPI wrapper around async chat completions
|
|
11
|
+
*
|
|
12
|
+
* This endpoint creates an asynchronous chat completion job and returns a job ID
|
|
13
|
+
* that can be used to poll for results.
|
|
10
14
|
*/
|
|
11
15
|
create(body, options) {
|
|
12
16
|
return this._client.post('/async/chat/completions', { body, ...options });
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
19
|
+
* list all async chat completion requests for a given user.
|
|
16
20
|
*/
|
|
17
|
-
list(
|
|
18
|
-
return this._client.get('/async/chat/completions',
|
|
21
|
+
list(options) {
|
|
22
|
+
return this._client.get('/async/chat/completions', options);
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
|
-
*
|
|
25
|
+
* get the response for a given async chat completion request.
|
|
22
26
|
*/
|
|
23
|
-
get(
|
|
24
|
-
|
|
27
|
+
get(apiRequest, params = {}, options) {
|
|
28
|
+
const { 'x-client-env': xClientEnv, 'x-client-name': xClientName, 'x-request-time': xRequestTime, 'x-usage-tier': xUsageTier, 'x-user-id': xUserID, ...query } = params ?? {};
|
|
29
|
+
return this._client.get((0, path_1.path) `/async/chat/completions/${apiRequest}`, {
|
|
30
|
+
query,
|
|
31
|
+
...options,
|
|
32
|
+
headers: (0, headers_1.buildHeaders)([
|
|
33
|
+
{
|
|
34
|
+
...(xClientEnv != null ? { 'x-client-env': xClientEnv } : undefined),
|
|
35
|
+
...(xClientName != null ? { 'x-client-name': xClientName } : undefined),
|
|
36
|
+
...(xRequestTime != null ? { 'x-request-time': xRequestTime } : undefined),
|
|
37
|
+
...(xUsageTier != null ? { 'x-usage-tier': xUsageTier } : undefined),
|
|
38
|
+
...(xUserID != null ? { 'x-user-id': xUserID } : undefined),
|
|
39
|
+
},
|
|
40
|
+
options?.headers,
|
|
41
|
+
]),
|
|
42
|
+
});
|
|
25
43
|
}
|
|
26
44
|
}
|
|
27
45
|
exports.Completions = Completions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../../src/resources/async/chat/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../../../src/resources/async/chat/completions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;OAKG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;Q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AC,CAAC,CAAC,SAAS,CAAC;iBAC5D;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAjDD,kCAiDC"}
|
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
3
4
|
import { path } from "../../../internal/utils/path.mjs";
|
|
4
5
|
export class Completions extends APIResource {
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* FastAPI wrapper around async chat completions
|
|
8
|
+
*
|
|
9
|
+
* This endpoint creates an asynchronous chat completion job and returns a job ID
|
|
10
|
+
* that can be used to poll for results.
|
|
7
11
|
*/
|
|
8
12
|
create(body, options) {
|
|
9
13
|
return this._client.post('/async/chat/completions', { body, ...options });
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
16
|
+
* list all async chat completion requests for a given user.
|
|
13
17
|
*/
|
|
14
|
-
list(
|
|
15
|
-
return this._client.get('/async/chat/completions',
|
|
18
|
+
list(options) {
|
|
19
|
+
return this._client.get('/async/chat/completions', options);
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
22
|
+
* get the response for a given async chat completion request.
|
|
19
23
|
*/
|
|
20
|
-
get(
|
|
21
|
-
|
|
24
|
+
get(apiRequest, params = {}, options) {
|
|
25
|
+
const { 'x-client-env': xClientEnv, 'x-client-name': xClientName, 'x-request-time': xRequestTime, 'x-usage-tier': xUsageTier, 'x-user-id': xUserID, ...query } = params ?? {};
|
|
26
|
+
return this._client.get(path `/async/chat/completions/${apiRequest}`, {
|
|
27
|
+
query,
|
|
28
|
+
...options,
|
|
29
|
+
headers: buildHeaders([
|
|
30
|
+
{
|
|
31
|
+
...(xClientEnv != null ? { 'x-client-env': xClientEnv } : undefined),
|
|
32
|
+
...(xClientName != null ? { 'x-client-name': xClientName } : undefined),
|
|
33
|
+
...(xRequestTime != null ? { 'x-request-time': xRequestTime } : undefined),
|
|
34
|
+
...(xUsageTier != null ? { 'x-usage-tier': xUsageTier } : undefined),
|
|
35
|
+
...(xUserID != null ? { 'x-user-id': xUserID } : undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
22
40
|
}
|
|
23
41
|
}
|
|
24
42
|
//# sourceMappingURL=completions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../../src/resources/async/chat/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"completions.mjs","sourceRoot":"","sources":["../../../src/resources/async/chat/completions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;OAKG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,GAAG,CACD,UAAkB,EAClB,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EACJ,cAAc,EAAE,UAAU,EAC1B,eAAe,EAAE,WAAW,EAC5B,gBAAgB,EAAE,YAAY,EAC9B,cAAc,EAAE,UAAU,EAC1B,WAAW,EAAE,OAAO,EACpB,GAAG,KAAK,EACT,GAAG,MAAM,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,UAAU,EAAE,EAAE;YACnE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACvE,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC1E,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBAC5D;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Chat } from "./chat.mjs";
|
|
2
|
-
export { Completions, type CompletionCreateResponse, type CompletionListResponse, type CompletionGetResponse, type CompletionCreateParams, type
|
|
2
|
+
export { Completions, type CompletionCreateResponse, type CompletionListResponse, type CompletionGetResponse, type CompletionCreateParams, type CompletionGetParams, } from "./completions.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/async/chat/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE;OACR,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/async/chat/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE;OACR,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Chat } from "./chat.js";
|
|
2
|
-
export { Completions, type CompletionCreateResponse, type CompletionListResponse, type CompletionGetResponse, type CompletionCreateParams, type
|
|
2
|
+
export { Completions, type CompletionCreateResponse, type CompletionListResponse, type CompletionGetResponse, type CompletionCreateParams, type CompletionGetParams, } from "./completions.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/async/chat/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE;OACR,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/async/chat/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE;OACR,EACL,WAAW,EACX,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB"}
|