diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 285e37edbf4..9592ed0a291 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -889,7 +889,7 @@ class FormMail extends Form //input prompt AI require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; - if (isModEnabled('ai') && getDolGlobalConst('AI_CHATGPT_API_KEY')) { + if (isModEnabled('ai') && getDolGlobalString('AI_CHATGPT_API_KEY')) { $out .= $this->getHtmlForInstruction(); } // Message