@n8n/n8n-nodes-langchain 2.18.2 → 2.18.4
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/node-definitions/nodes/n8n-nodes-langchain/openAi/index.ts +3 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v2/resource_image/operation_edit.schema.js +6 -6
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v21/resource_image/operation_edit.schema.js +6 -6
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v21/resource_image/operation_edit.ts +6 -6
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_edit.schema.js +6 -6
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_edit.ts +6 -6
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/index.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/index.ts +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/operation_generate.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/operation_generate.ts +60 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/operation_transcribe.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/operation_transcribe.ts +46 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/operation_translate.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_audio/operation_translate.ts +43 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/index.schema.js +26 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/index.ts +21 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_create.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_create.ts +54 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_get.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_get.ts +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_remove.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_remove.ts +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_update.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_conversation/operation_update.ts +36 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_delete_file.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_delete_file.ts +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_list.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_list.ts +37 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_upload.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_upload.ts +43 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/operation_analyze.schema.js +35 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/operation_analyze.ts +74 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/operation_edit.schema.js +39 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/operation_edit.ts +117 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/operation_generate.schema.js +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/operation_generate.ts +89 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_text/index.schema.js +22 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_text/index.ts +15 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_text/operation_classify.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_text/operation_classify.ts +36 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_text/operation_response.schema.js +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_text/operation_response.ts +317 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_video/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_video/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_video/operation_generate.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_video/operation_generate.ts +67 -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/OpenAi/OpenAi.node.js +2 -1
- package/dist/nodes/vendors/OpenAi/OpenAi.node.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js +18 -1
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/v2/OpenAiV2.node.js +1 -1
- package/dist/nodes/vendors/OpenAi/v2/OpenAiV2.node.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js +261 -10
- package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js.map +1 -1
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/nodes.json +4 -4
- package/package.json +6 -6
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=conversation, operation=get
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Get a conversation */
|
|
12
|
+
export type LcOpenAiV23ConversationGetParams = {
|
|
13
|
+
resource: 'conversation';
|
|
14
|
+
operation: 'get';
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the conversation to retrieve
|
|
17
|
+
*/
|
|
18
|
+
conversationId?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export interface LcOpenAiV23ConversationGetSubnodeConfig {
|
|
22
|
+
tools?: ToolInstance[];
|
|
23
|
+
memory?: MemoryInstance;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type LcOpenAiV23ConversationGetNode = {
|
|
27
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
28
|
+
version: 2.3;
|
|
29
|
+
credentials?: Credentials;
|
|
30
|
+
config: NodeConfig<LcOpenAiV23ConversationGetParams> & { subnodes?: LcOpenAiV23ConversationGetSubnodeConfig };
|
|
31
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - Zod Schema
|
|
3
|
+
* Discriminator: resource=conversation, operation=remove
|
|
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, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('conversation'),
|
|
24
|
+
operation: z.literal('remove'),
|
|
25
|
+
conversationId: stringOrExpression.optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=conversation, operation=remove
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Remove a conversation */
|
|
12
|
+
export type LcOpenAiV23ConversationRemoveParams = {
|
|
13
|
+
resource: 'conversation';
|
|
14
|
+
operation: 'remove';
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the conversation to delete
|
|
17
|
+
*/
|
|
18
|
+
conversationId?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export interface LcOpenAiV23ConversationRemoveSubnodeConfig {
|
|
22
|
+
tools?: ToolInstance[];
|
|
23
|
+
memory?: MemoryInstance;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type LcOpenAiV23ConversationRemoveNode = {
|
|
27
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
28
|
+
version: 2.3;
|
|
29
|
+
credentials?: Credentials;
|
|
30
|
+
config: NodeConfig<LcOpenAiV23ConversationRemoveParams> & { subnodes?: LcOpenAiV23ConversationRemoveSubnodeConfig };
|
|
31
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - Zod Schema
|
|
3
|
+
* Discriminator: resource=conversation, operation=update
|
|
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, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('conversation'),
|
|
24
|
+
operation: z.literal('update'),
|
|
25
|
+
conversationId: stringOrExpression.optional(),
|
|
26
|
+
metadata: z.union([iDataObjectSchema, z.string()]).optional(),
|
|
27
|
+
}).optional(),
|
|
28
|
+
subnodes: subnodesSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=conversation, operation=update
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Update a conversation */
|
|
12
|
+
export type LcOpenAiV23ConversationUpdateParams = {
|
|
13
|
+
resource: 'conversation';
|
|
14
|
+
operation: 'update';
|
|
15
|
+
/**
|
|
16
|
+
* The ID of the conversation to update
|
|
17
|
+
*/
|
|
18
|
+
conversationId?: string | Expression<string> | PlaceholderValue;
|
|
19
|
+
/**
|
|
20
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
|
|
21
|
+
* @default {}
|
|
22
|
+
*/
|
|
23
|
+
metadata?: IDataObject | string | Expression<string>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export interface LcOpenAiV23ConversationUpdateSubnodeConfig {
|
|
27
|
+
tools?: ToolInstance[];
|
|
28
|
+
memory?: MemoryInstance;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type LcOpenAiV23ConversationUpdateNode = {
|
|
32
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
33
|
+
version: 2.3;
|
|
34
|
+
credentials?: Credentials;
|
|
35
|
+
config: NodeConfig<LcOpenAiV23ConversationUpdateParams> & { subnodes?: LcOpenAiV23ConversationUpdateSubnodeConfig };
|
|
36
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/index.schema.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI - 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 getDeleteFileSchema = require('./operation_delete_file.schema');
|
|
12
|
+
const getListSchema = require('./operation_list.schema');
|
|
13
|
+
const getUploadSchema = require('./operation_upload.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: 'generate' } : parameters;
|
|
19
|
+
return z.union([
|
|
20
|
+
getDeleteFileSchema({ ...helpers, parameters: effectiveParams }),
|
|
21
|
+
getListSchema({ ...helpers, parameters: effectiveParams }),
|
|
22
|
+
getUploadSchema({ ...helpers, parameters: effectiveParams }),
|
|
23
|
+
]);
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI - File Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcOpenAiV23FileDeleteFileNode } from './operation_delete_file';
|
|
7
|
+
import type { LcOpenAiV23FileListNode } from './operation_list';
|
|
8
|
+
import type { LcOpenAiV23FileUploadNode } from './operation_upload';
|
|
9
|
+
|
|
10
|
+
export * from './operation_delete_file';
|
|
11
|
+
export * from './operation_list';
|
|
12
|
+
export * from './operation_upload';
|
|
13
|
+
|
|
14
|
+
export type LcOpenAiV23FileNode =
|
|
15
|
+
| LcOpenAiV23FileDeleteFileNode
|
|
16
|
+
| LcOpenAiV23FileListNode
|
|
17
|
+
| LcOpenAiV23FileUploadNode
|
|
18
|
+
;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - Zod Schema
|
|
3
|
+
* Discriminator: resource=file, operation=deleteFile
|
|
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, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('file'),
|
|
24
|
+
operation: z.literal('deleteFile'),
|
|
25
|
+
fileId: 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(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=file, operation=deleteFile
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Delete a file from the server */
|
|
12
|
+
export type LcOpenAiV23FileDeleteFileParams = {
|
|
13
|
+
resource: 'file';
|
|
14
|
+
operation: 'deleteFile';
|
|
15
|
+
/**
|
|
16
|
+
* File
|
|
17
|
+
* @searchListMethod fileSearch
|
|
18
|
+
* @default {"mode":"list","value":""}
|
|
19
|
+
*/
|
|
20
|
+
fileId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface LcOpenAiV23FileDeleteFileSubnodeConfig {
|
|
24
|
+
tools?: ToolInstance[];
|
|
25
|
+
memory?: MemoryInstance;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type LcOpenAiV23FileDeleteFileNode = {
|
|
29
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
30
|
+
version: 2.3;
|
|
31
|
+
credentials?: Credentials;
|
|
32
|
+
config: NodeConfig<LcOpenAiV23FileDeleteFileParams> & { subnodes?: LcOpenAiV23FileDeleteFileSubnodeConfig };
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - Zod Schema
|
|
3
|
+
* Discriminator: resource=file, operation=list
|
|
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, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('file'),
|
|
24
|
+
operation: z.literal('list'),
|
|
25
|
+
options: z.object({ purpose: z.union([z.literal('any'), z.literal('assistants'), z.literal('fine-tune'), z.literal('vision'), z.literal('user_data'), expressionSchema]).optional() }).optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_list.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=file, operation=list
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Returns a list of files that belong to the user's organization */
|
|
12
|
+
export type LcOpenAiV23FileListParams = {
|
|
13
|
+
resource: 'file';
|
|
14
|
+
operation: 'list';
|
|
15
|
+
/**
|
|
16
|
+
* Options
|
|
17
|
+
* @default {}
|
|
18
|
+
*/
|
|
19
|
+
options?: {
|
|
20
|
+
/** Only return files with the given purpose
|
|
21
|
+
* @default any
|
|
22
|
+
*/
|
|
23
|
+
purpose?: 'any' | 'assistants' | 'fine-tune' | 'vision' | 'user_data' | Expression<string>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export interface LcOpenAiV23FileListSubnodeConfig {
|
|
28
|
+
tools?: ToolInstance[];
|
|
29
|
+
memory?: MemoryInstance;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type LcOpenAiV23FileListNode = {
|
|
33
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
34
|
+
version: 2.3;
|
|
35
|
+
credentials?: Credentials;
|
|
36
|
+
config: NodeConfig<LcOpenAiV23FileListParams> & { subnodes?: LcOpenAiV23FileListSubnodeConfig };
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - 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, toolInstanceSchema, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('file'),
|
|
24
|
+
operation: z.literal('upload'),
|
|
25
|
+
binaryPropertyName: stringOrExpression.optional(),
|
|
26
|
+
options: z.object({ purpose: z.union([z.literal('assistants'), z.literal('fine-tune'), z.literal('vision'), z.literal('user_data'), expressionSchema]).optional() }).optional(),
|
|
27
|
+
}).optional(),
|
|
28
|
+
subnodes: subnodesSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_file/operation_upload.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=file, operation=upload
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Upload a file that can be used across various endpoints */
|
|
12
|
+
export type LcOpenAiV23FileUploadParams = {
|
|
13
|
+
resource: 'file';
|
|
14
|
+
operation: 'upload';
|
|
15
|
+
/**
|
|
16
|
+
* Name of the binary property which contains the file. The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants.
|
|
17
|
+
* @hint The name of the input field containing the binary file data to be processed
|
|
18
|
+
* @default data
|
|
19
|
+
*/
|
|
20
|
+
binaryPropertyName?: string | Expression<string> | PlaceholderValue;
|
|
21
|
+
/**
|
|
22
|
+
* Options
|
|
23
|
+
* @default {}
|
|
24
|
+
*/
|
|
25
|
+
options?: {
|
|
26
|
+
/** The intended purpose of the uploaded file, the 'Fine-tuning' only supports .jsonl files
|
|
27
|
+
* @default user_data
|
|
28
|
+
*/
|
|
29
|
+
purpose?: 'assistants' | 'fine-tune' | 'vision' | 'user_data' | Expression<string>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export interface LcOpenAiV23FileUploadSubnodeConfig {
|
|
34
|
+
tools?: ToolInstance[];
|
|
35
|
+
memory?: MemoryInstance;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type LcOpenAiV23FileUploadNode = {
|
|
39
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
40
|
+
version: 2.3;
|
|
41
|
+
credentials?: Credentials;
|
|
42
|
+
config: NodeConfig<LcOpenAiV23FileUploadParams> & { subnodes?: LcOpenAiV23FileUploadSubnodeConfig };
|
|
43
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v23/resource_image/index.schema.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI - 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: 'generate' } : parameters;
|
|
19
|
+
return z.union([
|
|
20
|
+
getAnalyzeSchema({ ...helpers, parameters: effectiveParams }),
|
|
21
|
+
getEditSchema({ ...helpers, parameters: effectiveParams }),
|
|
22
|
+
getGenerateSchema({ ...helpers, parameters: effectiveParams }),
|
|
23
|
+
]);
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI - Image Resource
|
|
3
|
+
* Re-exports all operation types for this resource.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { LcOpenAiV23ImageAnalyzeNode } from './operation_analyze';
|
|
7
|
+
import type { LcOpenAiV23ImageEditNode } from './operation_edit';
|
|
8
|
+
import type { LcOpenAiV23ImageGenerateNode } from './operation_generate';
|
|
9
|
+
|
|
10
|
+
export * from './operation_analyze';
|
|
11
|
+
export * from './operation_edit';
|
|
12
|
+
export * from './operation_generate';
|
|
13
|
+
|
|
14
|
+
export type LcOpenAiV23ImageNode =
|
|
15
|
+
| LcOpenAiV23ImageAnalyzeNode
|
|
16
|
+
| LcOpenAiV23ImageEditNode
|
|
17
|
+
| LcOpenAiV23ImageGenerateNode
|
|
18
|
+
;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - 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, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('image'),
|
|
24
|
+
operation: z.literal('analyze'),
|
|
25
|
+
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(),
|
|
26
|
+
text: stringOrExpression.optional(),
|
|
27
|
+
inputType: z.union([z.literal('url'), z.literal('base64'), expressionSchema]).optional(),
|
|
28
|
+
imageUrls: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["url"]}}, defaults: {"inputType":"url"} }),
|
|
29
|
+
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"inputType":["base64"]}}, defaults: {"inputType":"url"} }),
|
|
30
|
+
simplify: booleanOrExpression.optional(),
|
|
31
|
+
options: z.object({ detail: z.union([z.literal('auto'), z.literal('low'), z.literal('high'), expressionSchema]).optional(), maxTokens: numberOrExpression.optional() }).optional(),
|
|
32
|
+
}).optional(),
|
|
33
|
+
subnodes: subnodesSchema.optional(),
|
|
34
|
+
});
|
|
35
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3
|
|
3
|
+
* Discriminator: resource=image, operation=analyze
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Take in images and answer questions about them */
|
|
12
|
+
export type LcOpenAiV23ImageAnalyzeParams = {
|
|
13
|
+
resource: 'image';
|
|
14
|
+
operation: 'analyze';
|
|
15
|
+
/**
|
|
16
|
+
* Model
|
|
17
|
+
* @searchListMethod imageModelSearch
|
|
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' | 'base64' | 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 property which contains the image(s)
|
|
38
|
+
* @hint The name of the input field containing the binary file data to be processed
|
|
39
|
+
* @displayOptions.show { inputType: ["base64"] }
|
|
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
|
+
/** Detail
|
|
54
|
+
* @default auto
|
|
55
|
+
*/
|
|
56
|
+
detail?: 'auto' | 'low' | 'high' | Expression<string>;
|
|
57
|
+
/** Fewer tokens will result in shorter, less detailed image description
|
|
58
|
+
* @default 300
|
|
59
|
+
*/
|
|
60
|
+
maxTokens?: number | Expression<number>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export interface LcOpenAiV23ImageAnalyzeSubnodeConfig {
|
|
65
|
+
tools?: ToolInstance[];
|
|
66
|
+
memory?: MemoryInstance;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type LcOpenAiV23ImageAnalyzeNode = {
|
|
70
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
71
|
+
version: 2.3;
|
|
72
|
+
credentials?: Credentials;
|
|
73
|
+
config: NodeConfig<LcOpenAiV23ImageAnalyzeParams> & { subnodes?: LcOpenAiV23ImageAnalyzeSubnodeConfig };
|
|
74
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.3 - 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, resolveSchema, toolInstanceSchema, memoryInstanceSchema }) {
|
|
14
|
+
|
|
15
|
+
// Static subnode schema
|
|
16
|
+
const subnodesSchema = z.object({
|
|
17
|
+
tools: z.array(toolInstanceSchema).optional(),
|
|
18
|
+
memory: memoryInstanceSchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
|
|
21
|
+
return z.object({
|
|
22
|
+
parameters: z.object({
|
|
23
|
+
resource: z.literal('image'),
|
|
24
|
+
operation: z.literal('edit'),
|
|
25
|
+
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(),
|
|
26
|
+
prompt: stringOrExpression.optional(),
|
|
27
|
+
images: resolveSchema({ parameters, schema: z.object({ values: z.array(z.object({ binaryPropertyName: stringOrExpression.optional() })).optional() }), required: false, displayOptions: {"show":{"/model":["gpt-image-1"],"/modelId":[{"_cnd":{"includes":"gpt-image"}}]}} }),
|
|
28
|
+
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"/model":["dall-e-2"],"/modelId":[{"_cnd":{"includes":"dall-e"}}]}} }),
|
|
29
|
+
n: numberOrExpression.optional(),
|
|
30
|
+
size: z.union([z.literal('256x256'), z.literal('512x512'), z.literal('1024x1024'), z.literal('1024x1536'), z.literal('1536x1024'), z.literal('auto'), expressionSchema]).optional(),
|
|
31
|
+
quality: resolveSchema({ parameters, schema: z.union([z.literal('auto'), z.literal('high'), z.literal('medium'), z.literal('low'), z.literal('standard'), expressionSchema]), required: false, displayOptions: {"show":{"/model":["gpt-image-1"],"/modelId":[{"_cnd":{"includes":"gpt-image"}}]}} }),
|
|
32
|
+
responseFormat: resolveSchema({ parameters, schema: z.union([z.literal('url'), z.literal('b64_json'), expressionSchema]), required: false, displayOptions: {"show":{"/model":["dall-e-2"],"/modelId":[{"_cnd":{"includes":"dall-e"}}]}} }),
|
|
33
|
+
outputFormat: resolveSchema({ parameters, schema: z.union([z.literal('png'), z.literal('jpeg'), z.literal('webp'), expressionSchema]), required: false, displayOptions: {"show":{"/model":["gpt-image-1"],"/modelId":[{"_cnd":{"includes":"gpt-image"}}]}} }),
|
|
34
|
+
outputCompression: resolveSchema({ parameters, schema: numberOrExpression, required: false, displayOptions: {"show":{"/model":["gpt-image-1"],"outputFormat":["webp","jpeg"],"/modelId":[{"_cnd":{"includes":"gpt-image"}}]}}, defaults: {"outputFormat":"png"} }),
|
|
35
|
+
options: z.object({ user: stringOrExpression.optional(), background: z.union([z.literal('auto'), z.literal('transparent'), z.literal('opaque'), expressionSchema]).optional(), inputFidelity: z.union([z.literal('low'), z.literal('high'), expressionSchema]).optional(), imageMask: stringOrExpression.optional() }).optional(),
|
|
36
|
+
}).optional(),
|
|
37
|
+
subnodes: subnodesSchema.optional(),
|
|
38
|
+
});
|
|
39
|
+
};
|