Skip to content

Commit c49ea25

Browse files
feat(api): manual updates
1 parent a645373 commit c49ea25

File tree

6 files changed

+24
-126
lines changed

6 files changed

+24
-126
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-561a19ba076e791a88215cc6d79b769a5c6e617b9afcc4098d70e7c82cc7d2e1.yml
3-
openapi_spec_hash: 5de27332f3b6a76f8d56ee7f9f65817c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-a251035716e17e7699e06dc69d4d7ab44ff3a8bde20bf3d35ecb03f6536b0f19.yml
3+
openapi_spec_hash: 60fd7b4e1f54d41e944a5f2ec6744ef8
44
config_hash: 5b10428c82f4119aa4837f03046d0e5c

src/resources/async/chat/completions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ export namespace CompletionCreateParams {
147147

148148
_debug_pro_search?: boolean;
149149

150-
_inputs?: Array<number> | null;
150+
_force_new_agent?: boolean | null;
151151

152-
_is_browser_agent?: boolean | null;
152+
_inputs?: Array<number> | null;
153153

154154
_prompt_token_length?: number | null;
155155

@@ -259,6 +259,8 @@ export namespace CompletionCreateParams {
259259

260260
use_threads?: boolean | null;
261261

262+
user_original_query?: string | null;
263+
262264
web_search_options?: Request.WebSearchOptions;
263265
}
264266

src/resources/chat/completions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export interface CompletionCreateParamsBase {
4040

4141
_debug_pro_search?: boolean;
4242

43-
_inputs?: Array<number> | null;
43+
_force_new_agent?: boolean | null;
4444

45-
_is_browser_agent?: boolean | null;
45+
_inputs?: Array<number> | null;
4646

4747
_prompt_token_length?: number | null;
4848

@@ -152,6 +152,8 @@ export interface CompletionCreateParamsBase {
152152

153153
use_threads?: boolean | null;
154154

155+
user_original_query?: string | null;
156+
155157
web_search_options?: CompletionCreateParams.WebSearchOptions;
156158
}
157159

src/resources/shared.ts

Lines changed: 8 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export interface ChatMessageInput {
2525
| ChatMessageInput.ChatMessageContentFileChunk
2626
| ChatMessageInput.ChatMessageContentPdfChunk
2727
| ChatMessageInput.ChatMessageContentVideoChunk
28-
>;
28+
>
29+
| null;
2930

3031
/**
3132
* Chat roles enum
@@ -34,6 +35,8 @@ export interface ChatMessageInput {
3435

3536
reasoning_steps?: Array<ChatMessageInput.ReasoningStep> | null;
3637

38+
tool_call_id?: string | null;
39+
3740
tool_calls?: Array<ChatMessageInput.ToolCall> | null;
3841
}
3942

@@ -102,21 +105,6 @@ export namespace ChatMessageInput {
102105
export interface ReasoningStep {
103106
thought: string;
104107

105-
/**
106-
* Agent progress class for live-browsing updates
107-
*/
108-
agent_progress?: ReasoningStep.AgentProgress | null;
109-
110-
/**
111-
* Browser agent step summary class
112-
*/
113-
browser_agent?: ReasoningStep.BrowserAgent | null;
114-
115-
/**
116-
* Tool input for kicking off browser tool automation
117-
*/
118-
browser_tool_execution?: ReasoningStep.BrowserToolExecution | null;
119-
120108
/**
121109
* Code generation step details wrapper class
122110
*/
@@ -127,11 +115,6 @@ export namespace ChatMessageInput {
127115
*/
128116
fetch_url_content?: ReasoningStep.FetchURLContent | null;
129117

130-
/**
131-
* File attachment search step details wrapper class
132-
*/
133-
file_attachment_search?: ReasoningStep.FileAttachmentSearch | null;
134-
135118
type?: string | null;
136119

137120
/**
@@ -141,33 +124,6 @@ export namespace ChatMessageInput {
141124
}
142125

143126
export namespace ReasoningStep {
144-
/**
145-
* Agent progress class for live-browsing updates
146-
*/
147-
export interface AgentProgress {
148-
action: string | null;
149-
150-
screenshot: string | null;
151-
152-
url: string | null;
153-
}
154-
155-
/**
156-
* Browser agent step summary class
157-
*/
158-
export interface BrowserAgent {
159-
result: string;
160-
161-
url: string;
162-
}
163-
164-
/**
165-
* Tool input for kicking off browser tool automation
166-
*/
167-
export interface BrowserToolExecution {
168-
tool: { [key: string]: unknown };
169-
}
170-
171127
/**
172128
* Code generation step details wrapper class
173129
*/
@@ -184,13 +140,6 @@ export namespace ChatMessageInput {
184140
contents: Array<Shared.APIPublicSearchResult>;
185141
}
186142

187-
/**
188-
* File attachment search step details wrapper class
189-
*/
190-
export interface FileAttachmentSearch {
191-
attachment_urls: Array<string>;
192-
}
193-
194143
/**
195144
* Web search step details wrapper class
196145
*/
@@ -227,7 +176,8 @@ export interface ChatMessageOutput {
227176
| ChatMessageOutput.ChatMessageContentFileChunk
228177
| ChatMessageOutput.ChatMessageContentPdfChunk
229178
| ChatMessageOutput.ChatMessageContentVideoChunk
230-
>;
179+
>
180+
| null;
231181

232182
/**
233183
* Chat roles enum
@@ -236,6 +186,8 @@ export interface ChatMessageOutput {
236186

237187
reasoning_steps?: Array<ChatMessageOutput.ReasoningStep> | null;
238188

189+
tool_call_id?: string | null;
190+
239191
tool_calls?: Array<ChatMessageOutput.ToolCall> | null;
240192
}
241193

@@ -304,21 +256,6 @@ export namespace ChatMessageOutput {
304256
export interface ReasoningStep {
305257
thought: string;
306258

307-
/**
308-
* Agent progress class for live-browsing updates
309-
*/
310-
agent_progress?: ReasoningStep.AgentProgress | null;
311-
312-
/**
313-
* Browser agent step summary class
314-
*/
315-
browser_agent?: ReasoningStep.BrowserAgent | null;
316-
317-
/**
318-
* Tool input for kicking off browser tool automation
319-
*/
320-
browser_tool_execution?: ReasoningStep.BrowserToolExecution | null;
321-
322259
/**
323260
* Code generation step details wrapper class
324261
*/
@@ -329,11 +266,6 @@ export namespace ChatMessageOutput {
329266
*/
330267
fetch_url_content?: ReasoningStep.FetchURLContent | null;
331268

332-
/**
333-
* File attachment search step details wrapper class
334-
*/
335-
file_attachment_search?: ReasoningStep.FileAttachmentSearch | null;
336-
337269
type?: string | null;
338270

339271
/**
@@ -343,33 +275,6 @@ export namespace ChatMessageOutput {
343275
}
344276

345277
export namespace ReasoningStep {
346-
/**
347-
* Agent progress class for live-browsing updates
348-
*/
349-
export interface AgentProgress {
350-
action: string | null;
351-
352-
screenshot: string | null;
353-
354-
url: string | null;
355-
}
356-
357-
/**
358-
* Browser agent step summary class
359-
*/
360-
export interface BrowserAgent {
361-
result: string;
362-
363-
url: string;
364-
}
365-
366-
/**
367-
* Tool input for kicking off browser tool automation
368-
*/
369-
export interface BrowserToolExecution {
370-
tool: { [key: string]: unknown };
371-
}
372-
373278
/**
374279
* Code generation step details wrapper class
375280
*/
@@ -386,13 +291,6 @@ export namespace ChatMessageOutput {
386291
contents: Array<Shared.APIPublicSearchResult>;
387292
}
388293

389-
/**
390-
* File attachment search step details wrapper class
391-
*/
392-
export interface FileAttachmentSearch {
393-
attachment_urls: Array<string>;
394-
}
395-
396294
/**
397295
* Web search step details wrapper class
398296
*/

tests/api-resources/async/chat/completions.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ describe('resource completions', () => {
3333
reasoning_steps: [
3434
{
3535
thought: 'thought',
36-
agent_progress: { action: 'action', screenshot: 'screenshot', url: 'url' },
37-
browser_agent: { result: 'result', url: 'url' },
38-
browser_tool_execution: { tool: { foo: 'bar' } },
3936
execute_python: { code: 'code', result: 'result' },
4037
fetch_url_content: {
4138
contents: [
@@ -49,7 +46,6 @@ describe('resource completions', () => {
4946
},
5047
],
5148
},
52-
file_attachment_search: { attachment_urls: ['string'] },
5349
type: 'type',
5450
web_search: {
5551
search_keywords: ['string'],
@@ -66,13 +62,14 @@ describe('resource completions', () => {
6662
},
6763
},
6864
],
65+
tool_call_id: 'tool_call_id',
6966
tool_calls: [{ id: 'id', function: { arguments: 'arguments', name: 'name' }, type: 'function' }],
7067
},
7168
],
7269
model: 'model',
7370
_debug_pro_search: true,
71+
_force_new_agent: true,
7472
_inputs: [0],
75-
_is_browser_agent: true,
7673
_prompt_token_length: 0,
7774
best_of: 0,
7875
country: 'country',
@@ -140,6 +137,7 @@ describe('resource completions', () => {
140137
updated_after_timestamp: 0,
141138
updated_before_timestamp: 0,
142139
use_threads: true,
140+
user_original_query: 'user_original_query',
143141
web_search_options: {
144142
image_results_enhanced_relevance: true,
145143
search_context_size: 'low',

tests/api-resources/chat/completions.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ describe('resource completions', () => {
3333
reasoning_steps: [
3434
{
3535
thought: 'thought',
36-
agent_progress: { action: 'action', screenshot: 'screenshot', url: 'url' },
37-
browser_agent: { result: 'result', url: 'url' },
38-
browser_tool_execution: { tool: { foo: 'bar' } },
3936
execute_python: { code: 'code', result: 'result' },
4037
fetch_url_content: {
4138
contents: [
@@ -49,7 +46,6 @@ describe('resource completions', () => {
4946
},
5047
],
5148
},
52-
file_attachment_search: { attachment_urls: ['string'] },
5349
type: 'type',
5450
web_search: {
5551
search_keywords: ['string'],
@@ -66,13 +62,14 @@ describe('resource completions', () => {
6662
},
6763
},
6864
],
65+
tool_call_id: 'tool_call_id',
6966
tool_calls: [{ id: 'id', function: { arguments: 'arguments', name: 'name' }, type: 'function' }],
7067
},
7168
],
7269
model: 'model',
7370
_debug_pro_search: true,
71+
_force_new_agent: true,
7472
_inputs: [0],
75-
_is_browser_agent: true,
7673
_prompt_token_length: 0,
7774
best_of: 0,
7875
country: 'country',
@@ -140,6 +137,7 @@ describe('resource completions', () => {
140137
updated_after_timestamp: 0,
141138
updated_before_timestamp: 0,
142139
use_threads: true,
140+
user_original_query: 'user_original_query',
143141
web_search_options: {
144142
image_results_enhanced_relevance: true,
145143
search_context_size: 'low',

0 commit comments

Comments
 (0)