File tree Expand file tree Collapse file tree
packages/components/nodes/chatmodels/ChatOllama Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ class ChatOllama_ChatModels implements INode {
7979 default : false ,
8080 optional : true
8181 } ,
82+ {
83+ label : 'Think' ,
84+ name : 'think' ,
85+ type : 'boolean' ,
86+ description : 'Whether the model supports reasoning. Only applicable for reasoning models' ,
87+ default : false ,
88+ optional : true
89+ } ,
8290 {
8391 label : 'JSON Mode' ,
8492 name : 'jsonMode' ,
@@ -240,6 +248,7 @@ class ChatOllama_ChatModels implements INode {
240248 const allowImageUploads = nodeData . inputs ?. allowImageUploads as boolean
241249 const jsonMode = nodeData . inputs ?. jsonMode as boolean
242250 const streaming = nodeData . inputs ?. streaming as boolean
251+ const think = nodeData . inputs ?. think as boolean
243252
244253 const cache = nodeData . inputs ?. cache as BaseCache
245254
@@ -265,6 +274,9 @@ class ChatOllama_ChatModels implements INode {
265274 if ( cache ) obj . cache = cache
266275 if ( jsonMode ) obj . format = 'json'
267276
277+ if ( think === true ) obj . think = true
278+ else obj . think = false
279+
268280 const multiModalOption : IMultiModalOption = {
269281 image : {
270282 allowImageUploads : allowImageUploads ?? false
You can’t perform that action at this time.
0 commit comments