@n8n/n8n-nodes-langchain 2.17.2 → 2.18.0
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/credentials/AlibabaCloudApi.credentials.js +8 -2
- package/dist/credentials/AlibabaCloudApi.credentials.js.map +1 -1
- package/dist/credentials/BraveSearchApi.credentials.d.ts +9 -0
- package/dist/credentials/BraveSearchApi.credentials.js +36 -0
- package/dist/credentials/BraveSearchApi.credentials.js.map +1 -0
- package/dist/credentials/DaytonaApi.credentials.d.ts +7 -0
- package/dist/credentials/DaytonaApi.credentials.js +29 -0
- package/dist/credentials/DaytonaApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +8 -0
- package/dist/node-definitions/.nodes-hash +1 -1
- 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_generate.ts +3 -3
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v21/resource_image/operation_generate.ts +3 -3
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/index.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/index.ts +27 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/operation_generate.schema.js +32 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/operation_generate.ts +60 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/operation_transcribe.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/operation_transcribe.ts +46 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/operation_translate.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_audio/operation_translate.ts +43 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/index.schema.js +26 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/index.ts +21 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_create.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_create.ts +54 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_get.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_get.ts +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_remove.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_remove.ts +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_update.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_conversation/operation_update.ts +36 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/operation_delete_file.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/operation_delete_file.ts +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/operation_list.schema.js +29 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/operation_list.ts +37 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/operation_upload.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_file/operation_upload.ts +43 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/index.schema.js +24 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/index.ts +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_analyze.schema.js +35 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_analyze.ts +74 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_edit.schema.js +39 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_edit.ts +116 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_generate.schema.js +31 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_image/operation_generate.ts +89 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_text/index.schema.js +22 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_text/index.ts +15 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_text/operation_classify.schema.js +30 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_text/operation_classify.ts +36 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_text/operation_response.schema.js +34 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_text/operation_response.ts +317 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_video/index.schema.js +18 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_video/index.ts +10 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_video/operation_generate.schema.js +33 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/resource_video/operation_generate.ts +67 -0
- package/dist/nodes/llms/LmChatAlibabaCloud/LmChatAlibabaCloud.node.js +2 -2
- package/dist/nodes/llms/LmChatAlibabaCloud/LmChatAlibabaCloud.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAlibabaCloud/alibaba-cloud-base-url.d.ts +2 -3
- package/dist/nodes/llms/LmChatAlibabaCloud/alibaba-cloud-base-url.js +3 -22
- package/dist/nodes/llms/LmChatAlibabaCloud/alibaba-cloud-base-url.js.map +1 -1
- package/dist/nodes/vendors/AlibabaCloud/transport/index.d.ts +0 -1
- package/dist/nodes/vendors/AlibabaCloud/transport/index.js +1 -11
- package/dist/nodes/vendors/AlibabaCloud/transport/index.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/image/edit.operation.js +3 -1
- package/dist/nodes/vendors/GoogleGemini/actions/image/edit.operation.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js +6 -2
- package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/video/download.operation.js +2 -1
- package/dist/nodes/vendors/GoogleGemini/actions/video/download.operation.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/actions/video/generate.operation.js +2 -1
- package/dist/nodes/vendors/GoogleGemini/actions/video/generate.operation.js.map +1 -1
- package/dist/nodes/vendors/GoogleGemini/helpers/utils.d.ts +1 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/utils.js +8 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/utils.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.d.ts +1 -0
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js +4 -0
- 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/descriptions.d.ts +2 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/descriptions.js +401 -1
- package/dist/nodes/vendors/OpenAi/v2/actions/descriptions.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js +28 -198
- package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js.map +1 -1
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/credentials.json +3 -1
- package/dist/types/nodes.json +3 -3
- package/package.json +12 -10
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=conversation, operation=create
|
|
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('create'),
|
|
25
|
+
messages: z.object({ values: z.array(z.object({ role: z.union([z.literal('user'), z.literal('assistant'), z.literal('system'), expressionSchema]).optional(), content: stringOrExpression.optional() })).optional() }).optional(),
|
|
26
|
+
options: z.object({ metadata: z.union([iDataObjectSchema, z.string()]).optional() }).optional(),
|
|
27
|
+
}).optional(),
|
|
28
|
+
subnodes: subnodesSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2
|
|
3
|
+
* Discriminator: resource=conversation, operation=create
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Create a conversation */
|
|
12
|
+
export type LcOpenAiV22ConversationCreateParams = {
|
|
13
|
+
resource: 'conversation';
|
|
14
|
+
operation: 'create';
|
|
15
|
+
/**
|
|
16
|
+
* Messages
|
|
17
|
+
* @default {"values":[{"type":"text"}]}
|
|
18
|
+
*/
|
|
19
|
+
messages?: {
|
|
20
|
+
/** Message
|
|
21
|
+
*/
|
|
22
|
+
values?: Array<{
|
|
23
|
+
/** Role in shaping the model's response, it tells the model how it should behave and interact with the user
|
|
24
|
+
* @default user
|
|
25
|
+
*/
|
|
26
|
+
role?: 'user' | 'assistant' | 'system' | Expression<string>;
|
|
27
|
+
/** The content of the message to be send
|
|
28
|
+
*/
|
|
29
|
+
content?: string | Expression<string> | PlaceholderValue;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Options
|
|
34
|
+
* @default {}
|
|
35
|
+
*/
|
|
36
|
+
options?: {
|
|
37
|
+
/** 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.
|
|
38
|
+
* @default {}
|
|
39
|
+
*/
|
|
40
|
+
metadata?: IDataObject | string | Expression<string>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export interface LcOpenAiV22ConversationCreateSubnodeConfig {
|
|
45
|
+
tools?: ToolInstance[];
|
|
46
|
+
memory?: MemoryInstance;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type LcOpenAiV22ConversationCreateNode = {
|
|
50
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
51
|
+
version: 2.2;
|
|
52
|
+
credentials?: Credentials;
|
|
53
|
+
config: NodeConfig<LcOpenAiV22ConversationCreateParams> & { subnodes?: LcOpenAiV22ConversationCreateSubnodeConfig };
|
|
54
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=conversation, operation=get
|
|
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('get'),
|
|
25
|
+
conversationId: stringOrExpression.optional(),
|
|
26
|
+
}).optional(),
|
|
27
|
+
subnodes: subnodesSchema.optional(),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2
|
|
3
|
+
* Discriminator: resource=conversation, operation=get
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Get a conversation */
|
|
12
|
+
export type LcOpenAiV22ConversationGetParams = {
|
|
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 LcOpenAiV22ConversationGetSubnodeConfig {
|
|
22
|
+
tools?: ToolInstance[];
|
|
23
|
+
memory?: MemoryInstance;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type LcOpenAiV22ConversationGetNode = {
|
|
27
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
28
|
+
version: 2.2;
|
|
29
|
+
credentials?: Credentials;
|
|
30
|
+
config: NodeConfig<LcOpenAiV22ConversationGetParams> & { subnodes?: LcOpenAiV22ConversationGetSubnodeConfig };
|
|
31
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - 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.2
|
|
3
|
+
* Discriminator: resource=conversation, operation=remove
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Remove a conversation */
|
|
12
|
+
export type LcOpenAiV22ConversationRemoveParams = {
|
|
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 LcOpenAiV22ConversationRemoveSubnodeConfig {
|
|
22
|
+
tools?: ToolInstance[];
|
|
23
|
+
memory?: MemoryInstance;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type LcOpenAiV22ConversationRemoveNode = {
|
|
27
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
28
|
+
version: 2.2;
|
|
29
|
+
credentials?: Credentials;
|
|
30
|
+
config: NodeConfig<LcOpenAiV22ConversationRemoveParams> & { subnodes?: LcOpenAiV22ConversationRemoveSubnodeConfig };
|
|
31
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - 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.2
|
|
3
|
+
* Discriminator: resource=conversation, operation=update
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
interface Credentials {
|
|
8
|
+
openAiApi: CredentialReference;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Update a conversation */
|
|
12
|
+
export type LcOpenAiV22ConversationUpdateParams = {
|
|
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 LcOpenAiV22ConversationUpdateSubnodeConfig {
|
|
27
|
+
tools?: ToolInstance[];
|
|
28
|
+
memory?: MemoryInstance;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type LcOpenAiV22ConversationUpdateNode = {
|
|
32
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
33
|
+
version: 2.2;
|
|
34
|
+
credentials?: Credentials;
|
|
35
|
+
config: NodeConfig<LcOpenAiV22ConversationUpdateParams> & { subnodes?: LcOpenAiV22ConversationUpdateSubnodeConfig };
|
|
36
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/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 { LcOpenAiV22FileDeleteFileNode } from './operation_delete_file';
|
|
7
|
+
import type { LcOpenAiV22FileListNode } from './operation_list';
|
|
8
|
+
import type { LcOpenAiV22FileUploadNode } from './operation_upload';
|
|
9
|
+
|
|
10
|
+
export * from './operation_delete_file';
|
|
11
|
+
export * from './operation_list';
|
|
12
|
+
export * from './operation_upload';
|
|
13
|
+
|
|
14
|
+
export type LcOpenAiV22FileNode =
|
|
15
|
+
| LcOpenAiV22FileDeleteFileNode
|
|
16
|
+
| LcOpenAiV22FileListNode
|
|
17
|
+
| LcOpenAiV22FileUploadNode
|
|
18
|
+
;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - 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.2
|
|
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 LcOpenAiV22FileDeleteFileParams = {
|
|
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 LcOpenAiV22FileDeleteFileSubnodeConfig {
|
|
24
|
+
tools?: ToolInstance[];
|
|
25
|
+
memory?: MemoryInstance;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type LcOpenAiV22FileDeleteFileNode = {
|
|
29
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
30
|
+
version: 2.2;
|
|
31
|
+
credentials?: Credentials;
|
|
32
|
+
config: NodeConfig<LcOpenAiV22FileDeleteFileParams> & { subnodes?: LcOpenAiV22FileDeleteFileSubnodeConfig };
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - 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/v22/resource_file/operation_list.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2
|
|
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 LcOpenAiV22FileListParams = {
|
|
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 LcOpenAiV22FileListSubnodeConfig {
|
|
28
|
+
tools?: ToolInstance[];
|
|
29
|
+
memory?: MemoryInstance;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type LcOpenAiV22FileListNode = {
|
|
33
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
34
|
+
version: 2.2;
|
|
35
|
+
credentials?: Credentials;
|
|
36
|
+
config: NodeConfig<LcOpenAiV22FileListParams> & { subnodes?: LcOpenAiV22FileListSubnodeConfig };
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.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, 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/v22/resource_file/operation_upload.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2
|
|
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 LcOpenAiV22FileUploadParams = {
|
|
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 LcOpenAiV22FileUploadSubnodeConfig {
|
|
34
|
+
tools?: ToolInstance[];
|
|
35
|
+
memory?: MemoryInstance;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type LcOpenAiV22FileUploadNode = {
|
|
39
|
+
type: '@n8n/n8n-nodes-langchain.openAi';
|
|
40
|
+
version: 2.2;
|
|
41
|
+
credentials?: Credentials;
|
|
42
|
+
config: NodeConfig<LcOpenAiV22FileUploadParams> & { subnodes?: LcOpenAiV22FileUploadSubnodeConfig };
|
|
43
|
+
};
|
package/dist/node-definitions/nodes/n8n-nodes-langchain/openAi/v22/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 { LcOpenAiV22ImageAnalyzeNode } from './operation_analyze';
|
|
7
|
+
import type { LcOpenAiV22ImageEditNode } from './operation_edit';
|
|
8
|
+
import type { LcOpenAiV22ImageGenerateNode } from './operation_generate';
|
|
9
|
+
|
|
10
|
+
export * from './operation_analyze';
|
|
11
|
+
export * from './operation_edit';
|
|
12
|
+
export * from './operation_generate';
|
|
13
|
+
|
|
14
|
+
export type LcOpenAiV22ImageNode =
|
|
15
|
+
| LcOpenAiV22ImageAnalyzeNode
|
|
16
|
+
| LcOpenAiV22ImageEditNode
|
|
17
|
+
| LcOpenAiV22ImageGenerateNode
|
|
18
|
+
;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI Node - Version 2.2 - Zod Schema
|
|
3
|
+
* Discriminator: resource=image, operation=analyze
|
|
4
|
+
*
|
|
5
|
+
* Use .parse() for strict validation or .safeParse() for error handling.
|
|
6
|
+
*
|
|
7
|
+
* Schema helpers (z, expressionSchema, etc.) are passed as parameters
|
|
8
|
+
* by the schema-validator, not imported from external files.
|
|
9
|
+
*
|
|
10
|
+
* @generated - CommonJS JavaScript for runtime loading
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema, toolInstanceSchema, 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
|
+
};
|