Bugfix/Gsuite tool params (#5189)

* fix gsuite tool params

* custom assistant only check for mandatory fields for visible params

* azure chat openai fix for gpt5

* return raw from executeJavaScriptCode

* add json5 for parsing

* azure chatopenai use maxCompletionTokens
This commit is contained in:
Henry Heng
2025-09-11 19:33:52 +01:00
committed by GitHub
parent 32bf030924
commit 6fb9bb559f
19 changed files with 541 additions and 736 deletions
@@ -167,9 +167,10 @@ const CustomAssistantConfigurePreview = () => {
const checkInputParamsMandatory = () => {
let canSubmit = true
const inputParams = (selectedChatModel.inputParams ?? []).filter((inputParam) => !inputParam.hidden)
for (const inputParam of inputParams) {
const visibleInputParams = showHideInputParams(selectedChatModel).filter(
(inputParam) => !inputParam.hidden && inputParam.display !== false
)
for (const inputParam of visibleInputParams) {
if (!inputParam.optional && (!selectedChatModel.inputs[inputParam.name] || !selectedChatModel.credential)) {
if (inputParam.type === 'credential' && !selectedChatModel.credential) {
canSubmit = false
@@ -184,8 +185,10 @@ const CustomAssistantConfigurePreview = () => {
if (selectedTools.length > 0) {
for (let i = 0; i < selectedTools.length; i++) {
const tool = selectedTools[i]
const inputParams = (tool.inputParams ?? []).filter((inputParam) => !inputParam.hidden)
for (const inputParam of inputParams) {
const visibleInputParams = showHideInputParams(tool).filter(
(inputParam) => !inputParam.hidden && inputParam.display !== false
)
for (const inputParam of visibleInputParams) {
if (!inputParam.optional && (!tool.inputs[inputParam.name] || !tool.credential)) {
if (inputParam.type === 'credential' && !tool.credential) {
canSubmit = false