Manage plugins
Adding plugins to your AI Assistant enhances its capabilities. AppFlow provides various ready-to-use plugins and lets you develop your own. This topic describes how to add and manage plugins for your AI Assistant.
Prerequisites
You have created an AI Assistant. For instructions, see Create an AI Assistant.
Procedure
Add plugins
Add a custom plugin
To add a custom plugin, you must first create it in AppFlow using the Create Connector feature and obtain its AppCode. This section uses the Moji Weather (Free Edition) plugin as an example.
In , select a plugin and click Add .
Click Add New Credential. In the dialog box that appears, enter the AppCode and a Credential Name, and then click OK.
Select the credential that you just created, click Next, complete the Parameter Configuration, and then click OK.
NoteParameters vary by plugin and are required to run it. Configure them based on your needs.
If you enter
{{AppFlow.AI inference}}, the AI infers the value from your question at runtime. If you enter a fixed value, the plugin uses that value. If you leave the parameter blank, it is ignored.
When the status changes to Selected, click OK to add the plugin.
Add a public plugin
Some plugins in the Plugin Marketplace require Account Authorization, while others only require parameter configuration.
No authorization required
This section uses the QR Code Generator plugin as an example.
In the Plugin Marketplace, select a plugin and click Add .
On the import page, complete the Parameter Configuration and click OK.
NoteParameters vary by plugin and are required to run it. Configure them based on your needs.
If you enter
{{AppFlow.AI inference}}, the AI infers the value from your question at runtime. If you enter a fixed value, the plugin uses that value. If you leave the parameter blank, it is ignored.When the status changes to Selected, click OK to add the plugin.
Authorization required
This section uses the China University Search plugin as an example.
Purchase the service in Cloud Marketplace, or confirm that you already own it. Then, obtain its AppCode.
In the left-side navigation pane of Cloud Marketplace, click Purchased Services. Search for the target service, expand its details, find the AppCode at the bottom, and click Copy.
In the Plugin Marketplace, select the plugin and click Add .
From the Account Authorization drop-down list, click Add New Credential. In the dialog box, enter the AppCode and a Credential Name, and then click OK.
Select the credential and click Next.
Complete the Parameter Configuration and click OK.
When the status changes to Selected, click OK to add the plugin.
Test a plugin
Go to the Page Settings tab and use the AI Assistant on the right side of the page to test whether the plugin works correctly with your configuration. This section uses the QR code generator plugin as an example.
For example, enter "Please generate a QR code for me. URL: https://www.aliyun.com, width: 450, height: 450" into the chat box. If the AI Assistant returns the generated QR code, the plugin is configured correctly.
Modify a configuration
The process for adding a credential and configuring parameters is the same as the initial setup.
On the Plugins tab, select the plugin that you want to modify and click Specifications.
In the dialog box, select an existing Credential or click Add New Credential, and then click Next.
Edit the Plugin Name and Plugin Description, and then click Next.
Edit the plugin action configuration and click OK.
Delete a plugin
This action cannot be undone. Proceed with caution.
This action does not delete custom plugins created using the Create Connector feature.
This action does not delete services purchased from the Cloud Marketplace.
To delete a plugin, select it, click Delete, and then click Confirmation in the dialog box.
Set a trusted domain.
On your custom application page, click Webpage Authorization and JS-SDK > Set Trusted Domain.
Enter the trusted domain and click Apply for Domain Verification.
In the dialog box, click Download File and upload the downloaded file to the root directory of the domain that you entered.
This section uses an Nginx server on a Linux system with the domain
poptest.appflow.aliyunnest.comas an example to guide you through the domain verification process. Replace the domain with your actual domain.Upload the file by using Workbench to the
/usr/share/nginx/html/directory.Use a web browser to visit
http://poptest.appflow.aliyunnest.com/WW_verify_nmKUX8H4pHQhK74f.txtto verify the returned information.If the page displays the content string from the verification file, the file was uploaded correctly and is accessible through the domain.
Complete the domain ownership verification.
In the Set Trusted Domain dialog box, the domain ownership verification area displays a status of Verified. Click OK to complete the trusted domain setup.