Dify
Customer service systems are an important bridge between enterprises and consumers. However, traditional human-based customer service faces pain points such as high labor costs, difficulties in data collection and analysis, and the inability to provide 24/7 support.
With the rise of AI large models, a key question has emerged: how can advanced LLMs be leveraged to build intelligent customer service systems that deliver 24/7 natural, seamless conversations at lower cost, improve user efficiency, and enhance satisfaction?
You can build intelligent dialogue assistants based on the open-source framework Dify to allow users to directly call large models for open-ended Q&A. This approach applies to multiple business scenarios, including intelligent customer service, knowledge Q&A, and personalized recommendations. MaaS integrates large models such as DeepSeek and GLM. These large models are fully adapted and optimized on AI cloud services, resulting in significant improvements in accuracy and performance.
This section introduces how to use MaaS model APIs to connect to Dify (an open-source Agent platform), quickly build an AI chatbot, and embed it into a webpage.
Solution Architecture
- The user submits a request through the customer service chatbot interface on Dify.
- Dify sends the request to the MaaS model service.
- The MaaS model service processes the request and returns the results to Dify.
- Dify optimizes the results and returns them to the user through the customer service chatbot interface.
Billing
The built-in services can be used for calling. The services are billed based on the number of tokens used:
You can directly experience or call the model service for inference without waiting for deployment. You are billed based on the number of tokens. For details, see Inference Service Billing Items.
Constraints
This function is only supported in the CN-Hong Kong region.
Prerequisites
- You have registered a Huawei Cloud account. For details, see Signing Up for a Huawei Cloud Account.
- For details, see Configuring MaaS Access Permissions.
Step 1: Deploy Dify on a Single Cloud Server
Dify is a robust open-source platform for developing LLM applications. It merges the concepts of Backend as a Service (BaaS) and LLMOps, offering user-friendly GUIs and APIs to simplify the creation of scalable generative AI applications.
- Quickly deploy Dify on a FlexusX instance. For details, see the single-server deployment method in Quickly Setting Up the Dify-LLM Application Development Platform.
Dify must be deployed in the same region as the MaaS model service. In this example, Dify is deployed in the CN-Hong Kong region.
- Log in to Dify.
Upon your first login, enter the email address, username, and password and click Set up to create an administrator account
Figure 2 Creating an administrator account
Step 2: Obtain Model Information from MaaS
On the MaaS platform, you can call built-in service models. To call a model, you need to obtain the API URL and model name and create an API key.
- Obtain the Model ID and API URL
- Go to the Real-Time Inference page of MaaS. The Built-in Services page is displayed by default. Figure 3 Real-Time Inference page
- In the Operation column of the model, click API Calling and select a version. On the View API Call Description page, obtain the API URL and model ID.

- Go to the Real-Time Inference page of MaaS. The Built-in Services page is displayed by default.
- Obtain an API Key
If you already have an API key, you can use it. If you do not have an API key, go to the API Key Management page to create one.
Step 3: Connect Dify to the MaaS Model Service
- Log in to Dify and click Plugins in the upper right corner. Figure 4 Dify platform
- Click Explore Marketplace, enter MaaS in the search box, select for Huawei Cloud MaaS, and click Install. The Install Plugin dialog box is displayed. Figure 5 Searching for a plug-in
- On the Install Plugin page, click Install to install the MaaS plug-in. Figure 6 Installing the MaaS plug-in
If the MaaS plug-in has been installed, upgrade it to the latest version.
- After the MaaS plug-in is installed, click the username in the upper right corner of the Dify page and choose from the drop-down list. The Settings page is displayed. Figure 7 Settings page
- In the navigation pane, choose . Click Config on the right of the MaaS plug-in to configure the API key. Figure 8 Model Provider
- On the API key-based authorization configuration page, enter the API key obtained in Step 2: Obtain Model Information from MaaS and click Save. The key authorization is successful. Figure 9 API key-based authorization settings
- Click Show N Models under the plug-in. The model list is displayed, as shown in the following figure. Figure 10 Adding a model
Figure 11 Model list
Step 4: Create a Customer Service Chatbot in Dify
- Go to the Studio page of the Dify platform and click . Figure 12 Create from Blank
- On the Create from Blank page, select Chatbot, enter the App Name & Icon, and click Create. Figure 13 Creating an application
- After the customer service chatbot is created, the application debugging page is displayed. Select a provisioned model in the upper right corner and enter a question in the chat box below. If the model responds normally, the customer service chatbot is successfully installed. Figure 14 Application debugging page
- Click Publish in the upper right corner of the page. The application is published successfully. You can perform operations such as Publish Update, Run App, and Embed into Site on the application. Figure 15 Publishing an application
Helpful Links
For more applications on the Dify platform, see Using Dify.
FAQ
How long does it take for an API key to become valid after it is created in MaaS?
A MaaS API key becomes valid a few minutes after creation.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot