# AI Detection

This action will forward any user text to an existing trained AI model. The conversation will not hold and will continue with all other actions.

<figure><img src="/files/LuVWRGU5P6krGsZBmdGy" alt=""><figcaption></figcaption></figure>

### Settings <a href="#settings" id="settings"></a>

The action uses the following settings:

| Setting               | Description                                                                                | [Parsed](https://docs.xenioo.com/actions-and-operations/dynamic-parsing) |
| --------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| Prompt                | The prompt forwarded to the AI provider                                                    | ✅                                                                        |
| Auto-Generate Content | If enabled, Xenioo will automatically generate any required bubble to display the AI reply | ⛔                                                                        |
| Split Paragraphs      | If enabled, Xenioo will follow the AI reply line break to generate multiple bubbles        | ⛔                                                                        |

#### Remarks <a href="#remarks" id="remarks"></a>

The user\_prompt variable will be set to the value of the current user text. You can use the prompt field to add additional information to each user text so that AI reply is more detailed and related to the context of the current conversation.

If Auto-Generate content flag is enabled, the AI reply is returned to the chat directly. If you want to take control of the answer disable the Auto-Generate flag and use the **ai\_reply\_content** variable to access the text.

If Split Paragraphs is selected, the returned text will be automatically split into multiple bubbles. If Auto-Generate content is enabled, the Split Paragraph flag will have no effect.

AI exchanges will be kept in a thread so that users can ask follow up questions and refine the results with additional information. Clear the **ai\_conversation\_thread** content to reset the current thread information and start a new thread.

{% hint style="info" %}
Depending on the type of model and the specific AI provider selected it might take several seconds for the service to produce a complete answer.
{% endhint %}

## Trigger <a href="#trigger" id="trigger"></a>

On Reply Received. This action will trigger any child operation as soon as the result is available. This trigger will not be executed if the "Auto-Generate Content" flag is enabled.

## Variables

This action produces the following variables after being triggered:

| Variable                 | Description                               |
| ------------------------ | ----------------------------------------- |
| ai\_conversation\_thread | The thread id of the current conversation |
| ai\_reply\_content       | The raw JSON reply of the last request    |

### Availability

### Channel specific availability follows the table below:

| Channel          | Availability                                                           |
| ---------------- | ---------------------------------------------------------------------- |
| Facebook         | Fully Available.                                                       |
| WhatsApp         | Fully Available.                                                       |
| Telegram         | Fully Available.                                                       |
| Web              | Fully Available.                                                       |
| Alexa            | **Not Available. Out of AI Detection is not supported inside skills.** |
| Google Assistant | Fully Available.                                                       |
| Slack            | Fully Available.                                                       |
| API              | Fully Available.                                                       |

This action can be used only at [Bot Global level](https://docs.xenioo.com/actions-and-operations/execution#global-and-local-actions) or [Behavior level.](https://docs.xenioo.com/actions-and-operations/execution#global-and-local-actions)


---

# 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.mylinkconnect.com/actions-and-operations/input/large-language-models/ai-detection.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.
