> For the complete documentation index, see [llms.txt](https://tailieu.smax.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tailieu.smax.ai/bot-auto/trigger/facebook/gen-ai.md).

# Gen AI

{% hint style="warning" %}
Trigger Gen AI dùng để tạo ra điều kiện chạy các luồng bot theo những thông tin mà AI thu thập được từ module Gen AI
{% endhint %}

Xem hướng dẫn module Gen AI tại đây

{% content-ref url="/pages/HPSz5zLR5cFMiYr7TdY5" %}
[GenAI](/extend-modules/genai.md)
{% endcontent-ref %}

Để tạo trigger Gen AI, truy cập module <mark style="color:orange;">**Bot-Auto**</mark>, chọn <mark style="color:orange;">**Kịch bản**</mark> và chọn <mark style="color:orange;">**Tạo mới trigger**</mark>

<figure><img src="https://1875681896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsr3EiPwgSuzEXI3u1tC1%2Fuploads%2FziN28y1ev56iAwzXwgeb%2Fimage.png?alt=media&amp;token=69065ea8-ddb0-4a9b-918e-d2c43bbfce77" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1875681896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsr3EiPwgSuzEXI3u1tC1%2Fuploads%2FO4R6Y3dCixlVfeTNPaVM%2Fimage.png?alt=media&amp;token=5097b811-a5dd-4771-8f27-ad2c8749415c" alt=""><figcaption></figcaption></figure>

Đầu tiên bạn cần đặt tên cho trigger, chọn kênh áp dụng và chọn mẫu AI đã tạo trong module Gen AI

<figure><img src="https://1875681896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsr3EiPwgSuzEXI3u1tC1%2Fuploads%2FiOkkVUrBVoAfkkYfhSO9%2Fimage.png?alt=media&amp;token=9b22dd32-9ad8-45d3-9b8e-cb5f65792442" alt=""><figcaption></figcaption></figure>

Sau đó chọn <mark style="color:orange;">**Thêm mới**</mark>:

* Ý định của khách hàng (đây là phần mẫu thu thập thông tin đã tạo trong module Gen AI)

{% hint style="info" %}
Trong phần Ý định của khách hàng sẽ có lựa chọn <mark style="color:orange;">**Other**</mark>, đây là tùy chọn khi AI không phát hiện được ý định nào của khách hàng mà bạn đã setup trước đó => sẽ vào <mark style="color:orange;">**Other**</mark>
{% endhint %}

* Hành động:
  * Gửi block: Khi AI phát hiện ý định của khách hàng thì sẽ gửi  1 block
  * Trả lời trực tiếp: AI sẽ trả lời luôn, không chạy qua block của Bot

Sau khi setup xong, chọn <mark style="color:orange;">**Lưu**</mark> để tạo trigger

<figure><img src="https://1875681896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fsr3EiPwgSuzEXI3u1tC1%2Fuploads%2Fqczt6OF95kUmaCRtN9qS%2Fimage.png?alt=media&amp;token=79647198-5c15-424e-a00a-c01db2afeccc" alt=""><figcaption></figcaption></figure>
