UNPKG

@n8n/n8n-nodes-langchain

Version:
85 lines (79 loc) • 4.13 kB
/** * Google Vertex Chat Model Node - Version 1 * Chat Model Google Vertex */ export interface LcLmChatGoogleVertexV1Params { authentication?: 'googleApi' | 'googleVertexAiApi'; /** * Select or enter your Google Cloud project ID * @searchListMethod gcpProjectsList * @displayOptions.show { authentication: ["googleApi"] } * @default {"mode":"list","value":""} */ projectId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string }; /** * The model which will generate the completion. &lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models"&gt;Learn more&lt;/a&gt;. * @builderHint Choose a stable Gemini model from the Vertex model list for the configured project and location. Do not copy Gemini API model IDs into Vertex without checking the list. Keep a working or explicitly requested model unless provider evidence shows it is unavailable or unsuitable. When choosing a new model, select a current stable model supported by this node version, the configured API, and the required operation. Use the declared model-list lookup with the connected credential when available. Gateway credits can restrict that list. For a new choice without credentials, use current provider catalog information. Choose a model that fits the task and budget. Copy the exact model ID. Do not rely on node defaults, invent model IDs, or treat an unfamiliar model as invalid. * @default gemini-2.5-flash */ modelName?: string | Expression<string>; /** * Where the model runs. Newer Gemini models (3.x) are only available on the Global or the EU/US multi-region locations. Leave as Default to use the region set in the credential. */ location?: '' | 'global' | 'eu' | 'us' | Expression<string>; /** * Additional options to add * @default {} */ options?: { /** The maximum number of tokens to generate in the completion * @default 2048 */ maxOutputTokens?: number | Expression<number>; /** Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. * @default 0.4 */ temperature?: number | Expression<number>; /** Used to remove "long tail" low probability responses. Defaults to -1, which disables it. * @default 32 */ topK?: number | Expression<number>; /** Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both. * @default 1 */ topP?: number | Expression<number>; /** Safety Settings * @default {"values":{"category":"HARM_CATEGORY_HARASSMENT","threshold":"HARM_BLOCK_THRESHOLD_UNSPECIFIED"}} */ safetySettings?: { /** Values */ values?: Array<{ /** The category of harmful content to block * @default HARM_CATEGORY_UNSPECIFIED */ category?: 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | Expression<string>; /** The threshold of harmful content to block * @default HARM_BLOCK_THRESHOLD_UNSPECIFIED */ threshold?: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE' | Expression<string>; }>; }; /** Controls reasoning tokens for thinking models. Set to 0 to disable automatic thinking. Set to -1 for dynamic thinking (default). * @default -1 */ thinkingBudget?: number | Expression<number>; }; } export interface LcLmChatGoogleVertexV1Credentials { googleApi: CredentialReference; googleVertexAiApi: CredentialReference; } interface LcLmChatGoogleVertexV1NodeBase { type: '@n8n/n8n-nodes-langchain.lmChatGoogleVertex'; version: 1; } export type LcLmChatGoogleVertexV1ParamsNode = LcLmChatGoogleVertexV1NodeBase & { config: NodeConfig<LcLmChatGoogleVertexV1Params> & { credentials?: LcLmChatGoogleVertexV1Credentials }; }; export type LcLmChatGoogleVertexV1Node = LcLmChatGoogleVertexV1ParamsNode;