Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.16.0"
".": "0.17.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 5
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-561a19ba076e791a88215cc6d79b769a5c6e617b9afcc4098d70e7c82cc7d2e1.yml
openapi_spec_hash: 5de27332f3b6a76f8d56ee7f9f65817c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-a251035716e17e7699e06dc69d4d7ab44ff3a8bde20bf3d35ecb03f6536b0f19.yml
openapi_spec_hash: 60fd7b4e1f54d41e944a5f2ec6744ef8
config_hash: 5b10428c82f4119aa4837f03046d0e5c
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.17.0 (2025-12-02)

Full Changelog: [v0.16.0...v0.17.0](https://github.com/perplexityai/perplexity-node/compare/v0.16.0...v0.17.0)

### Features

* **api:** manual updates ([c49ea25](https://github.com/perplexityai/perplexity-node/commit/c49ea25a0919c5fb25c22fc6a8fad4d81758bafd))


### Chores

* **client:** fix logger property type ([9eddcf7](https://github.com/perplexityai/perplexity-node/commit/9eddcf7aeaee285ea765ce2b3f6e473dcb931b06))
* **internal:** upgrade eslint ([a645373](https://github.com/perplexityai/perplexity-node/commit/a6453738c2adff41a33fd59e8f7bcf2a30e625ec))

## 0.16.0 (2025-11-04)

Full Changelog: [v0.15.0...v0.16.0](https://github.com/perplexityai/perplexity-node/compare/v0.15.0...v0.16.0)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@perplexity-ai/perplexity_ai",
"version": "0.16.0",
"version": "0.17.0",
"description": "The official TypeScript library for the Perplexity API",
"author": "Perplexity <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
"@types/node": "^20.17.6",
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
"eslint": "^9.20.1",
"eslint": "^9.39.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class Perplexity {
baseURL: string;
maxRetries: number;
timeout: number;
logger: Logger | undefined;
logger: Logger;
logLevel: LogLevel | undefined;
fetchOptions: MergedRequestInit | undefined;

Expand Down
6 changes: 4 additions & 2 deletions src/resources/async/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ export namespace CompletionCreateParams {

_debug_pro_search?: boolean;

_inputs?: Array<number> | null;
_force_new_agent?: boolean | null;

_is_browser_agent?: boolean | null;
_inputs?: Array<number> | null;

_prompt_token_length?: number | null;

Expand Down Expand Up @@ -259,6 +259,8 @@ export namespace CompletionCreateParams {

use_threads?: boolean | null;

user_original_query?: string | null;

web_search_options?: Request.WebSearchOptions;
}

Expand Down
6 changes: 4 additions & 2 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export interface CompletionCreateParamsBase {

_debug_pro_search?: boolean;

_inputs?: Array<number> | null;
_force_new_agent?: boolean | null;

_is_browser_agent?: boolean | null;
_inputs?: Array<number> | null;

_prompt_token_length?: number | null;

Expand Down Expand Up @@ -152,6 +152,8 @@ export interface CompletionCreateParamsBase {

use_threads?: boolean | null;

user_original_query?: string | null;

web_search_options?: CompletionCreateParams.WebSearchOptions;
}

Expand Down
118 changes: 8 additions & 110 deletions src/resources/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export interface ChatMessageInput {
| ChatMessageInput.ChatMessageContentFileChunk
| ChatMessageInput.ChatMessageContentPdfChunk
| ChatMessageInput.ChatMessageContentVideoChunk
>;
>
| null;

/**
* Chat roles enum
Expand All @@ -34,6 +35,8 @@ export interface ChatMessageInput {

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

tool_call_id?: string | null;

tool_calls?: Array<ChatMessageInput.ToolCall> | null;
}

Expand Down Expand Up @@ -102,21 +105,6 @@ export namespace ChatMessageInput {
export interface ReasoningStep {
thought: string;

/**
* Agent progress class for live-browsing updates
*/
agent_progress?: ReasoningStep.AgentProgress | null;

/**
* Browser agent step summary class
*/
browser_agent?: ReasoningStep.BrowserAgent | null;

/**
* Tool input for kicking off browser tool automation
*/
browser_tool_execution?: ReasoningStep.BrowserToolExecution | null;

/**
* Code generation step details wrapper class
*/
Expand All @@ -127,11 +115,6 @@ export namespace ChatMessageInput {
*/
fetch_url_content?: ReasoningStep.FetchURLContent | null;

/**
* File attachment search step details wrapper class
*/
file_attachment_search?: ReasoningStep.FileAttachmentSearch | null;

type?: string | null;

/**
Expand All @@ -141,33 +124,6 @@ export namespace ChatMessageInput {
}

export namespace ReasoningStep {
/**
* Agent progress class for live-browsing updates
*/
export interface AgentProgress {
action: string | null;

screenshot: string | null;

url: string | null;
}

/**
* Browser agent step summary class
*/
export interface BrowserAgent {
result: string;

url: string;
}

/**
* Tool input for kicking off browser tool automation
*/
export interface BrowserToolExecution {
tool: { [key: string]: unknown };
}

/**
* Code generation step details wrapper class
*/
Expand All @@ -184,13 +140,6 @@ export namespace ChatMessageInput {
contents: Array<Shared.APIPublicSearchResult>;
}

/**
* File attachment search step details wrapper class
*/
export interface FileAttachmentSearch {
attachment_urls: Array<string>;
}

/**
* Web search step details wrapper class
*/
Expand Down Expand Up @@ -227,7 +176,8 @@ export interface ChatMessageOutput {
| ChatMessageOutput.ChatMessageContentFileChunk
| ChatMessageOutput.ChatMessageContentPdfChunk
| ChatMessageOutput.ChatMessageContentVideoChunk
>;
>
| null;

/**
* Chat roles enum
Expand All @@ -236,6 +186,8 @@ export interface ChatMessageOutput {

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

tool_call_id?: string | null;

tool_calls?: Array<ChatMessageOutput.ToolCall> | null;
}

Expand Down Expand Up @@ -304,21 +256,6 @@ export namespace ChatMessageOutput {
export interface ReasoningStep {
thought: string;

/**
* Agent progress class for live-browsing updates
*/
agent_progress?: ReasoningStep.AgentProgress | null;

/**
* Browser agent step summary class
*/
browser_agent?: ReasoningStep.BrowserAgent | null;

/**
* Tool input for kicking off browser tool automation
*/
browser_tool_execution?: ReasoningStep.BrowserToolExecution | null;

/**
* Code generation step details wrapper class
*/
Expand All @@ -329,11 +266,6 @@ export namespace ChatMessageOutput {
*/
fetch_url_content?: ReasoningStep.FetchURLContent | null;

/**
* File attachment search step details wrapper class
*/
file_attachment_search?: ReasoningStep.FileAttachmentSearch | null;

type?: string | null;

/**
Expand All @@ -343,33 +275,6 @@ export namespace ChatMessageOutput {
}

export namespace ReasoningStep {
/**
* Agent progress class for live-browsing updates
*/
export interface AgentProgress {
action: string | null;

screenshot: string | null;

url: string | null;
}

/**
* Browser agent step summary class
*/
export interface BrowserAgent {
result: string;

url: string;
}

/**
* Tool input for kicking off browser tool automation
*/
export interface BrowserToolExecution {
tool: { [key: string]: unknown };
}

/**
* Code generation step details wrapper class
*/
Expand All @@ -386,13 +291,6 @@ export namespace ChatMessageOutput {
contents: Array<Shared.APIPublicSearchResult>;
}

/**
* File attachment search step details wrapper class
*/
export interface FileAttachmentSearch {
attachment_urls: Array<string>;
}

/**
* Web search step details wrapper class
*/
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.16.0'; // x-release-please-version
export const VERSION = '0.17.0'; // x-release-please-version
8 changes: 3 additions & 5 deletions tests/api-resources/async/chat/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ describe('resource completions', () => {
reasoning_steps: [
{
thought: 'thought',
agent_progress: { action: 'action', screenshot: 'screenshot', url: 'url' },
browser_agent: { result: 'result', url: 'url' },
browser_tool_execution: { tool: { foo: 'bar' } },
execute_python: { code: 'code', result: 'result' },
fetch_url_content: {
contents: [
Expand All @@ -49,7 +46,6 @@ describe('resource completions', () => {
},
],
},
file_attachment_search: { attachment_urls: ['string'] },
type: 'type',
web_search: {
search_keywords: ['string'],
Expand All @@ -66,13 +62,14 @@ describe('resource completions', () => {
},
},
],
tool_call_id: 'tool_call_id',
tool_calls: [{ id: 'id', function: { arguments: 'arguments', name: 'name' }, type: 'function' }],
},
],
model: 'model',
_debug_pro_search: true,
_force_new_agent: true,
_inputs: [0],
_is_browser_agent: true,
_prompt_token_length: 0,
best_of: 0,
country: 'country',
Expand Down Expand Up @@ -140,6 +137,7 @@ describe('resource completions', () => {
updated_after_timestamp: 0,
updated_before_timestamp: 0,
use_threads: true,
user_original_query: 'user_original_query',
web_search_options: {
image_results_enhanced_relevance: true,
search_context_size: 'low',
Expand Down
8 changes: 3 additions & 5 deletions tests/api-resources/chat/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ describe('resource completions', () => {
reasoning_steps: [
{
thought: 'thought',
agent_progress: { action: 'action', screenshot: 'screenshot', url: 'url' },
browser_agent: { result: 'result', url: 'url' },
browser_tool_execution: { tool: { foo: 'bar' } },
execute_python: { code: 'code', result: 'result' },
fetch_url_content: {
contents: [
Expand All @@ -49,7 +46,6 @@ describe('resource completions', () => {
},
],
},
file_attachment_search: { attachment_urls: ['string'] },
type: 'type',
web_search: {
search_keywords: ['string'],
Expand All @@ -66,13 +62,14 @@ describe('resource completions', () => {
},
},
],
tool_call_id: 'tool_call_id',
tool_calls: [{ id: 'id', function: { arguments: 'arguments', name: 'name' }, type: 'function' }],
},
],
model: 'model',
_debug_pro_search: true,
_force_new_agent: true,
_inputs: [0],
_is_browser_agent: true,
_prompt_token_length: 0,
best_of: 0,
country: 'country',
Expand Down Expand Up @@ -140,6 +137,7 @@ describe('resource completions', () => {
updated_after_timestamp: 0,
updated_before_timestamp: 0,
use_threads: true,
user_original_query: 'user_original_query',
web_search_options: {
image_results_enhanced_relevance: true,
search_context_size: 'low',
Expand Down
Loading