UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

60 lines (54 loc) 1.85 kB
/** * Embeddings OpenAI Node - Version 1 * Use Embeddings OpenAI */ export interface LcEmbeddingsOpenAiV1Params { /** * The model which will generate the embeddings. &lt;a href="https://platform.openai.com/docs/models/overview"&gt;Learn more&lt;/a&gt;. * @default text-embedding-ada-002 */ model?: string | Expression<string>; /** * Additional options to add * @default {} */ options?: { /** The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. * @default 1536 */ dimensions?: 256 | 512 | 1024 | 1536 | 3072 | Expression<number>; /** Override the default base URL for the API * @default https://api.openai.com/v1 */ baseURL?: string | Expression<string> | PlaceholderValue; /** Maximum number of documents to send in each request * @default 512 */ batchSize?: number | Expression<number>; /** Whether to strip new lines from the input text * @default true */ stripNewLines?: boolean | Expression<boolean>; /** Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout. * @default -1 */ timeout?: number | Expression<number>; /** The format to return the embeddings in * @default float */ encodingFormat?: 'float' | 'base64' | Expression<string>; }; } export interface LcEmbeddingsOpenAiV1Credentials { openAiApi: CredentialReference; } interface LcEmbeddingsOpenAiV1NodeBase { type: '@n8n/n8n-nodes-langchain.embeddingsOpenAi'; version: 1; credentials?: LcEmbeddingsOpenAiV1Credentials; isTrigger: true; } export type LcEmbeddingsOpenAiV1ParamsNode = LcEmbeddingsOpenAiV1NodeBase & { config: NodeConfig<LcEmbeddingsOpenAiV1Params>; }; export type LcEmbeddingsOpenAiV1Node = LcEmbeddingsOpenAiV1ParamsNode;