The Variable Processor interfaces with a third-party AI vendor once a +AI integration is set up. The syntax, parameter definitions, and examples for OpenAI and Azure AI are listed below. To test +AI syntax, see Set Up +AI Integration.
It is recommended that global administrators enable the new syntax. Locate the System Options section in Global Settings, and toggle Enable New Variable Syntax Set on.
OpenAI Syntax
There are no spaces between parameters and commas. Call OpenAI with this syntax:
<!--@ai(openai:AI model,chatgpt,temperature)-->instruction<!--@aiend-->| Parameter | Description |
|---|---|
| AI model | This is optional. The name of the AI model being used by the service. If the service is OpenAI and the model is left unspecified, ChatGPT-4o is used by default. |
| temperature | Sets the desired level of randomness of the generated text. A value of 0 is the most conservative, and a value of 9 is the most random. |
| instruction |
The natural language prompt for the AI. Examples include |
Azure AI Syntax
There are no spaces between parameters and commas. Call Azure AI with this syntax:
<!--@ai(openai:deployment name,chatgpt,temperature)-->instruction<!--@aiend-->
| Parameter | Description |
|---|---|
| deployment name | This is optional. The deployment name of the Azure model being used. If the deployment name is left unspecified, the model configured within the Integration Key Management settings is used by default. |
| temperature | Sets the desired level of randomness of the generated text. A value of 0 is the most conservative, and a value of 9 is the most random. |
| instruction |
The natural language prompt for the AI. Examples include
|
OpenAI Syntax Examples
Example
To ask the AI to write an email for a specific user:
New syntax
<!--@ai(openai,chatgpt,2)-->Write {{firstname}} {{lastname}} an email rejecting their grant application because there is no more funding for applicants in Toronto<!--@aiend-->Old syntax
<!--@ai(openai,chatgpt,2)-->Write @firstname@ @lastname@ an email rejecting their grant application because there is no more funding for applicants in Toronto<!--@aiend-->
Example
To ask the AI to write an email for a specific user using the model gpt-4-0163:
New syntax
<!--@ai(openai:gpt-4-0163,chatgpt,2)-->Write {{firstname}} {{lastname}} an email rejecting their grant application because there is no more funding for applicants in Toronto<!--@aiend-->Old syntax
<!--@ai(openai:gpt-4-0163,chatgpt,2)-->Write @firstname@ @lastname@ an email rejecting their grant application because there is no more funding for applicants in Toronto<!--@aiend-->
Example
To ask the AI to fix the spelling of a message:
<!--@ai(openai,chatgpt,2)-->fix the spelling: how are yu tday?<!--@aiend-->
Example
To ask the AI to write a grant application summary, where {{txtApplicationContent}} is the variable for a custom field:
New syntax
<!--@ai(openai,chatgpt,2)-->Write a 200 word executive summary for a grant application with the contents {{txtApplicationContent}}<!--@aiend-->Old syntax
<!--@ai(openai,chatgpt,2)-->Write a 200 word executive summary for a grant application with the contents @txtApplicationContent@<!--@aiend-->