# Configuration

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:

```php
$config['carson_fieldtypes'] = ['Wyvern'];
```

### carson\_open\_ai\_models

Currently the default model is `gpt-4o` . 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:

```php
$config['carson_open_ai_models'] = [
    'some-model' => 'some-model',
]
```

## 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.

<figure><img src="/files/QbvGh0EddZ9PNWdIhTDR" alt="" width="165"><figcaption></figcaption></figure>

### carson\_menu\_include\_tone

For example:

```php
$config['carson_menu_include_tone'] = 'n'; // Default is 'y'
```

### carson\_menu\_include\_default

For example:

```php
$config['carson_menu_include_default'] = 'n'; // Default is 'y'
```

## 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:

```php
$config['carson_menu_include_language'] = 'n'; // Default is 'y'
```

### 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:

```php
$config['carson_menu_include_language'] = 'n'; // Default is 'y'
```

### 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.

<pre class="language-php"><code class="lang-php"><strong>$config['carson_languages'] = [
</strong>    'Japanese',
    'Traditional Chinese',
    'Dutch',
];
</code></pre>

### carson\_menu\_include\_image

```php
$config['carson_menu_include_image'] = 'n'; // Default is 'y'
```

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. If you want to use Carson just for generating descriptions for images and not display the Omni menu in text fields, then you will want to enable this option, and disable all other options, e.g.

```php
$config['carson_menu_include_tone'] = 'n';
$config['carson_menu_include_default'] = 'n';
$config['carson_menu_include_language'] = 'n';
$config['carson_menu_include_image'] = 'y';
```

## 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

<pre class="language-php"><code class="lang-php">public function carson_modify_menu(Menu $menu, PromptModifierHelper $promptModifier): Menu
{
    // Inspect the ft.carson_omni.php file for a working 
    // example of using the Menu object.
<strong>    return $menu;
</strong><strong>}
</strong></code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boldminded.com/carson/docs/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
