n8n-nodes-github-copilot 3.5.1 → 3.5.2
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.
|
@@ -108,25 +108,27 @@ class GitHubCopilotChatModel {
|
|
|
108
108
|
const options = this.getNodeParameter('options', itemIndex, {});
|
|
109
109
|
const modelInfo = GitHubCopilotModels_1.GitHubCopilotModelsManager.getModelByValue(model);
|
|
110
110
|
const credentials = await this.getCredentials('gitHubApiManual');
|
|
111
|
+
const safeModel = modelInfo ? model : GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL;
|
|
112
|
+
const safeModelInfo = modelInfo || GitHubCopilotModels_1.GitHubCopilotModelsManager.getModelByValue(GitHubCopilotModels_1.DEFAULT_MODELS.GENERAL);
|
|
111
113
|
const modelConfig = {
|
|
112
114
|
apiKey: credentials.accessToken,
|
|
113
|
-
model:
|
|
115
|
+
model: safeModel,
|
|
114
116
|
temperature: options.temperature || 0.7,
|
|
115
|
-
maxTokens: Math.min(options.maxTokens || 1000, (
|
|
117
|
+
maxTokens: Math.min(options.maxTokens || 1000, (safeModelInfo === null || safeModelInfo === void 0 ? void 0 : safeModelInfo.capabilities.maxOutputTokens) || 4096),
|
|
116
118
|
topP: options.topP || 1,
|
|
117
119
|
configuration: {
|
|
118
|
-
baseURL: 'https://api.githubcopilot.com
|
|
120
|
+
baseURL: 'https://api.githubcopilot.com',
|
|
119
121
|
defaultHeaders: {
|
|
120
122
|
'User-Agent': 'n8n-github-copilot-chat-model',
|
|
121
123
|
'Content-Type': 'application/json',
|
|
122
124
|
'Authorization': `Bearer ${credentials.accessToken}`,
|
|
123
|
-
...(options.enableVision && (
|
|
125
|
+
...(options.enableVision && (safeModelInfo === null || safeModelInfo === void 0 ? void 0 : safeModelInfo.capabilities.vision) && {
|
|
124
126
|
'Copilot-Vision-Request': 'true',
|
|
125
127
|
'Copilot-Media-Request': 'true'
|
|
126
128
|
}),
|
|
127
129
|
},
|
|
128
130
|
},
|
|
129
|
-
...((
|
|
131
|
+
...((safeModelInfo === null || safeModelInfo === void 0 ? void 0 : safeModelInfo.capabilities.toolsCalling) && {
|
|
130
132
|
modelKwargs: {
|
|
131
133
|
tool_choice: 'auto'
|
|
132
134
|
}
|
|
@@ -37,21 +37,21 @@ exports.GITHUB_COPILOT_MODELS = [
|
|
|
37
37
|
status: 'stable'
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
value: 'gpt-
|
|
41
|
-
name: 'GPT-
|
|
42
|
-
description: '
|
|
40
|
+
value: 'gpt-4',
|
|
41
|
+
name: 'GPT-4',
|
|
42
|
+
description: 'Powerful GPT-4 model for complex tasks',
|
|
43
43
|
capabilities: {
|
|
44
44
|
toolsCalling: true,
|
|
45
|
-
vision:
|
|
46
|
-
multimodal:
|
|
47
|
-
maxContextTokens:
|
|
48
|
-
maxOutputTokens:
|
|
45
|
+
vision: false,
|
|
46
|
+
multimodal: false,
|
|
47
|
+
maxContextTokens: 128000,
|
|
48
|
+
maxOutputTokens: 4096,
|
|
49
49
|
streaming: true,
|
|
50
50
|
provider: 'OpenAI',
|
|
51
|
-
category: '
|
|
51
|
+
category: 'chat'
|
|
52
52
|
},
|
|
53
|
-
recommended:
|
|
54
|
-
status: '
|
|
53
|
+
recommended: false,
|
|
54
|
+
status: 'stable'
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
value: 'o1-preview',
|
|
@@ -88,7 +88,7 @@ exports.GITHUB_COPILOT_MODELS = [
|
|
|
88
88
|
status: 'preview'
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
value: 'claude-3
|
|
91
|
+
value: 'claude-3-5-sonnet-20241022',
|
|
92
92
|
name: 'Claude 3.5 Sonnet',
|
|
93
93
|
description: 'Anthropic\'s most capable model with excellent reasoning and creativity',
|
|
94
94
|
capabilities: {
|
|
@@ -105,7 +105,7 @@ exports.GITHUB_COPILOT_MODELS = [
|
|
|
105
105
|
status: 'stable'
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
|
-
value: 'claude-3
|
|
108
|
+
value: 'claude-3-5-haiku-20241022',
|
|
109
109
|
name: 'Claude 3.5 Haiku',
|
|
110
110
|
description: 'Fast and efficient Claude model for quick tasks',
|
|
111
111
|
capabilities: {
|
|
@@ -120,40 +120,6 @@ exports.GITHUB_COPILOT_MODELS = [
|
|
|
120
120
|
},
|
|
121
121
|
recommended: true,
|
|
122
122
|
status: 'stable'
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
value: 'gemini-1.5-pro-002',
|
|
126
|
-
name: 'Gemini 1.5 Pro',
|
|
127
|
-
description: 'Google\'s most advanced model with large context and multimodal capabilities',
|
|
128
|
-
capabilities: {
|
|
129
|
-
toolsCalling: true,
|
|
130
|
-
vision: true,
|
|
131
|
-
multimodal: true,
|
|
132
|
-
maxContextTokens: 2000000,
|
|
133
|
-
maxOutputTokens: 8192,
|
|
134
|
-
streaming: true,
|
|
135
|
-
provider: 'Google',
|
|
136
|
-
category: 'multimodal'
|
|
137
|
-
},
|
|
138
|
-
recommended: true,
|
|
139
|
-
status: 'stable'
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
value: 'gemini-1.5-flash-002',
|
|
143
|
-
name: 'Gemini 1.5 Flash',
|
|
144
|
-
description: 'Fast and efficient Gemini model for quick responses',
|
|
145
|
-
capabilities: {
|
|
146
|
-
toolsCalling: true,
|
|
147
|
-
vision: true,
|
|
148
|
-
multimodal: true,
|
|
149
|
-
maxContextTokens: 1000000,
|
|
150
|
-
maxOutputTokens: 8192,
|
|
151
|
-
streaming: true,
|
|
152
|
-
provider: 'Google',
|
|
153
|
-
category: 'chat'
|
|
154
|
-
},
|
|
155
|
-
recommended: true,
|
|
156
|
-
status: 'stable'
|
|
157
123
|
}
|
|
158
124
|
];
|
|
159
125
|
class GitHubCopilotModelsManager {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
|