@n8n/n8n-nodes-langchain 2.18.1 → 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/known/credentials.json +1 -0
- package/dist/known/nodes.json +4 -0
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/index.ts +4 -0
- 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/node-definitions/nodes/n8n-nodes-langchain/minimax/index.ts +12 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/index.schema.js +26 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/index.ts +21 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/operation_text_to_speech.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/operation_text_to_speech.ts +75 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/operation_generate.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/operation_generate.ts +64 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/operation_message.schema.js +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/operation_message.ts +82 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/index.schema.js +22 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/index.ts +15 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_image_to_video.schema.js +36 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_image_to_video.ts +103 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_text_to_video.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/operation_text_to_video.ts +60 -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/nodes/vendors/MiniMax/MiniMax.node.d.ts +5 -0
- package/dist/nodes/vendors/MiniMax/MiniMax.node.js +15 -0
- package/dist/nodes/vendors/MiniMax/MiniMax.node.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/audio/index.d.ts +4 -0
- package/dist/nodes/vendors/MiniMax/actions/audio/index.js +62 -0
- package/dist/nodes/vendors/MiniMax/actions/audio/index.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/audio/tts.operation.d.ts +29 -0
- package/dist/nodes/vendors/MiniMax/actions/audio/tts.operation.js +252 -0
- package/dist/nodes/vendors/MiniMax/actions/audio/tts.operation.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/image/generate.operation.d.ts +29 -0
- package/dist/nodes/vendors/MiniMax/actions/image/generate.operation.js +159 -0
- package/dist/nodes/vendors/MiniMax/actions/image/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/image/index.d.ts +4 -0
- package/dist/nodes/vendors/MiniMax/actions/image/index.js +62 -0
- package/dist/nodes/vendors/MiniMax/actions/image/index.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/node.type.d.ts +9 -0
- package/dist/nodes/vendors/MiniMax/actions/node.type.js +3 -0
- package/dist/nodes/vendors/MiniMax/actions/node.type.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/router.d.ts +2 -0
- package/dist/nodes/vendors/MiniMax/actions/router.js +86 -0
- package/dist/nodes/vendors/MiniMax/actions/router.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/text/index.d.ts +4 -0
- package/dist/nodes/vendors/MiniMax/actions/text/index.js +62 -0
- package/dist/nodes/vendors/MiniMax/actions/text/index.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/text/message.operation.d.ts +29 -0
- package/dist/nodes/vendors/MiniMax/actions/text/message.operation.js +287 -0
- package/dist/nodes/vendors/MiniMax/actions/text/message.operation.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/versionDescription.d.ts +2 -0
- package/dist/nodes/vendors/MiniMax/actions/versionDescription.js +118 -0
- package/dist/nodes/vendors/MiniMax/actions/versionDescription.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.d.ts +29 -0
- package/dist/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.js +324 -0
- package/dist/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.d.ts +29 -0
- package/dist/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.js +161 -0
- package/dist/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/actions/video/index.d.ts +5 -0
- package/dist/nodes/vendors/MiniMax/actions/video/index.js +71 -0
- package/dist/nodes/vendors/MiniMax/actions/video/index.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/helpers/interfaces.d.ts +88 -0
- package/dist/nodes/vendors/MiniMax/helpers/interfaces.js +3 -0
- package/dist/nodes/vendors/MiniMax/helpers/interfaces.js.map +1 -0
- package/dist/nodes/vendors/MiniMax/minimax.svg +10 -0
- package/dist/nodes/vendors/MiniMax/transport/index.d.ts +14 -0
- package/dist/nodes/vendors/MiniMax/transport/index.js +60 -0
- package/dist/nodes/vendors/MiniMax/transport/index.js.map +1 -0
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/credentials.json +1 -1
- package/dist/types/nodes.json +3 -2
- package/package.json +10 -9
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1
|
|
3
|
+
* Re-exports all discriminator combinations.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcMinimaxV1AudioNode } from './resource_audio';
|
|
7
|
+
import type { LcMinimaxV1ImageNode } from './resource_image';
|
|
8
|
+
import type { LcMinimaxV1TextNode } from './resource_text';
|
|
9
|
+
import type { LcMinimaxV1VideoNode } from './resource_video';
|
|
10
|
+
|
|
11
|
+
export * from './resource_audio';
|
|
12
|
+
export * from './resource_image';
|
|
13
|
+
export * from './resource_text';
|
|
14
|
+
export * from './resource_video';
|
|
15
|
+
|
|
16
|
+
export type LcMinimaxV1Node =
|
|
17
|
+
| LcMinimaxV1AudioNode
|
|
18
|
+
| LcMinimaxV1ImageNode
|
|
19
|
+
| LcMinimaxV1TextNode
|
|
20
|
+
| LcMinimaxV1VideoNode
|
|
21
|
+
;
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_audio/index.schema.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - 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 getTextToSpeechSchema = require('./operation_text_to_speech.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: 'textToSpeech' } : parameters;
|
|
17
|
+
return getTextToSpeechSchema({ ...helpers, parameters: effectiveParams });
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - Audio Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcMinimaxV1AudioTextToSpeechNode } from './operation_text_to_speech';
|
|
7
|
+
|
|
8
|
+
export * from './operation_text_to_speech';
|
|
9
|
+
|
|
10
|
+
export type LcMinimaxV1AudioNode = LcMinimaxV1AudioTextToSpeechNode;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1 - Zod Schema
|
|
3
|
+
* Discriminator: resource=audio, operation=textToSpeech
|
|
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('audio'),
|
|
23
|
+
operation: z.literal('textToSpeech').default('textToSpeech'),
|
|
24
|
+
modelId: z.union([z.literal('speech-02-hd'), z.literal('speech-02-turbo'), z.literal('speech-2.6-hd'), z.literal('speech-2.6-turbo'), z.literal('speech-2.8-hd'), z.literal('speech-2.8-turbo'), expressionSchema]).optional(),
|
|
25
|
+
text: stringOrExpression.optional(),
|
|
26
|
+
voiceId: stringOrExpression.optional(),
|
|
27
|
+
downloadAudio: booleanOrExpression.optional(),
|
|
28
|
+
options: z.object({ audioFormat: z.union([z.literal('mp3'), z.literal('pcm'), z.literal('flac'), z.literal('wav'), expressionSchema]).optional(), emotion: z.union([z.literal('angry'), z.literal('calm'), z.literal('disgusted'), z.literal('fearful'), z.literal('happy'), z.literal('sad'), z.literal('surprised'), expressionSchema]).optional(), languageBoost: z.union([z.literal('Arabic'), z.literal('auto'), z.literal('Chinese'), z.literal('English'), z.literal('French'), z.literal('German'), z.literal('Indonesian'), z.literal('Italian'), z.literal('Japanese'), z.literal('Korean'), z.literal('Portuguese'), z.literal('Russian'), z.literal('Spanish'), z.literal('Thai'), z.literal('Turkish'), z.literal('Vietnamese'), expressionSchema]).optional(), pitch: numberOrExpression.optional(), speed: numberOrExpression.optional(), volume: numberOrExpression.optional() }).optional(),
|
|
29
|
+
}).optional(),
|
|
30
|
+
subnodes: subnodesSchema.optional(),
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1
|
|
3
|
+
* Discriminator: resource=audio, operation=textToSpeech
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
minimaxApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Generate speech audio from text input */
|
|
12
|
+
export type LcMinimaxV1AudioTextToSpeechParams = {
|
|
13
|
+
resource: 'audio';
|
|
14
|
+
operation: 'textToSpeech';
|
|
15
|
+
/**
|
|
16
|
+
* The speech synthesis model to use
|
|
17
|
+
* @default speech-2.8-hd
|
|
18
|
+
*/
|
|
19
|
+
modelId?: 'speech-02-hd' | 'speech-02-turbo' | 'speech-2.6-hd' | 'speech-2.6-turbo' | 'speech-2.8-hd' | 'speech-2.8-turbo' | Expression<string>;
|
|
20
|
+
/**
|
|
21
|
+
* The text to convert to speech (max 10,000 characters)
|
|
22
|
+
*/
|
|
23
|
+
text?: string | Expression<string> | PlaceholderValue;
|
|
24
|
+
/**
|
|
25
|
+
* Voice ID to use for speech synthesis. Browse available voices in the <a href="https://platform.minimax.io/docs/faq/system-voice-id">MiniMax documentation</a>.
|
|
26
|
+
* @default English_Graceful_Lady
|
|
27
|
+
*/
|
|
28
|
+
voiceId?: string | Expression<string> | PlaceholderValue;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to download the generated audio as binary data. When disabled, only the audio URL is returned.
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
downloadAudio?: boolean | Expression<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Options
|
|
36
|
+
* @default {}
|
|
37
|
+
*/
|
|
38
|
+
options?: {
|
|
39
|
+
/** Output audio format. WAV is only supported in non-streaming mode.
|
|
40
|
+
* @default mp3
|
|
41
|
+
*/
|
|
42
|
+
audioFormat?: 'mp3' | 'pcm' | 'flac' | 'wav' | Expression<string>;
|
|
43
|
+
/** Emotion for synthesized speech. By default the model auto-selects the most natural emotion.
|
|
44
|
+
* @default calm
|
|
45
|
+
*/
|
|
46
|
+
emotion?: 'angry' | 'calm' | 'disgusted' | 'fearful' | 'happy' | 'sad' | 'surprised' | Expression<string>;
|
|
47
|
+
/** Enhance recognition for a specific language
|
|
48
|
+
* @default auto
|
|
49
|
+
*/
|
|
50
|
+
languageBoost?: 'Arabic' | 'auto' | 'Chinese' | 'English' | 'French' | 'German' | 'Indonesian' | 'Italian' | 'Japanese' | 'Korean' | 'Portuguese' | 'Russian' | 'Spanish' | 'Thai' | 'Turkish' | 'Vietnamese' | Expression<string>;
|
|
51
|
+
/** Speech pitch adjustment (-12 to 12, 0 = original pitch)
|
|
52
|
+
* @default 0
|
|
53
|
+
*/
|
|
54
|
+
pitch?: number | Expression<number>;
|
|
55
|
+
/** Speech speed (0.5-2, higher = faster)
|
|
56
|
+
* @default 1
|
|
57
|
+
*/
|
|
58
|
+
speed?: number | Expression<number>;
|
|
59
|
+
/** Speech volume (0.1-10, higher = louder)
|
|
60
|
+
* @default 1
|
|
61
|
+
*/
|
|
62
|
+
volume?: number | Expression<number>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export interface LcMinimaxV1AudioTextToSpeechSubnodeConfig {
|
|
67
|
+
tools?: ToolInstance[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type LcMinimaxV1AudioTextToSpeechNode = {
|
|
71
|
+
type: '@n8n/n8n-nodes-langchain.minimax';
|
|
72
|
+
version: 1;
|
|
73
|
+
credentials?: Credentials;
|
|
74
|
+
config: NodeConfig<LcMinimaxV1AudioTextToSpeechParams> & { subnodes?: LcMinimaxV1AudioTextToSpeechSubnodeConfig };
|
|
75
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_image/index.schema.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - 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 getGenerateSchema = require('./operation_generate.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: 'textToSpeech' } : parameters;
|
|
17
|
+
return getGenerateSchema({ ...helpers, parameters: effectiveParams });
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - Image Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcMinimaxV1ImageGenerateNode } from './operation_generate';
|
|
7
|
+
|
|
8
|
+
export * from './operation_generate';
|
|
9
|
+
|
|
10
|
+
export type LcMinimaxV1ImageNode = LcMinimaxV1ImageGenerateNode;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1 - 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.literal('image-01'), expressionSchema]).optional(),
|
|
25
|
+
prompt: stringOrExpression.optional(),
|
|
26
|
+
aspectRatio: z.union([z.literal('1:1'), z.literal('16:9'), z.literal('2:3'), z.literal('21:9'), z.literal('3:2'), z.literal('3:4'), z.literal('4:3'), z.literal('9:16'), expressionSchema]).optional(),
|
|
27
|
+
numberOfImages: numberOrExpression.optional(),
|
|
28
|
+
downloadImage: booleanOrExpression.optional(),
|
|
29
|
+
options: z.object({ promptOptimizer: booleanOrExpression.optional(), seed: numberOrExpression.optional() }).optional(),
|
|
30
|
+
}).optional(),
|
|
31
|
+
subnodes: subnodesSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1
|
|
3
|
+
* Discriminator: resource=image, operation=generate
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
minimaxApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Create an image from a text prompt */
|
|
12
|
+
export type LcMinimaxV1ImageGenerateParams = {
|
|
13
|
+
resource: 'image';
|
|
14
|
+
operation: 'generate';
|
|
15
|
+
/**
|
|
16
|
+
* The model to use for image generation
|
|
17
|
+
* @default image-01
|
|
18
|
+
*/
|
|
19
|
+
modelId?: 'image-01' | Expression<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Text description of the image to generate (max 1500 characters)
|
|
22
|
+
*/
|
|
23
|
+
prompt?: string | Expression<string> | PlaceholderValue;
|
|
24
|
+
/**
|
|
25
|
+
* Aspect ratio of the generated image
|
|
26
|
+
* @default 1:1
|
|
27
|
+
*/
|
|
28
|
+
aspectRatio?: '1:1' | '16:9' | '2:3' | '21:9' | '3:2' | '3:4' | '4:3' | '9:16' | Expression<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Number of images to generate per request (1-9)
|
|
31
|
+
* @default 1
|
|
32
|
+
*/
|
|
33
|
+
numberOfImages?: number | Expression<number>;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to download the generated image as binary data. When disabled, only the image URL is returned.
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
downloadImage?: boolean | Expression<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Options
|
|
41
|
+
* @default {}
|
|
42
|
+
*/
|
|
43
|
+
options?: {
|
|
44
|
+
/** Whether to automatically optimize the prompt for better results
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
promptOptimizer?: boolean | Expression<boolean>;
|
|
48
|
+
/** Random seed for reproducible outputs. Using the same seed and parameters produces the same image.
|
|
49
|
+
* @default 0
|
|
50
|
+
*/
|
|
51
|
+
seed?: number | Expression<number>;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export interface LcMinimaxV1ImageGenerateSubnodeConfig {
|
|
56
|
+
tools?: ToolInstance[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type LcMinimaxV1ImageGenerateNode = {
|
|
60
|
+
type: '@n8n/n8n-nodes-langchain.minimax';
|
|
61
|
+
version: 1;
|
|
62
|
+
credentials?: Credentials;
|
|
63
|
+
config: NodeConfig<LcMinimaxV1ImageGenerateParams> & { subnodes?: LcMinimaxV1ImageGenerateSubnodeConfig };
|
|
64
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_text/index.schema.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - 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: 'textToSpeech' } : parameters;
|
|
17
|
+
return getMessageSchema({ ...helpers, parameters: effectiveParams });
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - Text Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcMinimaxV1TextMessageNode } from './operation_message';
|
|
7
|
+
|
|
8
|
+
export * from './operation_message';
|
|
9
|
+
|
|
10
|
+
export type LcMinimaxV1TextNode = LcMinimaxV1TextMessageNode;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1 - 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.literal('MiniMax-M2'), z.literal('MiniMax-M2.1'), z.literal('MiniMax-M2.1-highspeed'), z.literal('MiniMax-M2.5'), z.literal('MiniMax-M2.5-highspeed'), z.literal('MiniMax-M2.7'), z.literal('MiniMax-M2.7-highspeed'), expressionSchema]).optional(),
|
|
25
|
+
messages: z.object({ values: z.array(z.object({ content: stringOrExpression.optional(), role: z.union([z.literal('user'), z.literal('assistant'), expressionSchema]).optional() })).optional() }).optional(),
|
|
26
|
+
simplify: booleanOrExpression.optional(),
|
|
27
|
+
options: z.object({ hideThinking: booleanOrExpression.optional(), maxTokens: numberOrExpression.optional(), maxToolsIterations: numberOrExpression.optional(), temperature: numberOrExpression.optional(), topP: numberOrExpression.optional(), system: stringOrExpression.optional() }).optional(),
|
|
28
|
+
}).optional(),
|
|
29
|
+
subnodes: subnodesSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1
|
|
3
|
+
* Discriminator: resource=text, operation=message
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
minimaxApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Send a message and get a response from a MiniMax model */
|
|
12
|
+
export type LcMinimaxV1TextMessageParams = {
|
|
13
|
+
resource: 'text';
|
|
14
|
+
operation: 'message';
|
|
15
|
+
/**
|
|
16
|
+
* The model to use for generating the response
|
|
17
|
+
* @default MiniMax-M2.7
|
|
18
|
+
*/
|
|
19
|
+
modelId?: 'MiniMax-M2' | 'MiniMax-M2.1' | 'MiniMax-M2.1-highspeed' | 'MiniMax-M2.5' | 'MiniMax-M2.5-highspeed' | 'MiniMax-M2.7' | 'MiniMax-M2.7-highspeed' | Expression<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Messages
|
|
22
|
+
* @default {"values":[{"content":"","role":"user"}]}
|
|
23
|
+
*/
|
|
24
|
+
messages?: {
|
|
25
|
+
/** Values
|
|
26
|
+
*/
|
|
27
|
+
values?: Array<{
|
|
28
|
+
/** The content of the message to be sent
|
|
29
|
+
*/
|
|
30
|
+
content?: string | Expression<string> | PlaceholderValue;
|
|
31
|
+
/** Role in shaping the model's response, it tells the model how it should behave and interact with the user
|
|
32
|
+
* @default user
|
|
33
|
+
*/
|
|
34
|
+
role?: 'user' | 'assistant' | Expression<string>;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Whether to return a simplified version of the response instead of the raw data
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
simplify?: boolean | Expression<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Options
|
|
44
|
+
* @default {}
|
|
45
|
+
*/
|
|
46
|
+
options?: {
|
|
47
|
+
/** Whether to strip chain-of-thought reasoning from the response, returning only the final answer
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
hideThinking?: boolean | Expression<boolean>;
|
|
51
|
+
/** The maximum number of tokens to generate in the completion
|
|
52
|
+
* @default 1024
|
|
53
|
+
*/
|
|
54
|
+
maxTokens?: number | Expression<number>;
|
|
55
|
+
/** 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.
|
|
56
|
+
* @default 15
|
|
57
|
+
*/
|
|
58
|
+
maxToolsIterations?: number | Expression<number>;
|
|
59
|
+
/** Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.
|
|
60
|
+
* @default 0.7
|
|
61
|
+
*/
|
|
62
|
+
temperature?: number | Expression<number>;
|
|
63
|
+
/** The maximum cumulative probability of tokens to consider when sampling
|
|
64
|
+
* @default 0.95
|
|
65
|
+
*/
|
|
66
|
+
topP?: number | Expression<number>;
|
|
67
|
+
/** System Message
|
|
68
|
+
*/
|
|
69
|
+
system?: string | Expression<string> | PlaceholderValue;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export interface LcMinimaxV1TextMessageSubnodeConfig {
|
|
74
|
+
tools?: ToolInstance[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type LcMinimaxV1TextMessageNode = {
|
|
78
|
+
type: '@n8n/n8n-nodes-langchain.minimax';
|
|
79
|
+
version: 1;
|
|
80
|
+
credentials?: Credentials;
|
|
81
|
+
config: NodeConfig<LcMinimaxV1TextMessageParams> & { subnodes?: LcMinimaxV1TextMessageSubnodeConfig };
|
|
82
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/minimax/v1/resource_video/index.schema.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - 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 getImageToVideoSchema = require('./operation_image_to_video.schema');
|
|
12
|
+
const getTextToVideoSchema = require('./operation_text_to_video.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: 'textToSpeech' } : parameters;
|
|
18
|
+
return z.union([
|
|
19
|
+
getImageToVideoSchema({ ...helpers, parameters: effectiveParams }),
|
|
20
|
+
getTextToVideoSchema({ ...helpers, parameters: effectiveParams }),
|
|
21
|
+
]);
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax - Video Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcMinimaxV1VideoImageToVideoNode } from './operation_image_to_video';
|
|
7
|
+
import type { LcMinimaxV1VideoTextToVideoNode } from './operation_text_to_video';
|
|
8
|
+
|
|
9
|
+
export * from './operation_image_to_video';
|
|
10
|
+
export * from './operation_text_to_video';
|
|
11
|
+
|
|
12
|
+
export type LcMinimaxV1VideoNode =
|
|
13
|
+
| LcMinimaxV1VideoImageToVideoNode
|
|
14
|
+
| LcMinimaxV1VideoTextToVideoNode
|
|
15
|
+
;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1 - Zod Schema
|
|
3
|
+
* Discriminator: resource=video, operation=imageToVideo
|
|
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('imageToVideo'),
|
|
24
|
+
modelId: z.union([z.literal('I2V-01'), z.literal('I2V-01-Director'), z.literal('I2V-01-live'), z.literal('MiniMax-Hailuo-02'), z.literal('MiniMax-Hailuo-2.3'), z.literal('MiniMax-Hailuo-2.3-Fast'), expressionSchema]).optional(),
|
|
25
|
+
imageInputType: z.union([z.literal('url'), z.literal('binary'), expressionSchema]).optional(),
|
|
26
|
+
imageUrl: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"imageInputType":["url"]}}, defaults: {"imageInputType":"url"} }),
|
|
27
|
+
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"imageInputType":["binary"]}}, defaults: {"imageInputType":"url"} }),
|
|
28
|
+
prompt: stringOrExpression.optional(),
|
|
29
|
+
duration: z.union([z.literal(6), z.literal(10), expressionSchema]).optional(),
|
|
30
|
+
resolution: z.union([z.literal('512P'), z.literal('720P'), z.literal('768P'), z.literal('1080P'), expressionSchema]).optional(),
|
|
31
|
+
downloadVideo: booleanOrExpression.optional(),
|
|
32
|
+
options: z.object({ promptOptimizer: booleanOrExpression.optional(), lastFrameInputType: z.union([z.literal('none'), z.literal('url'), z.literal('binary'), expressionSchema]).optional(), lastFrameImageUrl: stringOrExpression.optional(), lastFrameBinaryPropertyName: stringOrExpression.optional(), subjectReferenceInputType: z.union([z.literal('none'), z.literal('url'), z.literal('binary'), expressionSchema]).optional(), subjectReferenceImageUrl: stringOrExpression.optional(), subjectReferenceBinaryPropertyName: stringOrExpression.optional() }).optional(),
|
|
33
|
+
}).optional(),
|
|
34
|
+
subnodes: subnodesSchema.optional(),
|
|
35
|
+
});
|
|
36
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1
|
|
3
|
+
* Discriminator: resource=video, operation=imageToVideo
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
minimaxApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Generate a video from an image, with optional last frame and subject reference */
|
|
12
|
+
export type LcMinimaxV1VideoImageToVideoParams = {
|
|
13
|
+
resource: 'video';
|
|
14
|
+
operation: 'imageToVideo';
|
|
15
|
+
/**
|
|
16
|
+
* The model to use for video generation
|
|
17
|
+
* @default MiniMax-Hailuo-2.3
|
|
18
|
+
*/
|
|
19
|
+
modelId?: 'I2V-01' | 'I2V-01-Director' | 'I2V-01-live' | 'MiniMax-Hailuo-02' | 'MiniMax-Hailuo-2.3' | 'MiniMax-Hailuo-2.3-Fast' | Expression<string>;
|
|
20
|
+
/**
|
|
21
|
+
* How to provide the first frame image
|
|
22
|
+
* @default url
|
|
23
|
+
*/
|
|
24
|
+
imageInputType?: 'url' | 'binary' | Expression<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Public URL of the image to use as first frame (JPG, JPEG, PNG, WebP, <20MB)
|
|
27
|
+
* @displayOptions.show { imageInputType: ["url"] }
|
|
28
|
+
*/
|
|
29
|
+
imageUrl?: string | Expression<string> | PlaceholderValue;
|
|
30
|
+
/**
|
|
31
|
+
* Input Data Field Name
|
|
32
|
+
* @hint The name of the input field containing the binary image data
|
|
33
|
+
* @displayOptions.show { imageInputType: ["binary"] }
|
|
34
|
+
* @default data
|
|
35
|
+
*/
|
|
36
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
37
|
+
/**
|
|
38
|
+
* Optional text description of the video (max 2000 characters). Camera movements can be controlled using [command] syntax.
|
|
39
|
+
*/
|
|
40
|
+
prompt?: string | Expression<string> | PlaceholderValue;
|
|
41
|
+
/**
|
|
42
|
+
* Duration of the generated video
|
|
43
|
+
* @default 6
|
|
44
|
+
*/
|
|
45
|
+
duration?: 6 | 10 | Expression<number>;
|
|
46
|
+
/**
|
|
47
|
+
* Resolution of the generated video. Available options depend on the model.
|
|
48
|
+
* @default 768P
|
|
49
|
+
*/
|
|
50
|
+
resolution?: '512P' | '720P' | '768P' | '1080P' | Expression<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to download the generated video as binary data. When disabled, only the video URL is returned.
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
downloadVideo?: boolean | Expression<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Options
|
|
58
|
+
* @default {}
|
|
59
|
+
*/
|
|
60
|
+
options?: {
|
|
61
|
+
/** Whether to automatically optimize the prompt
|
|
62
|
+
* @default true
|
|
63
|
+
*/
|
|
64
|
+
promptOptimizer?: boolean | Expression<boolean>;
|
|
65
|
+
/** Provide a last frame image to generate a first-and-last-frame video. Only supported by MiniMax-Hailuo-2.3 and MiniMax-Hailuo-02.
|
|
66
|
+
* @default none
|
|
67
|
+
*/
|
|
68
|
+
lastFrameInputType?: 'none' | 'url' | 'binary' | Expression<string>;
|
|
69
|
+
/** Last Frame Image URL
|
|
70
|
+
* @displayOptions.show { lastFrameInputType: ["url"] }
|
|
71
|
+
*/
|
|
72
|
+
lastFrameImageUrl?: string | Expression<string> | PlaceholderValue;
|
|
73
|
+
/** Last Frame Data Field Name
|
|
74
|
+
* @displayOptions.show { lastFrameInputType: ["binary"] }
|
|
75
|
+
* @default lastFrame
|
|
76
|
+
*/
|
|
77
|
+
lastFrameBinaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
78
|
+
/** Provide a face photo for facial consistency in the generated video. Only supported by MiniMax-Hailuo-2.3.
|
|
79
|
+
* @default none
|
|
80
|
+
*/
|
|
81
|
+
subjectReferenceInputType?: 'none' | 'url' | 'binary' | Expression<string>;
|
|
82
|
+
/** Subject Reference Image URL
|
|
83
|
+
* @displayOptions.show { subjectReferenceInputType: ["url"] }
|
|
84
|
+
*/
|
|
85
|
+
subjectReferenceImageUrl?: string | Expression<string> | PlaceholderValue;
|
|
86
|
+
/** Subject Reference Data Field Name
|
|
87
|
+
* @displayOptions.show { subjectReferenceInputType: ["binary"] }
|
|
88
|
+
* @default subjectReference
|
|
89
|
+
*/
|
|
90
|
+
subjectReferenceBinaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export interface LcMinimaxV1VideoImageToVideoSubnodeConfig {
|
|
95
|
+
tools?: ToolInstance[];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type LcMinimaxV1VideoImageToVideoNode = {
|
|
99
|
+
type: '@n8n/n8n-nodes-langchain.minimax';
|
|
100
|
+
version: 1;
|
|
101
|
+
credentials?: Credentials;
|
|
102
|
+
config: NodeConfig<LcMinimaxV1VideoImageToVideoParams> & { subnodes?: LcMinimaxV1VideoImageToVideoSubnodeConfig };
|
|
103
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MiniMax Node - Version 1 - Zod Schema
|
|
3
|
+
* Discriminator: resource=video, operation=textToVideo
|
|
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('textToVideo'),
|
|
24
|
+
modelId: z.union([z.literal('MiniMax-Hailuo-2.3'), z.literal('MiniMax-Hailuo-02'), z.literal('T2V-01-Director'), z.literal('T2V-01'), expressionSchema]).optional(),
|
|
25
|
+
prompt: stringOrExpression.optional(),
|
|
26
|
+
duration: z.union([z.literal(6), z.literal(10), expressionSchema]).optional(),
|
|
27
|
+
resolution: z.union([z.literal('720P'), z.literal('768P'), z.literal('1080P'), expressionSchema]).optional(),
|
|
28
|
+
downloadVideo: booleanOrExpression.optional(),
|
|
29
|
+
options: z.object({ promptOptimizer: booleanOrExpression.optional() }).optional(),
|
|
30
|
+
}).optional(),
|
|
31
|
+
subnodes: subnodesSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
};
|