Hidden Config
The following variables can be added to your config.php file to modify the display and/or behavior of the Omni field.
carson_fieldtypes
By default the Omni field attaches itself to all Text, Textarea, and Rte fields. It will not attach itself to an Email field, even though it is rendered on the page as a, <input>
. If you have a custom field that is a text or textarea type field that you want to bind an Omni field to, just add the class name to the carson_fieldtypes
array. For example:
carson_open_ai_models
Currently the default models are gpt-3.5-turbo
and gpt-4-0125-preview
. If you want to use a different model you can create this config variable and the array options will be appened to the selectable list in Carson's settings. For example:
Menu Options
The top half of the menu that includes "Improve Writing" is the default section. The middle section that includes the heading "Change Tone" is the tone section, and the last section with the heading "Translate to" is the language section. With the following options you can choose to hide certain sections that may not be applicable to your site.
carson_menu_include_tone
For example:
carson_menu_include_default
For example:
Language Options
By default, if Publisher or Transcribe is installed, all actions in the Omni menu will be contextual to the current language. English is assumed to be the default language. You can modify the language behaviors with the following config values.
carson_menu_use_language_context
If you want to ignore the current language context when using Publisher or Transcribe in prompts. Disabling will default the responses to the default language, English. For example:
carson_menu_include_language
Not to be confused with carson_languages
config option. If Publisher or Transcribe is installed, and you're viewing an entry in a non-default language, Carson will automatically add a "Translate to" menu option for the current language, which will let you translate whatever content is in that field to the current language. For example:
carson_languages
If you are not using Publisher or Transcribe but still need translated content, don't worry Carson has you covered. If you're using another method of managing translations on your site, you can define an array of which languages Carson can translate content to.
carson_menu_include_image
Allows you to use Omni without the Image Description, or use just the Image Description without the rest of the fields getting an Omni menu as well.
Hooks
Hi-jack and replace the whole menu if you want, just make sure you're re-building it correctly, and if used we can't guarantee support if something does not behave as you expect it to.
carson_modify_menu
Last updated