Add option to enable/disable function calling in DevChat
- Added a new configuration option "DevChat.EnableFunctionCalling" in package.json. - This option allows users to enable or disable function calling for GPT. - Updated devchat.ts to check this configuration before pushing function options.
This commit is contained in:
parent
fcffa1b4b2
commit
0d483e118c
@ -149,6 +149,12 @@
|
||||
}
|
||||
},
|
||||
"description": "Which Python interpreter to use with DevChat?"
|
||||
},
|
||||
"DevChat.EnableFunctionCalling": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable/Disable function calling for GPT.",
|
||||
"when": "DevChat.llmModel == 'OpenAI'"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -102,7 +102,8 @@ class DevChat {
|
||||
}
|
||||
}
|
||||
|
||||
if (options.functions) {
|
||||
const isEnableFunctionCalling = UiUtilWrapper.getConfiguration('DevChat', 'EnableFunctionCalling');
|
||||
if (options.functions && isEnableFunctionCalling) {
|
||||
args.push("-f", options.functions);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user