@n8n/n8n-nodes-langchain 2.18.2 → 2.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/index.ts +3 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/index.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/index.ts +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/index.schema.js +22 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/index.ts +15 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/operation_analyze.schema.js +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/operation_analyze.ts +69 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/operation_transcribe.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/operation_transcribe.ts +66 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_document/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_document/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_document/operation_analyze.schema.js +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_document/operation_analyze.ts +69 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file/operation_upload.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file/operation_upload.ts +43 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/index.schema.js +26 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/index.ts +21 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_create_store.schema.js +28 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_create_store.ts +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_delete_store.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_delete_store.ts +35 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_list_stores.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_list_stores.ts +35 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_upload_to_store.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file_search/operation_upload_to_store.ts +51 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/operation_analyze.schema.js +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/operation_analyze.ts +69 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/operation_edit.schema.js +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/operation_edit.ts +61 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/operation_generate.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/operation_generate.ts +51 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_text/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_text/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_text/operation_message.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_text/operation_message.ts +153 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/operation_analyze.schema.js +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/operation_analyze.ts +69 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/operation_download.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/operation_download.ts +41 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/operation_generate.schema.js +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/operation_generate.ts +68 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatGoogleGemini/index.ts +3 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatGoogleGemini/v11.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatGoogleGemini/v11.ts +69 -0
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +65 -48
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js +3 -0
- package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js +9 -1
- package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/text/message.operation.js +6 -1
- package/dist/nodes/vendors/GoogleGemini/actions/text/message.operation.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/versionDescription.js +2 -2
- package/dist/nodes/vendors/GoogleGemini/actions/versionDescription.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/methods/listSearch.js +3 -0
- package/dist/nodes/vendors/GoogleGemini/methods/listSearch.js.map +1 -1
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/nodes.json +2 -2
- package/package.json +10 -10
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=text, operation=message
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Create a completion with Google Gemini model */
|
|
12
|
+
export type LcGoogleGeminiV12TextMessageParams = {
|
|
13
|
+
resource: 'text';
|
|
14
|
+
operation: 'message';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod modelSearch
|
|
18
|
+
* @default {"mode":"list","value":"models/gemini-3-flash-preview"}
|
|
19
|
+
*/
|
|
20
|
+
modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
/**
|
|
22
|
+
* Messages
|
|
23
|
+
* @default {"values":[{"content":""}]}
|
|
24
|
+
*/
|
|
25
|
+
messages?: {
|
|
26
|
+
/** Values
|
|
27
|
+
*/
|
|
28
|
+
values?: Array<{
|
|
29
|
+
/** The content of the message to be send
|
|
30
|
+
*/
|
|
31
|
+
content?: string | Expression<string> | PlaceholderValue;
|
|
32
|
+
/** Role in shaping the model's response, it tells the model how it should behave and interact with the user
|
|
33
|
+
* @default user
|
|
34
|
+
*/
|
|
35
|
+
role?: 'user' | 'model' | Expression<string>;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Whether to return a simplified version of the response instead of the raw data
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
simplify?: boolean | Expression<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to attempt to return the response in JSON format
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
jsonOutput?: boolean | Expression<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Built-in Tools
|
|
50
|
+
* @default {}
|
|
51
|
+
*/
|
|
52
|
+
builtInTools?: {
|
|
53
|
+
/** Whether to allow the model to search the web using Google Search to get real-time information
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
googleSearch?: boolean | Expression<boolean>;
|
|
57
|
+
/** Google Maps
|
|
58
|
+
* @default {"latitude":"","longitude":""}
|
|
59
|
+
*/
|
|
60
|
+
googleMaps?: {
|
|
61
|
+
/** The latitude coordinate for location-based queries
|
|
62
|
+
*/
|
|
63
|
+
latitude?: number | Expression<number>;
|
|
64
|
+
/** The longitude coordinate for location-based queries
|
|
65
|
+
*/
|
|
66
|
+
longitude?: number | Expression<number>;
|
|
67
|
+
};
|
|
68
|
+
/** Whether to allow the model to read and analyze content from specific URLs
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
urlContext?: boolean | Expression<boolean>;
|
|
72
|
+
/** File Search
|
|
73
|
+
* @default {"fileSearchStoreNames":"[]"}
|
|
74
|
+
*/
|
|
75
|
+
fileSearch?: {
|
|
76
|
+
/** The file search store names to use for the file search. File search stores are managed via Google AI Studio.
|
|
77
|
+
* @default []
|
|
78
|
+
*/
|
|
79
|
+
fileSearchStoreNames?: IDataObject | string | Expression<string>;
|
|
80
|
+
/** Use metadata filter to search within a subset of documents. Example: author="Robert Graves".
|
|
81
|
+
*/
|
|
82
|
+
metadataFilter?: string | Expression<string> | PlaceholderValue;
|
|
83
|
+
};
|
|
84
|
+
/** Whether to allow the model to execute code it generates to produce a response. Supported only by certain models.
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
codeExecution?: boolean | Expression<boolean>;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Options
|
|
91
|
+
* @default {}
|
|
92
|
+
*/
|
|
93
|
+
options?: {
|
|
94
|
+
/** Whether to include a single output string merging all text parts of the response
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
includeMergedResponse?: boolean | Expression<boolean>;
|
|
98
|
+
/** System Message
|
|
99
|
+
*/
|
|
100
|
+
systemMessage?: string | Expression<string> | PlaceholderValue;
|
|
101
|
+
/** Whether to allow the model to execute code it generates to produce a response. Supported only by certain models.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
codeExecution?: boolean | Expression<boolean>;
|
|
105
|
+
/** Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim
|
|
106
|
+
* @default 0
|
|
107
|
+
*/
|
|
108
|
+
frequencyPenalty?: number | Expression<number>;
|
|
109
|
+
/** The maximum number of tokens to generate in the completion
|
|
110
|
+
* @default 16
|
|
111
|
+
*/
|
|
112
|
+
maxOutputTokens?: number | Expression<number>;
|
|
113
|
+
/** How many completions to generate for each prompt
|
|
114
|
+
* @default 1
|
|
115
|
+
*/
|
|
116
|
+
candidateCount?: number | Expression<number>;
|
|
117
|
+
/** Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics
|
|
118
|
+
* @default 0
|
|
119
|
+
*/
|
|
120
|
+
presencePenalty?: number | Expression<number>;
|
|
121
|
+
/** Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive
|
|
122
|
+
* @default 1
|
|
123
|
+
*/
|
|
124
|
+
temperature?: number | Expression<number>;
|
|
125
|
+
/** The maximum cumulative probability of tokens to consider when sampling
|
|
126
|
+
* @default 1
|
|
127
|
+
*/
|
|
128
|
+
topP?: number | Expression<number>;
|
|
129
|
+
/** The maximum number of tokens to consider when sampling
|
|
130
|
+
* @default 1
|
|
131
|
+
*/
|
|
132
|
+
topK?: number | Expression<number>;
|
|
133
|
+
/** Controls reasoning tokens for thinking models. Set to 0 to disable automatic thinking. Set to -1 for dynamic thinking (default).
|
|
134
|
+
* @default -1
|
|
135
|
+
*/
|
|
136
|
+
thinkingBudget?: number | Expression<number>;
|
|
137
|
+
/** The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit
|
|
138
|
+
* @default 15
|
|
139
|
+
*/
|
|
140
|
+
maxToolsIterations?: number | Expression<number>;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export interface LcGoogleGeminiV12TextMessageSubnodeConfig {
|
|
145
|
+
tools?: ToolInstance[];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type LcGoogleGeminiV12TextMessageNode = {
|
|
149
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
150
|
+
version: 1.2;
|
|
151
|
+
credentials?: Credentials;
|
|
152
|
+
config: NodeConfig<LcGoogleGeminiV12TextMessageParams> & { subnodes?: LcGoogleGeminiV12TextMessageSubnodeConfig };
|
|
153
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Video Resource - Zod Schema Factory
|
|
3
|
+
* Exports a factory that unions all operation schemas for this resource.
|
|
4
|
+
*
|
|
5
|
+
* Schema helpers (z, expressionSchema, etc.) are passed as parameters
|
|
6
|
+
* by the schema-validator, not imported from external files.
|
|
7
|
+
*
|
|
8
|
+
* @generated - CommonJS JavaScript for runtime loading
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const getAnalyzeSchema = require('./operation_analyze.schema');
|
|
12
|
+
const getDownloadSchema = require('./operation_download.schema');
|
|
13
|
+
const getGenerateSchema = require('./operation_generate.schema');
|
|
14
|
+
|
|
15
|
+
module.exports = function getSchema(helpers) {
|
|
16
|
+
const { parameters, z } = helpers;
|
|
17
|
+
// Apply operation default if not set
|
|
18
|
+
const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'transcribe' } : parameters;
|
|
19
|
+
return z.union([
|
|
20
|
+
getAnalyzeSchema({ ...helpers, parameters: effectiveParams }),
|
|
21
|
+
getDownloadSchema({ ...helpers, parameters: effectiveParams }),
|
|
22
|
+
getGenerateSchema({ ...helpers, parameters: effectiveParams }),
|
|
23
|
+
]);
|
|
24
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_video/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Video Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12VideoAnalyzeNode } from './operation_analyze';
|
|
7
|
+
import type { LcGoogleGeminiV12VideoDownloadNode } from './operation_download';
|
|
8
|
+
import type { LcGoogleGeminiV12VideoGenerateNode } from './operation_generate';
|
|
9
|
+
|
|
10
|
+
export * from './operation_analyze';
|
|
11
|
+
export * from './operation_download';
|
|
12
|
+
export * from './operation_generate';
|
|
13
|
+
|
|
14
|
+
export type LcGoogleGeminiV12VideoNode =
|
|
15
|
+
| LcGoogleGeminiV12VideoAnalyzeNode
|
|
16
|
+
| LcGoogleGeminiV12VideoDownloadNode
|
|
17
|
+
| LcGoogleGeminiV12VideoGenerateNode
|
|
18
|
+
;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=video, operation=analyze
|
|
4
|
+
*
|
|
5
|
+
* Use .parse() for strict validation or .safeParse() for error handling.
|
|
6
|
+
*
|
|
7
|
+
* Schema helpers (z, expressionSchema, etc.) are passed as parameters
|
|
8
|
+
* by the schema-validator, not imported from external files.
|
|
9
|
+
*
|
|
10
|
+
* @generated - CommonJS JavaScript for runtime loading
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, toolInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
}).strict();
|
|
19
|
+
|
|
20
|
+
return z.object({
|
|
21
|
+
parameters: z.object({
|
|
22
|
+
resource: z.literal('video'),
|
|
23
|
+
operation: z.literal('analyze'),
|
|
24
|
+
modelId: z.union([z.object({ __rl: z.literal(true), mode: z.union([z.literal('list'), z.literal('id')]), value: z.union([z.string(), z.number()]), cachedResultName: z.string().optional(), cachedResultUrl: z.string().optional() }), expressionSchema]).optional(),
|
|
25
|
+
text: stringOrExpression.optional(),
|
|
26
|
+
inputType: z.union([z.literal('url'), z.literal('binary'), expressionSchema]).optional(),
|
|
27
|
+
videoUrls: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["url"]}}, defaults: {"inputType":"url"} }),
|
|
28
|
+
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["binary"]}}, defaults: {"inputType":"url"} }),
|
|
29
|
+
simplify: booleanOrExpression.optional(),
|
|
30
|
+
options: z.object({ maxOutputTokens: numberOrExpression.optional() }).optional(),
|
|
31
|
+
}).optional(),
|
|
32
|
+
subnodes: subnodesSchema.optional(),
|
|
33
|
+
});
|
|
34
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=video, operation=analyze
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Take in audio and answer questions about it */
|
|
12
|
+
export type LcGoogleGeminiV12VideoAnalyzeParams = {
|
|
13
|
+
resource: 'video';
|
|
14
|
+
operation: 'analyze';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod modelSearch
|
|
18
|
+
* @default {"mode":"list","value":""}
|
|
19
|
+
*/
|
|
20
|
+
modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
/**
|
|
22
|
+
* Text Input
|
|
23
|
+
* @default What's in this video?
|
|
24
|
+
*/
|
|
25
|
+
text?: string | Expression<string> | PlaceholderValue;
|
|
26
|
+
/**
|
|
27
|
+
* Input Type
|
|
28
|
+
* @default url
|
|
29
|
+
*/
|
|
30
|
+
inputType?: 'url' | 'binary' | Expression<string>;
|
|
31
|
+
/**
|
|
32
|
+
* URL(s) of the video(s) to analyze, multiple URLs can be added separated by comma
|
|
33
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
34
|
+
*/
|
|
35
|
+
videoUrls?: string | Expression<string> | PlaceholderValue;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the binary field(s) which contains the video(s), seperate multiple field names with commas
|
|
38
|
+
* @hint The name of the input field containing the binary file data to be processed
|
|
39
|
+
* @displayOptions.show { inputType: ["binary"] }
|
|
40
|
+
* @default data
|
|
41
|
+
*/
|
|
42
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to simplify the response or not
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
simplify?: boolean | Expression<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Options
|
|
50
|
+
* @default {}
|
|
51
|
+
*/
|
|
52
|
+
options?: {
|
|
53
|
+
/** Fewer tokens will result in shorter, less detailed video description
|
|
54
|
+
* @default 300
|
|
55
|
+
*/
|
|
56
|
+
maxOutputTokens?: number | Expression<number>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export interface LcGoogleGeminiV12VideoAnalyzeSubnodeConfig {
|
|
61
|
+
tools?: ToolInstance[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type LcGoogleGeminiV12VideoAnalyzeNode = {
|
|
65
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
66
|
+
version: 1.2;
|
|
67
|
+
credentials?: Credentials;
|
|
68
|
+
config: NodeConfig<LcGoogleGeminiV12VideoAnalyzeParams> & { subnodes?: LcGoogleGeminiV12VideoAnalyzeSubnodeConfig };
|
|
69
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=video, operation=download
|
|
4
|
+
*
|
|
5
|
+
* Use .parse() for strict validation or .safeParse() for error handling.
|
|
6
|
+
*
|
|
7
|
+
* Schema helpers (z, expressionSchema, etc.) are passed as parameters
|
|
8
|
+
* by the schema-validator, not imported from external files.
|
|
9
|
+
*
|
|
10
|
+
* @generated - CommonJS JavaScript for runtime loading
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, toolInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
}).strict();
|
|
19
|
+
|
|
20
|
+
return z.object({
|
|
21
|
+
parameters: z.object({
|
|
22
|
+
resource: z.literal('video'),
|
|
23
|
+
operation: z.literal('download'),
|
|
24
|
+
url: stringOrExpression.optional(),
|
|
25
|
+
options: z.object({ binaryPropertyOutput: stringOrExpression.optional() }).optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=video, operation=download
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Download a generated video from the Google Gemini API using a URL */
|
|
12
|
+
export type LcGoogleGeminiV12VideoDownloadParams = {
|
|
13
|
+
resource: 'video';
|
|
14
|
+
operation: 'download';
|
|
15
|
+
/**
|
|
16
|
+
* The URL from Google Gemini API to download the video from
|
|
17
|
+
*/
|
|
18
|
+
url?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
/**
|
|
20
|
+
* Options
|
|
21
|
+
* @default {}
|
|
22
|
+
*/
|
|
23
|
+
options?: {
|
|
24
|
+
/** Put Output in Field
|
|
25
|
+
* @hint The name of the output field to put the binary file data in
|
|
26
|
+
* @default data
|
|
27
|
+
*/
|
|
28
|
+
binaryPropertyOutput?: string | Expression<string> | PlaceholderValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export interface LcGoogleGeminiV12VideoDownloadSubnodeConfig {
|
|
33
|
+
tools?: ToolInstance[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type LcGoogleGeminiV12VideoDownloadNode = {
|
|
37
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
38
|
+
version: 1.2;
|
|
39
|
+
credentials?: Credentials;
|
|
40
|
+
config: NodeConfig<LcGoogleGeminiV12VideoDownloadParams> & { subnodes?: LcGoogleGeminiV12VideoDownloadSubnodeConfig };
|
|
41
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=video, operation=generate
|
|
4
|
+
*
|
|
5
|
+
* Use .parse() for strict validation or .safeParse() for error handling.
|
|
6
|
+
*
|
|
7
|
+
* Schema helpers (z, expressionSchema, etc.) are passed as parameters
|
|
8
|
+
* by the schema-validator, not imported from external files.
|
|
9
|
+
*
|
|
10
|
+
* @generated - CommonJS JavaScript for runtime loading
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, toolInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
}).strict();
|
|
19
|
+
|
|
20
|
+
return z.object({
|
|
21
|
+
parameters: z.object({
|
|
22
|
+
resource: z.literal('video'),
|
|
23
|
+
operation: z.literal('generate'),
|
|
24
|
+
modelId: z.union([z.object({ __rl: z.literal(true), mode: z.union([z.literal('list'), z.literal('id')]), value: z.union([z.string(), z.number()]), cachedResultName: z.string().optional(), cachedResultUrl: z.string().optional() }), expressionSchema]).optional(),
|
|
25
|
+
prompt: stringOrExpression.optional(),
|
|
26
|
+
returnAs: z.union([z.literal('video'), z.literal('url'), expressionSchema]).optional(),
|
|
27
|
+
options: z.object({ sampleCount: numberOrExpression.optional(), durationSeconds: numberOrExpression.optional(), aspectRatio: z.union([z.literal('16:9'), z.literal('9:16'), expressionSchema]).optional(), personGeneration: z.union([z.literal('dont_allow'), z.literal('allow_adult'), z.literal('allow_all'), expressionSchema]).optional(), binaryPropertyOutput: stringOrExpression.optional() }).optional(),
|
|
28
|
+
}).optional(),
|
|
29
|
+
subnodes: subnodesSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=video, operation=generate
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Creates an image from a text prompt */
|
|
12
|
+
export type LcGoogleGeminiV12VideoGenerateParams = {
|
|
13
|
+
resource: 'video';
|
|
14
|
+
operation: 'generate';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod videoGenerationModelSearch
|
|
18
|
+
* @default {"mode":"list","value":""}
|
|
19
|
+
*/
|
|
20
|
+
modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
/**
|
|
22
|
+
* A text description of the desired video
|
|
23
|
+
*/
|
|
24
|
+
prompt?: string | Expression<string> | PlaceholderValue;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to return the video as a binary file or a URL that can be used to download the video later
|
|
27
|
+
* @default video
|
|
28
|
+
*/
|
|
29
|
+
returnAs?: 'video' | 'url' | Expression<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Options
|
|
32
|
+
* @default {}
|
|
33
|
+
*/
|
|
34
|
+
options?: {
|
|
35
|
+
/** How many videos to generate
|
|
36
|
+
* @default 1
|
|
37
|
+
*/
|
|
38
|
+
sampleCount?: number | Expression<number>;
|
|
39
|
+
/** Length of the generated video in seconds. Supported only by certain models.
|
|
40
|
+
* @default 8
|
|
41
|
+
*/
|
|
42
|
+
durationSeconds?: number | Expression<number>;
|
|
43
|
+
/** Aspect Ratio
|
|
44
|
+
* @default 16:9
|
|
45
|
+
*/
|
|
46
|
+
aspectRatio?: '16:9' | '9:16' | Expression<string>;
|
|
47
|
+
/** Person Generation
|
|
48
|
+
* @default dont_allow
|
|
49
|
+
*/
|
|
50
|
+
personGeneration?: 'dont_allow' | 'allow_adult' | 'allow_all' | Expression<string>;
|
|
51
|
+
/** Put Output in Field
|
|
52
|
+
* @hint The name of the output field to put the binary file data in
|
|
53
|
+
* @default data
|
|
54
|
+
*/
|
|
55
|
+
binaryPropertyOutput?: string | Expression<string> | PlaceholderValue;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export interface LcGoogleGeminiV12VideoGenerateSubnodeConfig {
|
|
60
|
+
tools?: ToolInstance[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type LcGoogleGeminiV12VideoGenerateNode = {
|
|
64
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
65
|
+
version: 1.2;
|
|
66
|
+
credentials?: Credentials;
|
|
67
|
+
config: NodeConfig<LcGoogleGeminiV12VideoGenerateParams> & { subnodes?: LcGoogleGeminiV12VideoGenerateSubnodeConfig };
|
|
68
|
+
};
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* Re-exports all version-specific types and provides combined union type.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { LcLmChatGoogleGeminiV11Node } from './v11';
|
|
7
8
|
import type { LcLmChatGoogleGeminiV1Node } from './v1';
|
|
8
9
|
|
|
10
|
+
export * from './v11';
|
|
9
11
|
export * from './v1';
|
|
10
12
|
|
|
11
13
|
// Combined union type for all versions
|
|
12
|
-
export type LcLmChatGoogleGeminiNode = LcLmChatGoogleGeminiV1Node;
|
|
14
|
+
export type LcLmChatGoogleGeminiNode = LcLmChatGoogleGeminiV11Node | LcLmChatGoogleGeminiV1Node;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Chat Model Node - Version 1.1 - Zod Validation Schemas
|
|
3
|
+
*
|
|
4
|
+
* These schemas validate node configuration at runtime.
|
|
5
|
+
* Use .parse() for strict validation or .safeParse() for error handling.
|
|
6
|
+
*
|
|
7
|
+
* Schema helpers (z, expressionSchema, etc.) are passed as parameters
|
|
8
|
+
* by the schema-validator, not imported from external files.
|
|
9
|
+
*
|
|
10
|
+
* @generated - CommonJS JavaScript for runtime loading
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema }) {
|
|
14
|
+
|
|
15
|
+
// Parameters schema
|
|
16
|
+
const parametersSchema = z.object({
|
|
17
|
+
modelName: stringOrExpression.optional(),
|
|
18
|
+
options: z.object({ maxOutputTokens: numberOrExpression.optional(), temperature: numberOrExpression.optional(), topK: numberOrExpression.optional(), topP: numberOrExpression.optional(), safetySettings: z.unknown().optional() }).optional(),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Return combined config schema
|
|
22
|
+
return z.object({
|
|
23
|
+
parameters: parametersSchema.nullable().optional(),
|
|
24
|
+
});
|
|
25
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Chat Model Node - Version 1.1
|
|
3
|
+
* Chat Model Google Gemini
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export interface LcLmChatGoogleGeminiV11Params {
|
|
8
|
+
/**
|
|
9
|
+
* The model which will generate the completion. <a href="https://developers.generativeai.google/api/rest/generativelanguage/models/list">Learn more</a>.
|
|
10
|
+
* @default models/gemini-2.5-flash
|
|
11
|
+
*/
|
|
12
|
+
modelName?: string | Expression<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Additional options to add
|
|
15
|
+
* @default {}
|
|
16
|
+
*/
|
|
17
|
+
options?: {
|
|
18
|
+
/** The maximum number of tokens to generate in the completion
|
|
19
|
+
* @default 2048
|
|
20
|
+
*/
|
|
21
|
+
maxOutputTokens?: number | Expression<number>;
|
|
22
|
+
/** Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.
|
|
23
|
+
* @default 0.4
|
|
24
|
+
*/
|
|
25
|
+
temperature?: number | Expression<number>;
|
|
26
|
+
/** Used to remove "long tail" low probability responses. Defaults to -1, which disables it.
|
|
27
|
+
* @default 32
|
|
28
|
+
*/
|
|
29
|
+
topK?: number | Expression<number>;
|
|
30
|
+
/** 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.
|
|
31
|
+
* @default 1
|
|
32
|
+
*/
|
|
33
|
+
topP?: number | Expression<number>;
|
|
34
|
+
/** Safety Settings
|
|
35
|
+
* @default {"values":{"category":"HARM_CATEGORY_HARASSMENT","threshold":"HARM_BLOCK_THRESHOLD_UNSPECIFIED"}}
|
|
36
|
+
*/
|
|
37
|
+
safetySettings?: {
|
|
38
|
+
/** Values
|
|
39
|
+
*/
|
|
40
|
+
values?: Array<{
|
|
41
|
+
/** The category of harmful content to block
|
|
42
|
+
* @default HARM_CATEGORY_UNSPECIFIED
|
|
43
|
+
*/
|
|
44
|
+
category?: 'HARM_CATEGORY_HARASSMENT' | 'HARM_CATEGORY_HATE_SPEECH' | 'HARM_CATEGORY_SEXUALLY_EXPLICIT' | 'HARM_CATEGORY_DANGEROUS_CONTENT' | Expression<string>;
|
|
45
|
+
/** The threshold of harmful content to block
|
|
46
|
+
* @default HARM_BLOCK_THRESHOLD_UNSPECIFIED
|
|
47
|
+
*/
|
|
48
|
+
threshold?: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' | 'BLOCK_LOW_AND_ABOVE' | 'BLOCK_MEDIUM_AND_ABOVE' | 'BLOCK_ONLY_HIGH' | 'BLOCK_NONE' | Expression<string>;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface LcLmChatGoogleGeminiV11Credentials {
|
|
55
|
+
googlePalmApi: CredentialReference;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface LcLmChatGoogleGeminiV11NodeBase {
|
|
59
|
+
type: '@n8n/n8n-nodes-langchain.lmChatGoogleGemini';
|
|
60
|
+
version: 1.1;
|
|
61
|
+
credentials?: LcLmChatGoogleGeminiV11Credentials;
|
|
62
|
+
isTrigger: true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type LcLmChatGoogleGeminiV11ParamsNode = LcLmChatGoogleGeminiV11NodeBase & {
|
|
66
|
+
config: NodeConfig<LcLmChatGoogleGeminiV11Params>;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type LcLmChatGoogleGeminiV11Node = LcLmChatGoogleGeminiV11ParamsNode;
|