Create an RDS Copilot

更新时间:
复制 MD 格式

This topic describes how to create an AI assistant in AppFlow and integrate it into a web page or WeCom for shared access or enterprise-only access.

Why use AppFlow's AI Assistant?

  • Versatile integration: It provides H5 pages and floating widgets. It integrates with WeCom, DingTalk (coming soon), and WeChat mini programs (coming soon).

  • User-friendly interaction and rendering: It solves issues with native dialog boxes in common instant messaging (IM) applications such as WeCom and Lark, which do not support streaming or rendering complex Markdown content, such as images.

  • Flexible configuration: You can generate custom pages without agent development.

Results

Standalone web page

Floating widget

WeCom mobile client

WeCom desktop client

image

image

0c3efab14f15459fee4268bbf2a2a0a5

image

Billing

Using AppFlow is free. However, you may incur Alibaba Cloud resource usage fees and fees for model calls—calculated based on the number of tokens used—when you create and use an AI assistant. For more information, see Compute Nest billing, Model billing, and Moonshot AI billing.

Creation flowchart

image

Procedure

Step 1: Create an RDS Copilot

  1. Log on to the AppFlow console.

  2. In the navigation pane on the left, select Model Service > RDS Copilot.

  3. On the AI Assistant page, click Create AI Assistant to set basic information.

    Parameter

    Example

    Description

    RDS Copilot icon

    --

    The recommended image size is 192 × 192 pixels. Supported formats are JPG, PNG, and SVG.

    RDS Copilot Name

    AI name

    The name can contain Chinese characters, digits, letters, and underscores (_). It must be 3 to 200 characters in length. A Chinese character is counted as 2 characters.

    AI assistant overview

    AI demo

    The name must be 10 to 500 characters long, where each Chinese character counts as two characters.

  4. After the configuration is complete, click OK. You are redirected to the RDS Copilot Details page.

Step 2: Import a model and set up the page

Configure page and model parameters. This includes importing a model, selecting connection credentials, and setting configuration items such as the conversation background, welcome message, and preset questions. After completing the configuration, you can add plugins to enhance functionality.

Note

When you set the parameters, the preview page on the right updates dynamically. This lets you see the effects of your configuration in real time to ensure the final result meets your expectations.

  1. In the Model section, click Import Model, select a model as needed, and click OK.

    Note

    The list of supported models is continuously expanding.

    image

  2. In the dialog box that appears, select the connection credentials and click Next.

    If you do not have the required credentials, click Add New Credential in the drop-down list. The following table describes how to obtain the API key or token for each model.

    Model

    Path to obtain API key or token

    Alibaba Cloud Model Studio

    To obtain an API key for your Model Studio account, see Activate Model Studio and create an API key.

    DeepSeek (Alibaba Cloud Model Studio)

    Qwen

    DeepSeek (PAI)

    To obtain your DeepSeek invocation token from Platform for AI (PAI), see Obtain a token.

    PAI EAS RAG application

    To obtain your PAI EAS RAG invocation token from PAI, see LLM RAG chatbot.

    Moonshot AI (Kimi)

    To obtain an API key for your Moonshot AI account, see Moonshot AI - User Guide.

  3. In the Parameter Settings section, enter the parameters as prompted and click Save.

    Note

    Parameters vary by model. Refer to the console for details.

  4. In the Configuration Item Settings section, configure the conversation background, welcome message, and preset questions.

    Parameter

    Description

    Example

    Conversation background

    Preset the background, role, and tone for the conversation. The assistant will respond based on these settings.

    Note
    • This increases the token usage for each interaction.

    • This setting only applies to base models. It does not apply to agent platforms such as Alibaba Cloud Model Studio, which use their own prompts, such as for Qwen.

    Act as a technical consulting expert with extensive experience in AI, big data processing, and IoT integration.

    Welcome message

    The first message RDS Copilot proactively sends to the user after they enter the dialog box but before they ask a question.

    Welcome to the RDS Copilot.

    Preset questions

    A list of predefined questions. Users can click a preset question to send it directly to the RDS Copilot.

    What is AppFlow?

  5. In the General Settings section, configure the following items as needed.

    Model

    Description

    Enable context history

    Set the maximum number of historical conversation rounds to be sent to the model. A higher number improves conversational relevance.

    Note

    This setting only applies to base models. It does not apply to agent platforms such as Alibaba Cloud Model Studio, which use their own context capabilities.

    Show document sources

    When enabled, the source documents for the generated results are displayed with ordinal numbers. This consumes more tokens.

    SLS log record

    By centrally storing conversation records in Simple Log Service (SLS), you can easily retrieve and analyze historical conversations to gain insights into user behavior and preferences, thereby optimizing your conversation models and strategies.

    Speech input

    Using Intelligent Speech Interaction, you can have voice conversations with the RDS Copilot and receive voice responses. For detailed configuration, see Enable speech recognition.

    File input

    File input is currently supported only for Model Studio applications and Coze. Model Studio applications require configuration. For more information, see Configure file upload. For Coze, simply enable the switch without any additional settings.

