@@ -21,7 +21,7 @@ class GoogleGenerativeAI_ChatModels implements INode {
21
21
constructor ( ) {
22
22
this . label = 'ChatGoogleGenerativeAI'
23
23
this . name = 'chatGoogleGenerativeAI'
24
- this . version = 2.0
24
+ this . version = 2.1
25
25
this . type = 'ChatGoogleGenerativeAI'
26
26
this . icon = 'GoogleGemini.svg'
27
27
this . category = 'Chat Models'
@@ -49,6 +49,14 @@ class GoogleGenerativeAI_ChatModels implements INode {
49
49
loadMethod : 'listModels' ,
50
50
default : 'gemini-pro'
51
51
} ,
52
+ {
53
+ label : 'Custom Model Name' ,
54
+ name : 'customModelName' ,
55
+ type : 'string' ,
56
+ placeholder : 'gemini-1.5-pro-exp-0801' ,
57
+ description : 'Custom model name to use. If provided, it will override the model selected' ,
58
+ additionalParams : true
59
+ } ,
52
60
{
53
61
label : 'Temperature' ,
54
62
name : 'temperature' ,
@@ -165,6 +173,7 @@ class GoogleGenerativeAI_ChatModels implements INode {
165
173
166
174
const temperature = nodeData . inputs ?. temperature as string
167
175
const modelName = nodeData . inputs ?. modelName as string
176
+ const customModelName = nodeData . inputs ?. customModelName as string
168
177
const maxOutputTokens = nodeData . inputs ?. maxOutputTokens as string
169
178
const topP = nodeData . inputs ?. topP as string
170
179
const topK = nodeData . inputs ?. topK as string
@@ -177,7 +186,7 @@ class GoogleGenerativeAI_ChatModels implements INode {
177
186
178
187
const obj : Partial < GoogleGenerativeAIChatInput > = {
179
188
apiKey : apiKey ,
180
- modelName : modelName ,
189
+ modelName : customModelName || modelName ,
181
190
streaming : streaming ?? true
182
191
}
183
192
0 commit comments