Today we're going to dive into analyzing the AI capabilities of cloud development. This time, the focus of the discussion will no longer be on the previously mentioned ability to write code in a cloud IDE, but on something much broader and more practical - how to leverage the various modular capabilities offered by cloud platforms to develop quickly and efficiently. Today's topic is still centered around AI, but that doesn't stop us from starting with the opening of the platform's capabilities and walking you through the AI capabilities of cloud development step by step.
In this process, we will take the WeChat subscription number backend as an example to show the whole development process. After all, as one of the very popular application scenarios, WeChat subscription number has a high degree of practicality and representativeness in its development mode and requirements, so it will be the main object of our explanation.
Open Cloud Platform
First of all, we need to log in to the Tencent cloud console to open the WeChat cloud development background, the address is as follows:/
Just enter and click on Free Trial directly. Then create a new environment with your favorite name.
It's still in the process of being free for a month for new users. So no cost to us here, but remember to remember to turn off auto-renewal if you just want to use it for a bit.
Rapid development of AI applications
Once opened, you'll be in the latest version of the cloud development backend. As shown in the picture:
Next, I'm going to talk about the features on cloud development that have more exposure to AI, and today we're going to talk about low-code development, AI+large models, and AI+intelligent body development. Okay, let's get started.
Low-code development
First of all, we all basically have development needs, maybe our business is small and we basically can't use the power of AI + Big Models, but you can also use cloud development, here's a low-code module for visual development. Create a website in a single sentence.
Here we only briefly mention because it is not related to microsoft subscription, but there may be people who will use to one-click to build a website needs.
A text description that generates a website
The interface is also simple, a chat interface commonly used by big models, and no fancy buttons. We went straight to asking him to generate a shopping site for me
Generation is relatively slow, I demonstrated here to generate the effect, it is not bad, at least eliminates some of the basic operations in the early stage, the screen beautification can be followed up to continue to adjust in-depth can be:
AI+
There are two modules here, one is docked to the basic big model, the other is docked to the Agent intelligences, but there is not much orchestration ability, only support for the knowledge base. Basically, it is also enough for basic use, let's look at the effect of these two.
large model
The in-house hunyuan is provided here, and of course the superb third-party big models are also included, as shown in the picture:
Let's continue with the hunyuan demo. Just go to the console and apply for it yourself, but don't apply for the wrong key, and don't apply for an OpenAI-compatible key this time:
Here is not for the subscription backend, it is for H5 and small program applications. Because he will expose some easy SDK for you to call, there will be no need to dock the complex API interface.
Agent Intelligence
Smart Bodies can quickly access our subscription backend. First we create a new smartbody. Let's take marketing as an example.
It's certainly better if you have your own knowledge base, which can also be configured here:
Then configure it to your own microsoft app id:
Finally, just authorize it and it will work fine
I won't demonstrate it here, the operation is very simple.
workflow
The workflow here has many roles, we are individual users do not involve the payment module, we will look at the docking WeChat subscription number background alone is how to quickly develop. The above AI Agent can basically already handle the ability to reply to the background of the subscription number, but the workflow is able to deal with a variety of business capabilities, there is a code ability of the partners is able to try the workflow.
Subscription message push
We can look at how to quickly dock the WeChat management backend in the cloud development platform without having to buy our own server and then write all kinds of docking code like before.
First we use the ready-made template interface directly.
Configure it right here to listen to message pushes properly.
Remember to use the debug URL as the server URL in the cloud development backend, not the Receive Push URL above.
Start listening to receive the message, here note, if your WeChat back-end access to other third-party listening to your message, here is normal can not listen to. So I reopened a test number to listen.
Here the js script node writes how to handle the message. Of course if you have any other development needs, there is also a lot of api interface documentation here for you to use to view. For example you can call any of your cloud functions or common http calls. Click to edit the js script.
Cloud function call examples are also available.
These api's are basically enough, but of course if they still don't work, then you can fill out the application:
Embedded AI Answer
All of the above is said around js scripts, what if you want your reply ability to be embedded in AI? Of course you can add AI big model nodes. Just pull it in directly.
Then we then need to configure things. It's the js output and the text format of the message output. I'm going to go over what each of these fields mean, so you can manipulate them as well:
Of course if you don't want hunyuan, you can configure other models and just create a new one yourself.
Hint word: you can totally read into the questioning, not the persona part as you might think.
Message History: Here you have to define a set of array objects, which can include the system, which is often referred to as the prompt word, and a set of message history. The following:
[
{
"role": "user",
"content": "Hello"
},
{
"role": "assistant", "content": "Please enter your question" }, {
"content": "Please enter your question."
}, { "role": "assistant", "content": "Please enter your question
{
"role": "user", "content": "Good morning
"content": "Good morning"
}, { "role": "user", "content": "Good morning
{
"role": "assistant", "content".
"content": "Good morning to you, too."
}
]
First, turn the output of the js script into normal text without special formatting, otherwise it will affect the big model answer. Other cases can be handled as appropriate, the code is as follows:
Next, we're going to add the reference variable, which is the user's normal question.
Finally edit the response field, because we need to return a fixed format for WeChat to recognize it. As shown in the picture:
The final result is seen below:
Remember here, don't set it to asynchronous at the listener node, asynchronous can't return data. Only synchronous messages can, as shown in the figure:
After publishing, it can be directly integrated into our WeChat subscription number, remember to change the URL of our WeChat backend to this official one, not the original debug URL:
Finally all services are normal now.
solution difficulties
What if you really have a problem that can't be solved? Don't worry, there are professional 7 * 24 hours of question and answer specialists. If you have any questions, just ask them directly.
Or you can choose to submit a work order. And as usual, you can always deal with your dedicated problem.
summarize
In short, the cloud development platform provides developers with an efficient, flexible and easy-to-use environment, especially in applications that combine with AI technologies. With features such as low-code development and access to large models and intelligences, developers can easily build complex AI applications without having to write large amounts of code in depth. In addition, the WeChat Subscription backend example demonstrates how integration with the platform can be achieved quickly with cloud development, simplifying the process and improving development efficiency.
With the continuous development of AI technology, the modularization capability of the cloud platform provides us with more possibilities to meet almost all kinds of development needs, from low-code to high-performance large-model applications. Whether you are a beginner or an experienced developer, you can quickly realize ideas and put them into actual business with the help of the cloud platform.