n8n-nodes-github-copilot 3.3.0 → 3.5.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/GitHubApi.credentials.d.ts +8 -8
- package/dist/credentials/GitHubApi.credentials.js +50 -50
- package/dist/credentials/GitHubApiManual.credentials.d.ts +7 -7
- package/dist/credentials/GitHubApiManual.credentials.js +33 -33
- package/dist/nodes/GitHubCopilot/GitHubCopilot.node.d.ts +5 -5
- package/dist/nodes/GitHubCopilot/GitHubCopilot.node.js +324 -324
- package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.d.ts +5 -5
- package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.js +141 -146
- package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.d.ts +2 -2
- package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.js +172 -202
- package/dist/nodes/GitHubCopilotChatAPI/utils/helpers.d.ts +19 -21
- package/dist/nodes/GitHubCopilotChatAPI/utils/helpers.js +130 -131
- package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.d.ts +8 -8
- package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.js +100 -101
- package/dist/nodes/GitHubCopilotChatAPI/utils/index.d.ts +3 -3
- package/dist/nodes/GitHubCopilotChatAPI/utils/index.js +19 -19
- package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.d.ts +14 -14
- package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.js +70 -71
- package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.d.ts +5 -5
- package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.js +113 -113
- package/dist/nodes/GitHubCopilotChatAPI/utils/types.d.ts +57 -57
- package/dist/nodes/GitHubCopilotChatAPI/utils/types.js +2 -2
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +140 -0
- package/dist/nodes/GitHubCopilotChatModel/copilot.svg +34 -0
- package/dist/shared/models/GitHubCopilotModels.d.ts +43 -0
- package/dist/shared/models/GitHubCopilotModels.js +218 -0
- package/package.json +7 -6
- package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.backup.d.ts +0 -5
- package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.backup.js +0 -651
- package/dist/nodes/GitHubCopilotChatAPI/utils/audioProcessor.d.ts +0 -11
- package/dist/nodes/GitHubCopilotChatAPI/utils/audioProcessor.js +0 -86
- package/dist/nodes/N8nAiAgent/N8nAiAgent.node.d.ts +0 -5
- package/dist/nodes/N8nAiAgent/N8nAiAgent.node.js +0 -214
- package/dist/nodes/N8nAiAgent/n8n-ai.svg +0 -35
- package/dist/nodes/N8nAiAgent/nodeProperties.d.ts +0 -2
- package/dist/nodes/N8nAiAgent/nodeProperties.js +0 -432
|
@@ -1,202 +1,172 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nodeProperties = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
default: 1,
|
|
175
|
-
description: 'Controls randomness of the response. Higher values make output more random.',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
displayName: 'Max Tokens',
|
|
179
|
-
name: 'max_tokens',
|
|
180
|
-
type: 'number',
|
|
181
|
-
typeOptions: {
|
|
182
|
-
minValue: 1,
|
|
183
|
-
maxValue: 128000,
|
|
184
|
-
},
|
|
185
|
-
default: 4096,
|
|
186
|
-
description: 'Maximum number of tokens to generate in the response',
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
displayName: 'Top P',
|
|
190
|
-
name: 'top_p',
|
|
191
|
-
type: 'number',
|
|
192
|
-
typeOptions: {
|
|
193
|
-
minValue: 0,
|
|
194
|
-
maxValue: 1,
|
|
195
|
-
numberPrecision: 2,
|
|
196
|
-
},
|
|
197
|
-
default: 1,
|
|
198
|
-
description: 'Alternative to temperature, controls diversity via nucleus sampling',
|
|
199
|
-
},
|
|
200
|
-
],
|
|
201
|
-
},
|
|
202
|
-
];
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nodeProperties = void 0;
|
|
4
|
+
const GitHubCopilotModels_1 = require("../../shared/models/GitHubCopilotModels");
|
|
5
|
+
exports.nodeProperties = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Chat Completion',
|
|
14
|
+
value: 'chat',
|
|
15
|
+
description: 'Send messages to GitHub Copilot Chat API',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
default: 'chat',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Model',
|
|
22
|
+
name: 'model',
|
|
23
|
+
type: 'options',
|
|
24
|
+
options: GitHubCopilotModels_1.GitHubCopilotModelsManager.toN8nOptions(),
|
|
25
|
+
default: GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL,
|
|
26
|
+
description: 'Select the GitHub Copilot model to use',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Message',
|
|
30
|
+
name: 'message',
|
|
31
|
+
type: 'string',
|
|
32
|
+
typeOptions: {
|
|
33
|
+
rows: 4,
|
|
34
|
+
},
|
|
35
|
+
default: '',
|
|
36
|
+
placeholder: 'What can I help you with?',
|
|
37
|
+
description: 'The message to send to the AI model',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'System Message',
|
|
41
|
+
name: 'systemMessage',
|
|
42
|
+
type: 'string',
|
|
43
|
+
typeOptions: {
|
|
44
|
+
rows: 3,
|
|
45
|
+
},
|
|
46
|
+
default: '',
|
|
47
|
+
placeholder: 'You are a helpful assistant...',
|
|
48
|
+
description: 'System message to set the behavior of the AI model',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Include Image',
|
|
52
|
+
name: 'includeMedia',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
default: false,
|
|
55
|
+
description: 'Whether to include an image file in the message. Supported formats: PNG, JPEG, GIF, WebP.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Image Source',
|
|
59
|
+
name: 'mediaSource',
|
|
60
|
+
type: 'options',
|
|
61
|
+
displayOptions: {
|
|
62
|
+
show: {
|
|
63
|
+
includeMedia: [true],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
options: [
|
|
67
|
+
{
|
|
68
|
+
name: 'Manual Input',
|
|
69
|
+
value: 'manual',
|
|
70
|
+
description: 'Provide image as base64 string or file path',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'URL',
|
|
74
|
+
value: 'url',
|
|
75
|
+
description: 'Download image from URL',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Binary Data',
|
|
79
|
+
value: 'binary',
|
|
80
|
+
description: 'Use binary data from previous node',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
default: 'manual',
|
|
84
|
+
description: 'Source of the image data',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Image File',
|
|
88
|
+
name: 'mediaFile',
|
|
89
|
+
type: 'string',
|
|
90
|
+
displayOptions: {
|
|
91
|
+
show: {
|
|
92
|
+
includeMedia: [true],
|
|
93
|
+
mediaSource: ['manual'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
default: '',
|
|
97
|
+
placeholder: 'Paste base64 string or file path',
|
|
98
|
+
description: 'Image file as base64 string or file path. Supported formats: PNG, JPEG, GIF, WebP.',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Image URL',
|
|
102
|
+
name: 'mediaUrl',
|
|
103
|
+
type: 'string',
|
|
104
|
+
displayOptions: {
|
|
105
|
+
show: {
|
|
106
|
+
includeMedia: [true],
|
|
107
|
+
mediaSource: ['url'],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
default: '',
|
|
111
|
+
placeholder: 'https://example.com/image.jpg',
|
|
112
|
+
description: 'URL of the image file to download. Supported formats: PNG, JPEG, GIF, WebP.',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Image Binary Property',
|
|
116
|
+
name: 'mediaBinaryProperty',
|
|
117
|
+
type: 'string',
|
|
118
|
+
displayOptions: {
|
|
119
|
+
show: {
|
|
120
|
+
includeMedia: [true],
|
|
121
|
+
mediaSource: ['binary'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
default: 'data',
|
|
125
|
+
placeholder: 'data',
|
|
126
|
+
description: 'Name of the binary property containing the image file',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Advanced Options',
|
|
130
|
+
name: 'advancedOptions',
|
|
131
|
+
type: 'collection',
|
|
132
|
+
placeholder: 'Add Field',
|
|
133
|
+
default: {},
|
|
134
|
+
options: [
|
|
135
|
+
{
|
|
136
|
+
displayName: 'Temperature',
|
|
137
|
+
name: 'temperature',
|
|
138
|
+
type: 'number',
|
|
139
|
+
typeOptions: {
|
|
140
|
+
minValue: 0,
|
|
141
|
+
maxValue: 2,
|
|
142
|
+
numberPrecision: 2,
|
|
143
|
+
},
|
|
144
|
+
default: 1,
|
|
145
|
+
description: 'Controls randomness of the response. Higher values make output more random.',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
displayName: 'Max Tokens',
|
|
149
|
+
name: 'max_tokens',
|
|
150
|
+
type: 'number',
|
|
151
|
+
typeOptions: {
|
|
152
|
+
minValue: 1,
|
|
153
|
+
maxValue: 128000,
|
|
154
|
+
},
|
|
155
|
+
default: 4096,
|
|
156
|
+
description: 'Maximum number of tokens to generate in the response',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: 'Top P',
|
|
160
|
+
name: 'top_p',
|
|
161
|
+
type: 'number',
|
|
162
|
+
typeOptions: {
|
|
163
|
+
minValue: 0,
|
|
164
|
+
maxValue: 1,
|
|
165
|
+
numberPrecision: 2,
|
|
166
|
+
},
|
|
167
|
+
default: 1,
|
|
168
|
+
description: 'Alternative to temperature, controls diversity via nucleus sampling',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
];
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
finalTokens: number;
|
|
21
|
-
};
|
|
1
|
+
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { CopilotResponse } from './types';
|
|
3
|
+
export declare function makeApiRequest(context: IExecuteFunctions, endpoint: string, body: Record<string, unknown>, hasMedia?: boolean): Promise<CopilotResponse>;
|
|
4
|
+
export declare function downloadFileFromUrl(url: string): Promise<Buffer>;
|
|
5
|
+
export declare function getFileFromBinary(context: IExecuteFunctions, itemIndex: number, propertyName: string): Promise<Buffer>;
|
|
6
|
+
export declare function getImageMimeType(filename: string): string;
|
|
7
|
+
export declare function getAudioMimeType(filename: string): string;
|
|
8
|
+
export declare function validateFileSize(buffer: Buffer, maxSizeKB?: number): void;
|
|
9
|
+
export declare function estimateTokens(base64String: string): number;
|
|
10
|
+
export declare function validateTokenLimit(estimatedTokens: number, maxTokens?: number): {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function truncateToTokenLimit(content: string, maxTokens?: number): {
|
|
15
|
+
content: string;
|
|
16
|
+
truncated: boolean;
|
|
17
|
+
originalTokens: number;
|
|
18
|
+
finalTokens: number;
|
|
19
|
+
};
|