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:
bobo.yang 2023-08-09 00:26:09 +08:00
parent fcffa1b4b2
commit 0d483e118c
2 changed files with 8 additions and 1 deletions

View File

@ -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'"
}
}
},

View File

@ -102,7 +102,8 @@ class DevChat {
}
}
if (options.functions) {
const isEnableFunctionCalling = UiUtilWrapper.getConfiguration('DevChat', 'EnableFunctionCalling');
if (options.functions && isEnableFunctionCalling) {
args.push("-f", options.functions);
}