The Conversations API enables you to retrieve conversation information for a site's AI Site-Chat.
With this API, you can:
Note: Wix AI Site-Chat is currently only available in the Wix Editor.
It's important to note the following point before starting to code:
To use the Conversations API, install the @wix/ai-site-chat
package.
To install the package, follow the instructions below based on your development environment.
When developing with:
npm install @wix/ai-site-chat
or
yarn add @wix/ai-site-chat
When developing CLI or self-hosted Wix apps, as well as headless apps or sites, run the following command:
npm install @wix/ai-site-chat
or
yarn add @wix/ai-site-chat
To import the package in your code:
import { conversations } from "@wix/ai-site-chat";
This article shares a possible use case your app or site could support, as well as a sample flow. This can be a helpful jumping-off point.
To reduce the AI assistant's active hours if the quota has nearly been reached:
current
is greater than 80% of quota
, call Set Widget Settings to reduce the AI assistant's active hours.