@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
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d1b5a181360789678a71136cec1013378fc324675abae78514756e24bbc3a6f0
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
* Re-exports all version-specific types and provides combined union type.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { LcGoogleGeminiV12Node } from './v12';
|
|
7
8
|
import type { LcGoogleGeminiV11Node } from './v11';
|
|
8
9
|
import type { LcGoogleGeminiV1Node } from './v1';
|
|
9
10
|
|
|
11
|
+
export * from './v12';
|
|
10
12
|
export * from './v11';
|
|
11
13
|
export * from './v1';
|
|
12
14
|
|
|
13
15
|
// Combined union type for all versions
|
|
14
|
-
export type LcGoogleGeminiNode = LcGoogleGeminiV11Node | LcGoogleGeminiV1Node;
|
|
16
|
+
export type LcGoogleGeminiNode = LcGoogleGeminiV12Node | LcGoogleGeminiV11Node | LcGoogleGeminiV1Node;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema Factory
|
|
3
|
+
* Exports a factory that unions all discriminator schemas.
|
|
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 getAudioSchema = require('./resource_audio/index.schema');
|
|
12
|
+
const getDocumentSchema = require('./resource_document/index.schema');
|
|
13
|
+
const getFileSearchSchema = require('./resource_file_search/index.schema');
|
|
14
|
+
const getImageSchema = require('./resource_image/index.schema');
|
|
15
|
+
const getFileSchema = require('./resource_file/index.schema');
|
|
16
|
+
const getTextSchema = require('./resource_text/index.schema');
|
|
17
|
+
const getVideoSchema = require('./resource_video/index.schema');
|
|
18
|
+
|
|
19
|
+
module.exports = function getSchema(helpers) {
|
|
20
|
+
const { parameters, z } = helpers;
|
|
21
|
+
// Apply discriminator default if not set
|
|
22
|
+
const effectiveParams = parameters.resource === undefined ? { ...parameters, resource: 'text' } : parameters;
|
|
23
|
+
return z.union([
|
|
24
|
+
getAudioSchema({ ...helpers, parameters: effectiveParams }),
|
|
25
|
+
getDocumentSchema({ ...helpers, parameters: effectiveParams }),
|
|
26
|
+
getFileSearchSchema({ ...helpers, parameters: effectiveParams }),
|
|
27
|
+
getImageSchema({ ...helpers, parameters: effectiveParams }),
|
|
28
|
+
getFileSchema({ ...helpers, parameters: effectiveParams }),
|
|
29
|
+
getTextSchema({ ...helpers, parameters: effectiveParams }),
|
|
30
|
+
getVideoSchema({ ...helpers, parameters: effectiveParams }),
|
|
31
|
+
]);
|
|
32
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Re-exports all discriminator combinations.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12AudioNode } from './resource_audio';
|
|
7
|
+
import type { LcGoogleGeminiV12DocumentNode } from './resource_document';
|
|
8
|
+
import type { LcGoogleGeminiV12FileSearchNode } from './resource_file_search';
|
|
9
|
+
import type { LcGoogleGeminiV12ImageNode } from './resource_image';
|
|
10
|
+
import type { LcGoogleGeminiV12FileNode } from './resource_file';
|
|
11
|
+
import type { LcGoogleGeminiV12TextNode } from './resource_text';
|
|
12
|
+
import type { LcGoogleGeminiV12VideoNode } from './resource_video';
|
|
13
|
+
|
|
14
|
+
export * from './resource_audio';
|
|
15
|
+
export * from './resource_document';
|
|
16
|
+
export * from './resource_file_search';
|
|
17
|
+
export * from './resource_image';
|
|
18
|
+
export * from './resource_file';
|
|
19
|
+
export * from './resource_text';
|
|
20
|
+
export * from './resource_video';
|
|
21
|
+
|
|
22
|
+
export type LcGoogleGeminiV12Node =
|
|
23
|
+
| LcGoogleGeminiV12AudioNode
|
|
24
|
+
| LcGoogleGeminiV12DocumentNode
|
|
25
|
+
| LcGoogleGeminiV12FileSearchNode
|
|
26
|
+
| LcGoogleGeminiV12ImageNode
|
|
27
|
+
| LcGoogleGeminiV12FileNode
|
|
28
|
+
| LcGoogleGeminiV12TextNode
|
|
29
|
+
| LcGoogleGeminiV12VideoNode
|
|
30
|
+
;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Audio 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 getTranscribeSchema = require('./operation_transcribe.schema');
|
|
13
|
+
|
|
14
|
+
module.exports = function getSchema(helpers) {
|
|
15
|
+
const { parameters, z } = helpers;
|
|
16
|
+
// Apply operation default if not set
|
|
17
|
+
const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'transcribe' } : parameters;
|
|
18
|
+
return z.union([
|
|
19
|
+
getAnalyzeSchema({ ...helpers, parameters: effectiveParams }),
|
|
20
|
+
getTranscribeSchema({ ...helpers, parameters: effectiveParams }),
|
|
21
|
+
]);
|
|
22
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_audio/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Audio Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12AudioAnalyzeNode } from './operation_analyze';
|
|
7
|
+
import type { LcGoogleGeminiV12AudioTranscribeNode } from './operation_transcribe';
|
|
8
|
+
|
|
9
|
+
export * from './operation_analyze';
|
|
10
|
+
export * from './operation_transcribe';
|
|
11
|
+
|
|
12
|
+
export type LcGoogleGeminiV12AudioNode =
|
|
13
|
+
| LcGoogleGeminiV12AudioAnalyzeNode
|
|
14
|
+
| LcGoogleGeminiV12AudioTranscribeNode
|
|
15
|
+
;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=audio, 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('audio'),
|
|
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
|
+
audioUrls: 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=audio, 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 LcGoogleGeminiV12AudioAnalyzeParams = {
|
|
13
|
+
resource: 'audio';
|
|
14
|
+
operation: 'analyze';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod audioModelSearch
|
|
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 audio?
|
|
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 audio(s) to analyze, multiple URLs can be added separated by comma
|
|
33
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
34
|
+
*/
|
|
35
|
+
audioUrls?: string | Expression<string> | PlaceholderValue;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the binary field(s) which contains the audio(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 audio description
|
|
54
|
+
* @default 300
|
|
55
|
+
*/
|
|
56
|
+
maxOutputTokens?: number | Expression<number>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export interface LcGoogleGeminiV12AudioAnalyzeSubnodeConfig {
|
|
61
|
+
tools?: ToolInstance[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type LcGoogleGeminiV12AudioAnalyzeNode = {
|
|
65
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
66
|
+
version: 1.2;
|
|
67
|
+
credentials?: Credentials;
|
|
68
|
+
config: NodeConfig<LcGoogleGeminiV12AudioAnalyzeParams> & { subnodes?: LcGoogleGeminiV12AudioAnalyzeSubnodeConfig };
|
|
69
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=audio, operation=transcribe
|
|
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('audio'),
|
|
23
|
+
operation: z.literal('transcribe').default('transcribe'),
|
|
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
|
+
inputType: z.union([z.literal('url'), z.literal('binary'), expressionSchema]).optional(),
|
|
26
|
+
audioUrls: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["url"]}}, defaults: {"inputType":"url"} }),
|
|
27
|
+
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["binary"]}}, defaults: {"inputType":"url"} }),
|
|
28
|
+
simplify: booleanOrExpression.optional(),
|
|
29
|
+
options: z.object({ startTime: stringOrExpression.optional(), endTime: stringOrExpression.optional() }).optional(),
|
|
30
|
+
}).optional(),
|
|
31
|
+
subnodes: subnodesSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=audio, operation=transcribe
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Transcribes audio into the text */
|
|
12
|
+
export type LcGoogleGeminiV12AudioTranscribeParams = {
|
|
13
|
+
resource: 'audio';
|
|
14
|
+
operation: 'transcribe';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod audioModelSearch
|
|
18
|
+
* @default {"mode":"list","value":""}
|
|
19
|
+
*/
|
|
20
|
+
modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
/**
|
|
22
|
+
* Input Type
|
|
23
|
+
* @default url
|
|
24
|
+
*/
|
|
25
|
+
inputType?: 'url' | 'binary' | Expression<string>;
|
|
26
|
+
/**
|
|
27
|
+
* URL(s) of the audio(s) to transcribe, multiple URLs can be added separated by comma
|
|
28
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
29
|
+
*/
|
|
30
|
+
audioUrls?: string | Expression<string> | PlaceholderValue;
|
|
31
|
+
/**
|
|
32
|
+
* Name of the binary field(s) which contains the audio(s), seperate multiple field names with commas
|
|
33
|
+
* @hint The name of the input field containing the binary file data to be processed
|
|
34
|
+
* @displayOptions.show { inputType: ["binary"] }
|
|
35
|
+
* @default data
|
|
36
|
+
*/
|
|
37
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
38
|
+
/**
|
|
39
|
+
* Whether to simplify the response or not
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
simplify?: boolean | Expression<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Options
|
|
45
|
+
* @default {}
|
|
46
|
+
*/
|
|
47
|
+
options?: {
|
|
48
|
+
/** The start time of the audio in MM:SS or HH:MM:SS format
|
|
49
|
+
*/
|
|
50
|
+
startTime?: string | Expression<string> | PlaceholderValue;
|
|
51
|
+
/** The end time of the audio in MM:SS or HH:MM:SS format
|
|
52
|
+
*/
|
|
53
|
+
endTime?: string | Expression<string> | PlaceholderValue;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export interface LcGoogleGeminiV12AudioTranscribeSubnodeConfig {
|
|
58
|
+
tools?: ToolInstance[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type LcGoogleGeminiV12AudioTranscribeNode = {
|
|
62
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
63
|
+
version: 1.2;
|
|
64
|
+
credentials?: Credentials;
|
|
65
|
+
config: NodeConfig<LcGoogleGeminiV12AudioTranscribeParams> & { subnodes?: LcGoogleGeminiV12AudioTranscribeSubnodeConfig };
|
|
66
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Document 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
|
+
|
|
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 getAnalyzeSchema({ ...helpers, parameters: effectiveParams });
|
|
18
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_document/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - Document Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12DocumentAnalyzeNode } from './operation_analyze';
|
|
7
|
+
|
|
8
|
+
export * from './operation_analyze';
|
|
9
|
+
|
|
10
|
+
export type LcGoogleGeminiV12DocumentNode = LcGoogleGeminiV12DocumentAnalyzeNode;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=document, 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('document'),
|
|
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
|
+
documentUrls: 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=document, 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 LcGoogleGeminiV12DocumentAnalyzeParams = {
|
|
13
|
+
resource: 'document';
|
|
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 document?
|
|
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 document(s) to analyze, multiple URLs can be added separated by comma
|
|
33
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
34
|
+
*/
|
|
35
|
+
documentUrls?: string | Expression<string> | PlaceholderValue;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the binary field(s) which contains the document(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 document description
|
|
54
|
+
* @default 300
|
|
55
|
+
*/
|
|
56
|
+
maxOutputTokens?: number | Expression<number>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export interface LcGoogleGeminiV12DocumentAnalyzeSubnodeConfig {
|
|
61
|
+
tools?: ToolInstance[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type LcGoogleGeminiV12DocumentAnalyzeNode = {
|
|
65
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
66
|
+
version: 1.2;
|
|
67
|
+
credentials?: Credentials;
|
|
68
|
+
config: NodeConfig<LcGoogleGeminiV12DocumentAnalyzeParams> & { subnodes?: LcGoogleGeminiV12DocumentAnalyzeSubnodeConfig };
|
|
69
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - File 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 getUploadSchema = require('./operation_upload.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 getUploadSchema({ ...helpers, parameters: effectiveParams });
|
|
18
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/googleGemini/v12/resource_file/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - File Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12FileUploadNode } from './operation_upload';
|
|
7
|
+
|
|
8
|
+
export * from './operation_upload';
|
|
9
|
+
|
|
10
|
+
export type LcGoogleGeminiV12FileNode = LcGoogleGeminiV12FileUploadNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=file, operation=upload
|
|
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('file'),
|
|
23
|
+
operation: z.literal('upload'),
|
|
24
|
+
inputType: z.union([z.literal('url'), z.literal('binary'), expressionSchema]).optional(),
|
|
25
|
+
fileUrl: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["url"]}}, defaults: {"inputType":"url"} }),
|
|
26
|
+
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["binary"]}}, defaults: {"inputType":"url"} }),
|
|
27
|
+
}).optional(),
|
|
28
|
+
subnodes: subnodesSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2
|
|
3
|
+
* Discriminator: resource=file, operation=upload
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
googlePalmApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Upload a file to the Google Gemini API for later use */
|
|
12
|
+
export type LcGoogleGeminiV12FileUploadParams = {
|
|
13
|
+
resource: 'file';
|
|
14
|
+
operation: 'upload';
|
|
15
|
+
/**
|
|
16
|
+
* Input Type
|
|
17
|
+
* @default url
|
|
18
|
+
*/
|
|
19
|
+
inputType?: 'url' | 'binary' | Expression<string>;
|
|
20
|
+
/**
|
|
21
|
+
* URL of the file to upload
|
|
22
|
+
* @displayOptions.show { inputType: ["url"] }
|
|
23
|
+
*/
|
|
24
|
+
fileUrl?: string | Expression<string> | PlaceholderValue;
|
|
25
|
+
/**
|
|
26
|
+
* Name of the binary property which contains the file
|
|
27
|
+
* @hint The name of the input field containing the binary file data to be processed
|
|
28
|
+
* @displayOptions.show { inputType: ["binary"] }
|
|
29
|
+
* @default data
|
|
30
|
+
*/
|
|
31
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export interface LcGoogleGeminiV12FileUploadSubnodeConfig {
|
|
35
|
+
tools?: ToolInstance[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type LcGoogleGeminiV12FileUploadNode = {
|
|
39
|
+
type: '@n8n/n8n-nodes-langchain.googleGemini';
|
|
40
|
+
version: 1.2;
|
|
41
|
+
credentials?: Credentials;
|
|
42
|
+
config: NodeConfig<LcGoogleGeminiV12FileUploadParams> & { subnodes?: LcGoogleGeminiV12FileUploadSubnodeConfig };
|
|
43
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - FileSearch 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 getCreateStoreSchema = require('./operation_create_store.schema');
|
|
12
|
+
const getDeleteStoreSchema = require('./operation_delete_store.schema');
|
|
13
|
+
const getListStoresSchema = require('./operation_list_stores.schema');
|
|
14
|
+
const getUploadToStoreSchema = require('./operation_upload_to_store.schema');
|
|
15
|
+
|
|
16
|
+
module.exports = function getSchema(helpers) {
|
|
17
|
+
const { parameters, z } = helpers;
|
|
18
|
+
// Apply operation default if not set
|
|
19
|
+
const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'transcribe' } : parameters;
|
|
20
|
+
return z.union([
|
|
21
|
+
getCreateStoreSchema({ ...helpers, parameters: effectiveParams }),
|
|
22
|
+
getDeleteStoreSchema({ ...helpers, parameters: effectiveParams }),
|
|
23
|
+
getListStoresSchema({ ...helpers, parameters: effectiveParams }),
|
|
24
|
+
getUploadToStoreSchema({ ...helpers, parameters: effectiveParams }),
|
|
25
|
+
]);
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini - FileSearch Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcGoogleGeminiV12FileSearchCreateStoreNode } from './operation_create_store';
|
|
7
|
+
import type { LcGoogleGeminiV12FileSearchDeleteStoreNode } from './operation_delete_store';
|
|
8
|
+
import type { LcGoogleGeminiV12FileSearchListStoresNode } from './operation_list_stores';
|
|
9
|
+
import type { LcGoogleGeminiV12FileSearchUploadToStoreNode } from './operation_upload_to_store';
|
|
10
|
+
|
|
11
|
+
export * from './operation_create_store';
|
|
12
|
+
export * from './operation_delete_store';
|
|
13
|
+
export * from './operation_list_stores';
|
|
14
|
+
export * from './operation_upload_to_store';
|
|
15
|
+
|
|
16
|
+
export type LcGoogleGeminiV12FileSearchNode =
|
|
17
|
+
| LcGoogleGeminiV12FileSearchCreateStoreNode
|
|
18
|
+
| LcGoogleGeminiV12FileSearchDeleteStoreNode
|
|
19
|
+
| LcGoogleGeminiV12FileSearchListStoresNode
|
|
20
|
+
| LcGoogleGeminiV12FileSearchUploadToStoreNode
|
|
21
|
+
;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini Node - Version 1.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=fileSearch, operation=createStore
|
|
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('createStore'),
|
|
24
|
+
displayName: stringOrExpression.optional(),
|
|
25
|
+
}).optional(),
|
|
26
|
+
subnodes: subnodesSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
};
|