@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,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=createStore
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Create a new File Search store for RAG (Retrieval Augmented Generation) */
|
|
12
|
+
export type LcGoogleGeminiV12FileSearchCreateStoreParams = {
|
|
13
|
+
resource: 'fileSearch';
|
|
14
|
+
operation: 'createStore';
|
|
15
|
+
/**
|
|
16
|
+
* A human-readable name for the File Search store
|
|
17
|
+
*/
|
|
18
|
+
displayName?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export interface LcGoogleGeminiV12FileSearchCreateStoreSubnodeConfig {
|
|
22
|
+
tools?: ToolInstance[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type LcGoogleGeminiV12FileSearchCreateStoreNode = {
|
|
26
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
27
|
+
version: 1.2;
|
|
28
|
+
credentials?: Credentials;
|
|
29
|
+
config: NodeConfig<LcGoogleGeminiV12FileSearchCreateStoreParams> & { subnodes?: LcGoogleGeminiV12FileSearchCreateStoreSubnodeConfig };
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=deleteStore
|
|
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('fileSearch'),
|
|
23
|
+
operation: z.literal('deleteStore'),
|
|
24
|
+
fileSearchStoreName: stringOrExpression.optional(),
|
|
25
|
+
force: booleanOrExpression.optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=deleteStore
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Delete a File Search store */
|
|
12
|
+
export type LcGoogleGeminiV12FileSearchDeleteStoreParams = {
|
|
13
|
+
resource: 'fileSearch';
|
|
14
|
+
operation: 'deleteStore';
|
|
15
|
+
/**
|
|
16
|
+
* The full name of the File Search store to delete (format: fileSearchStores/...)
|
|
17
|
+
*/
|
|
18
|
+
fileSearchStoreName?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to delete related Documents and objects. If false, deletion will fail if the store contains any Documents.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
force?: boolean | Expression<boolean>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export interface LcGoogleGeminiV12FileSearchDeleteStoreSubnodeConfig {
|
|
27
|
+
tools?: ToolInstance[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type LcGoogleGeminiV12FileSearchDeleteStoreNode = {
|
|
31
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
32
|
+
version: 1.2;
|
|
33
|
+
credentials?: Credentials;
|
|
34
|
+
config: NodeConfig<LcGoogleGeminiV12FileSearchDeleteStoreParams> & { subnodes?: LcGoogleGeminiV12FileSearchDeleteStoreSubnodeConfig };
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=listStores
|
|
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('fileSearch'),
|
|
23
|
+
operation: z.literal('listStores'),
|
|
24
|
+
pageSize: numberOrExpression.optional(),
|
|
25
|
+
pageToken: stringOrExpression.optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=listStores
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** List all File Search stores owned by the user */
|
|
12
|
+
export type LcGoogleGeminiV12FileSearchListStoresParams = {
|
|
13
|
+
resource: 'fileSearch';
|
|
14
|
+
operation: 'listStores';
|
|
15
|
+
/**
|
|
16
|
+
* Maximum number of File Search stores to return per page (max 20)
|
|
17
|
+
* @default 10
|
|
18
|
+
*/
|
|
19
|
+
pageSize?: number | Expression<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Token from a previous page to retrieve the next page of results
|
|
22
|
+
*/
|
|
23
|
+
pageToken?: string | Expression<string> | PlaceholderValue;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export interface LcGoogleGeminiV12FileSearchListStoresSubnodeConfig {
|
|
27
|
+
tools?: ToolInstance[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type LcGoogleGeminiV12FileSearchListStoresNode = {
|
|
31
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
32
|
+
version: 1.2;
|
|
33
|
+
credentials?: Credentials;
|
|
34
|
+
config: NodeConfig<LcGoogleGeminiV12FileSearchListStoresParams> & { subnodes?: LcGoogleGeminiV12FileSearchListStoresSubnodeConfig };
|
|
35
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=uploadToStore
|
|
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('fileSearch'),
|
|
23
|
+
operation: z.literal('uploadToStore'),
|
|
24
|
+
fileSearchStoreName: stringOrExpression.optional(),
|
|
25
|
+
displayName: stringOrExpression.optional(),
|
|
26
|
+
inputType: z.union([z.literal('url'), z.literal('binary'), expressionSchema]).optional(),
|
|
27
|
+
fileUrl: 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
|
+
}).optional(),
|
|
30
|
+
subnodes: subnodesSchema.optional(),
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=uploadToStore
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Upload a file to a File Search store for RAG (Retrieval Augmented Generation) */
|
|
12
|
+
export type LcGoogleGeminiV12FileSearchUploadToStoreParams = {
|
|
13
|
+
resource: 'fileSearch';
|
|
14
|
+
operation: 'uploadToStore';
|
|
15
|
+
/**
|
|
16
|
+
* The full name of the File Search store to upload to (format: fileSearchStores/...)
|
|
17
|
+
*/
|
|
18
|
+
fileSearchStoreName?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
/**
|
|
20
|
+
* A human-readable name for the file (will be visible in citations)
|
|
21
|
+
*/
|
|
22
|
+
displayName?: string | Expression<string> | PlaceholderValue;
|
|
23
|
+
/**
|
|
24
|
+
* Input Type
|
|
25
|
+
* @default url
|
|
26
|
+
*/
|
|
27
|
+
inputType?: 'url' | 'binary' | Expression<string>;
|
|
28
|
+
/**
|
|
29
|
+
* URL of the file to upload
|
|
30
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
31
|
+
*/
|
|
32
|
+
fileUrl?: string | Expression<string> | PlaceholderValue;
|
|
33
|
+
/**
|
|
34
|
+
* Name of the binary property which contains the file
|
|
35
|
+
* @hint The name of the input field containing the binary file data to be processed
|
|
36
|
+
* @displayOptions.show { inputType: ["binary"] }
|
|
37
|
+
* @default data
|
|
38
|
+
*/
|
|
39
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export interface LcGoogleGeminiV12FileSearchUploadToStoreSubnodeConfig {
|
|
43
|
+
tools?: ToolInstance[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type LcGoogleGeminiV12FileSearchUploadToStoreNode = {
|
|
47
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
48
|
+
version: 1.2;
|
|
49
|
+
credentials?: Credentials;
|
|
50
|
+
config: NodeConfig<LcGoogleGeminiV12FileSearchUploadToStoreParams> & { subnodes?: LcGoogleGeminiV12FileSearchUploadToStoreSubnodeConfig };
|
|
51
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Image 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 getEditSchema = require('./operation_edit.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
|
+
getEditSchema({ ...helpers, parameters: effectiveParams }),
|
|
22
|
+
getGenerateSchema({ ...helpers, parameters: effectiveParams }),
|
|
23
|
+
]);
|
|
24
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_image/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Image Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12ImageAnalyzeNode } from './operation_analyze';
|
|
7
|
+
import type { LcGoogleGeminiV12ImageEditNode } from './operation_edit';
|
|
8
|
+
import type { LcGoogleGeminiV12ImageGenerateNode } from './operation_generate';
|
|
9
|
+
|
|
10
|
+
export * from './operation_analyze';
|
|
11
|
+
export * from './operation_edit';
|
|
12
|
+
export * from './operation_generate';
|
|
13
|
+
|
|
14
|
+
export type LcGoogleGeminiV12ImageNode =
|
|
15
|
+
| LcGoogleGeminiV12ImageAnalyzeNode
|
|
16
|
+
| LcGoogleGeminiV12ImageEditNode
|
|
17
|
+
| LcGoogleGeminiV12ImageGenerateNode
|
|
18
|
+
;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=image, 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('image'),
|
|
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
|
+
imageUrls: 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=image, 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 LcGoogleGeminiV12ImageAnalyzeParams = {
|
|
13
|
+
resource: 'image';
|
|
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 image?
|
|
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 image(s) to analyze, multiple URLs can be added separated by comma
|
|
33
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
34
|
+
*/
|
|
35
|
+
imageUrls?: string | Expression<string> | PlaceholderValue;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the binary field(s) which contains the image(s), separate 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 image description
|
|
54
|
+
* @default 300
|
|
55
|
+
*/
|
|
56
|
+
maxOutputTokens?: number | Expression<number>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export interface LcGoogleGeminiV12ImageAnalyzeSubnodeConfig {
|
|
61
|
+
tools?: ToolInstance[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type LcGoogleGeminiV12ImageAnalyzeNode = {
|
|
65
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
66
|
+
version: 1.2;
|
|
67
|
+
credentials?: Credentials;
|
|
68
|
+
config: NodeConfig<LcGoogleGeminiV12ImageAnalyzeParams> & { subnodes?: LcGoogleGeminiV12ImageAnalyzeSubnodeConfig };
|
|
69
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=image, operation=edit
|
|
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('image'),
|
|
23
|
+
operation: z.literal('edit'),
|
|
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
|
+
images: z.object({ values: z.array(z.object({ binaryPropertyName: stringOrExpression.optional() })).optional() }).optional(),
|
|
27
|
+
options: z.object({ binaryPropertyOutput: stringOrExpression.optional() }).optional(),
|
|
28
|
+
}).optional(),
|
|
29
|
+
subnodes: subnodesSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=image, operation=edit
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Upload one or more images and apply edits based on a prompt */
|
|
12
|
+
export type LcGoogleGeminiV12ImageEditParams = {
|
|
13
|
+
resource: 'image';
|
|
14
|
+
operation: 'edit';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod imageEditModelSearch
|
|
18
|
+
* @default {"mode":"list","value":""}
|
|
19
|
+
*/
|
|
20
|
+
modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
/**
|
|
22
|
+
* Instruction describing how to edit the image
|
|
23
|
+
*/
|
|
24
|
+
prompt?: string | Expression<string> | PlaceholderValue;
|
|
25
|
+
/**
|
|
26
|
+
* Add one or more binary fields to include images with your prompt
|
|
27
|
+
* @default {"values":[{"binaryPropertyName":"data"}]}
|
|
28
|
+
*/
|
|
29
|
+
images?: {
|
|
30
|
+
/** Image
|
|
31
|
+
*/
|
|
32
|
+
values?: Array<{
|
|
33
|
+
/** The name of the binary field containing the image data
|
|
34
|
+
* @default data
|
|
35
|
+
*/
|
|
36
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Options
|
|
41
|
+
* @default {}
|
|
42
|
+
*/
|
|
43
|
+
options?: {
|
|
44
|
+
/** Put Output in Field
|
|
45
|
+
* @hint The name of the output field to put the binary file data in
|
|
46
|
+
* @default edited
|
|
47
|
+
*/
|
|
48
|
+
binaryPropertyOutput?: string | Expression<string> | PlaceholderValue;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export interface LcGoogleGeminiV12ImageEditSubnodeConfig {
|
|
53
|
+
tools?: ToolInstance[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type LcGoogleGeminiV12ImageEditNode = {
|
|
57
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
58
|
+
version: 1.2;
|
|
59
|
+
credentials?: Credentials;
|
|
60
|
+
config: NodeConfig<LcGoogleGeminiV12ImageEditParams> & { subnodes?: LcGoogleGeminiV12ImageEditSubnodeConfig };
|
|
61
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=image, 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('image'),
|
|
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
|
+
options: z.object({ sampleCount: numberOrExpression.optional(), binaryPropertyOutput: stringOrExpression.optional() }).optional(),
|
|
27
|
+
}).optional(),
|
|
28
|
+
subnodes: subnodesSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=image, operation=generate
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Creates an image from a text prompt */
|
|
12
|
+
export type LcGoogleGeminiV12ImageGenerateParams = {
|
|
13
|
+
resource: 'image';
|
|
14
|
+
operation: 'generate';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod imageGenerationModelSearch
|
|
18
|
+
* @default {"mode":"list","value":"models/gemini-3.1-flash-image-preview"}
|
|
19
|
+
*/
|
|
20
|
+
modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
/**
|
|
22
|
+
* A text description of the desired image(s)
|
|
23
|
+
*/
|
|
24
|
+
prompt?: string | Expression<string> | PlaceholderValue;
|
|
25
|
+
/**
|
|
26
|
+
* Options
|
|
27
|
+
* @default {}
|
|
28
|
+
*/
|
|
29
|
+
options?: {
|
|
30
|
+
/** Number of images to generate. Not supported by Gemini models, supported by Imagen models.
|
|
31
|
+
* @default 1
|
|
32
|
+
*/
|
|
33
|
+
sampleCount?: number | Expression<number>;
|
|
34
|
+
/** Put Output in Field
|
|
35
|
+
* @hint The name of the output field to put the binary file data in
|
|
36
|
+
* @default data
|
|
37
|
+
*/
|
|
38
|
+
binaryPropertyOutput?: string | Expression<string> | PlaceholderValue;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export interface LcGoogleGeminiV12ImageGenerateSubnodeConfig {
|
|
43
|
+
tools?: ToolInstance[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type LcGoogleGeminiV12ImageGenerateNode = {
|
|
47
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
48
|
+
version: 1.2;
|
|
49
|
+
credentials?: Credentials;
|
|
50
|
+
config: NodeConfig<LcGoogleGeminiV12ImageGenerateParams> & { subnodes?: LcGoogleGeminiV12ImageGenerateSubnodeConfig };
|
|
51
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Text 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 getMessageSchema = require('./operation_message.schema');
|
|
12
|
+
|
|
13
|
+
module.exports = function getSchema(helpers) {
|
|
14
|
+
const { parameters, z } = helpers;
|
|
15
|
+
// Apply operation default if not set
|
|
16
|
+
const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'transcribe' } : parameters;
|
|
17
|
+
return getMessageSchema({ ...helpers, parameters: effectiveParams });
|
|
18
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_text/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Text Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12TextMessageNode } from './operation_message';
|
|
7
|
+
|
|
8
|
+
export * from './operation_message';
|
|
9
|
+
|
|
10
|
+
export type LcGoogleGeminiV12TextNode = LcGoogleGeminiV12TextMessageNode;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=text, operation=message
|
|
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('text').default('text'),
|
|
23
|
+
operation: z.literal('message'),
|
|
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
|
+
messages: z.object({ values: z.array(z.object({ content: stringOrExpression.optional(), role: z.union([z.literal('user'), z.literal('model'), expressionSchema]).optional() })).optional() }).optional(),
|
|
26
|
+
simplify: booleanOrExpression.optional(),
|
|
27
|
+
jsonOutput: booleanOrExpression.optional(),
|
|
28
|
+
builtInTools: z.object({ googleSearch: booleanOrExpression.optional(), googleMaps: z.unknown().optional(), urlContext: booleanOrExpression.optional(), fileSearch: z.unknown().optional(), codeExecution: booleanOrExpression.optional() }).optional(),
|
|
29
|
+
options: z.object({ includeMergedResponse: booleanOrExpression.optional(), systemMessage: stringOrExpression.optional(), codeExecution: booleanOrExpression.optional(), frequencyPenalty: numberOrExpression.optional(), maxOutputTokens: numberOrExpression.optional(), candidateCount: numberOrExpression.optional(), presencePenalty: numberOrExpression.optional(), temperature: numberOrExpression.optional(), topP: numberOrExpression.optional(), topK: numberOrExpression.optional(), thinkingBudget: numberOrExpression.optional(), maxToolsIterations: numberOrExpression.optional() }).optional(),
|
|
30
|
+
}).optional(),
|
|
31
|
+
subnodes: subnodesSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
};
|