Step 3: Integrate with a web page

  1. On the Integration tab, click Web Page Integration.

  2. On the Web Page Integration page, click Create Integration. In the dialog box that appears, enter an Integration Name and click OK.

    image

  3. After being redirected to the Web Configuration page, set the basic information as prompted.

    Note

    When you set the parameters, the preview page on the right updates dynamically. This lets you see the effects of your configuration in real time to ensure the final result meets your expectations.

  4. Select a Logon Configuration as needed. This section uses Anonymity as an example. For more configurations, see Manage logon configurations.

  5. Configure deployment information.

    1. Select a deployment method based on your business type and click OK to complete the configuration.

      • Standalone page deployment: Deploys the web page separately with a unique URL, allowing it to be accessed and run independently.

      • Iframe page embedding: Uses an Iframe to embed another HTML document within an existing page, displaying external content in a specific area.

      • Floating widget deployment: A small tool fixed to the edge of a web page, such as a customer service window or a "back to top" button, which appears or disappears based on user actions.

        Sample code

         <script src=https://d********dn.com/appflow/chatbot/v1/AppflowChatSDK.js></script>
            <script>
                window.APPFLOW_CHAT_SDK.init({
                    integrateConfig: {
                        integrateId: 'cit-e754b4f******1ba4c',
                        domain: {
                            requestDomain: 'https://******flow.aliyun.com'
                        }
                    },
                });
                <!-- Only userAvatar (a publicly accessible image URL), userName, and userId are currently supported. -->
                window.APPFLOW_CHAT_SDK.setUser({
                
                    userAvatar: 'https://appflow-chabot-cn-hangzhou.oss-cn-hangz*****5438522/cn-hangzhou/1737880126889/sunflower_picture.png',
                    userName: 'demo',
                    userId: '117***',
                });
            </script>
    2. The following figure shows the integration effect when accessing the deployment address of a standalone page.

      image

    3. Bind a custom domain name.

      Important

      For compliance reasons, the Alibaba Cloud endpoint is for testing only and is valid for 30 calendar days from the web integration creation date. Bind a custom domain name as soon as possible.

      1. In the Deployment Information section, click Bind Custom Domain.

      2. The first time you select this option, the AppFlow Service-Linked Role authorization page appears. Confirm and click Authorize.

        image

      3. AppFlow provides the following two methods to configure a domain name or IP address.

        Use a trusted entity domain name

        This method is for domain names that already have an ICP filing with Alibaba Cloud. If you want to create a domain name, see Getting started with domain name registration.

        1. Add or select your enterprise's entity domain name.

          If you have not added your domain name in AppFlow, click Add Domain and follow the prompts.

          image

        2. Click Save to complete the configuration.

        Use a Compute Nest Nginx agent

        This method is for domain names that do not have an ICP filing with Alibaba Cloud. The Compute Nest service automatically creates and configures an Nginx agent. The Compute Nest instance you select is automatically used as an internal network agent.

        1. Select a Compute Nest instance from the drop-down list.

          If none is available, click Deploy Compute Nest Instance to deploy one.

        2. On the page that appears, configure the parameters as needed and click Next: Confirm Order.

        3. Confirm the parameters and billing items for the service instance, and click Create Now.

          Note

          Deployment usually takes 1 to 3 minutes. Refresh the list and wait patiently.

        4. Copy the IP Whitelist and click Save.

          Important

          Save the IP Whitelist. You will need to add it later to the trusted enterprise IPs of your WeCom application.

      4. The following figure shows a comparison after binding a custom domain name.

        Test address

        Custom domain name

        image

        image

What to do next

Integrate with WeCom

After you integrate your RDS Copilot with a web page, you can embed it into a custom application in WeCom. This allows employees to access the RDS Copilot directly within WeCom, providing instant assistance and improving work efficiency and experience. For more information, see Integrate with WeCom.

Manage models

After creating an AI assistant, you can manage and adjust existing models and import new models. For instructions on these operations, see Manage Models.

Manage plugins

Adding plugins to your RDS Copilot can significantly improve its efficiency and professionalism. AppFlow offers a variety of ready-made plugins and supports custom plugin development. For more information, see Manage plugins.

Manage logon configurations

If you want to modify user identity verification or access control, you can change the logon configuration. For more information, see Logon configuration.

Configure file upload, speech, and image recognition

Configuring file upload, speech, and image recognition for your RDS Copilot can greatly improve data processing efficiency and enhance the user interaction experience. This might require coordination with other cloud products. For more information, see Configure speech and image recognition and Configure file upload.