n8n-nodes-base
Version:
Base nodes of n8n
75 lines (71 loc) • 2.24 kB
text/typescript
/**
* Perplexity Node - Version 2
* Discriminator: resource=embedding, operation=createEmbedding
*/
interface Credentials {
perplexityApi: CredentialReference;
}
/** Generate vector embeddings for text */
export type PerplexityV2EmbeddingCreateEmbeddingParams = {
resource: 'embedding';
operation: 'createEmbedding';
/**
* The embedding model to use
* @default pplx-embed-v1-4b
*/
model?: 'pplx-embed-v1-0.6b' | 'pplx-embed-v1-4b' | Expression<string>;
/**
* Text(s) to embed. Put each text on a separate line.
*/
input?: string | Expression<string> | PlaceholderValue;
/**
* Options
* @default {}
*/
options?: {
/** Number of dimensions for the output embedding. If 0 or unset, the full model dimensions are used.
* @default 0
*/
dimensions?: number | Expression<number>;
/** The format of the returned embeddings
* @default base64_int8
*/
encoding_format?: 'base64_int8' | 'base64_binary' | 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 PerplexityV2EmbeddingCreateEmbeddingNode = {
type: 'n8n-nodes-base.perplexity';
version: 2;
credentials?: Credentials;
config: NodeConfig<PerplexityV2EmbeddingCreateEmbeddingParams>;
};