n8n-nodes-base
Version:
Base nodes of n8n
103 lines (99 loc) • 3.45 kB
text/typescript
/**
* Perplexity Node - Version 1
* Discriminator: resource=agent, operation=createResponse
*/
interface Credentials {
perplexityApi: CredentialReference;
}
/** Create responses using the Agent API with third-party models, presets, tools, and structured outputs */
export type PerplexityV1AgentCreateResponseParams = {
resource: 'agent';
operation: 'createResponse';
/**
* The input text prompt to send to the agent
*/
input?: string | Expression<string> | PlaceholderValue;
/**
* The model to use. Uses provider/model format (e.g. openai/gpt-5.2). Leave empty when using a preset.
* @default {"mode":"list","value":""}
*/
model?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
* Preset name to use. Use preset OR model, not both.
* @hint Use a preset OR a model, not both
*/
preset?: string | Expression<string> | PlaceholderValue;
/**
* Whether to return only essential fields (ID, model, output text, citations)
* @default false
*/
simplify?: boolean | Expression<boolean>;
/**
* Options
* @default {}
*/
options?: {
/** System-level instructions for the agent
*/
instructions?: string | Expression<string> | PlaceholderValue;
/** ISO 639-1 language code for the response language preference
*/
languagePreference?: string | Expression<string> | PlaceholderValue;
/** The maximum number of tokens to generate in the response
* @default 1024
*/
maxOutputTokens?: number | Expression<number>;
/** Maximum number of agentic steps (1-10)
* @default 5
*/
maxSteps?: number | Expression<number>;
/** Comma-separated list of 1-5 model IDs to use as fallbacks
*/
modelsFallback?: string | Expression<string> | PlaceholderValue;
/** Reasoning configuration object (e.g. {"effort": "high"})
*/
reasoning?: IDataObject | string | Expression<string>;
/** JSON schema for structured output. Set type to "json_schema" with a schema property.
*/
responseFormat?: IDataObject | string | Expression<string>;
/** Array of tool objects to make available to the agent
*/
tools?: IDataObject | string | Expression<string>;
};
requestOptions?: {
/** Batching
* @default {"batch":{}}
*/
batching?: {
/** Batching
*/
batch?: {
/** Input will be split in batches to throttle requests. -1 for disabled. 0 will be treated as 1.
* @default 50
*/
batchSize?: number | Expression<number>;
/** Time (in milliseconds) between each batch of requests. 0 for disabled.
* @default 1000
*/
batchInterval?: number | Expression<number>;
};
};
/** Whether to accept the response even if SSL certificate validation is not possible
* @default false
*/
allowUnauthorizedCerts?: boolean;
/** HTTP proxy to use. If authentication is required it can be defined as follow: http://username:password@myproxy:3128
*/
proxy?: string | Expression<string> | PlaceholderValue;
/** Time in ms to wait for the server to send response headers (and start the response body) before aborting the request
* @default 10000
*/
timeout?: number | Expression<number>;
};
};
export type PerplexityV1AgentCreateResponseNode = {
type: 'n8n-nodes-base.perplexity';
version: 1;
credentials?: Credentials;
config: NodeConfig<PerplexityV1AgentCreateResponseParams>;
};