Source code acquisition

Discover tools, trends, and innovations in eu data.
Post Reply
Rina7RS
Posts: 542
Joined: Mon Dec 23, 2024 3:35 am

Source code acquisition

Post by Rina7RS »

The code involved in this case has been published on the GitCode platform:

Execute git clonePull source code

git clone

2. ModelArts Studio Model Service
2.1 Access ModelArts Studio Model Deployment
Enter the cloud host , open the browser, and enter
2.2 Receive free Token quota
Get 10 million free tokens, which can be used to experience Qwen, Chatglm and other series models. The free tokens are only suitable for experience models. The Qwen2.5 series pre-built services also support Function Calling, which can be used to build Agents.

2.3 Get the large model API and name
Take as Qwen2_5-72B-Instructan example, click More-Call to kazakhstan mobile phone number list obtain the API address and model name.

2.4 Create an API Key
Authentication Management on the left-Create API Key and save the created key information

You can create up to 5 keys. The key will only be displayed once after it is created. Please keep it properly.

2.5 Debugging Large Model API
We use the curl script to debug the large model API. To ensure that the API configuration is available, execute the following command in the terminal.

3 Run MateChat
Through the above two steps, we have obtained the required environment, code, and large model API configuration. Next, we will install the dependencies and modify the configuration to finally run MateChat.

3.1 Installation Dependencies
We enter the project and execute the command to install dependencies:

cd MateChat-Web && npm install

The installation result is as shown below, indicating that the dependency installation is successful.

3.2 Modify configuration

Its contents are:

This is because the large model API provided by Maas does not support client calls, so we need to forward the request through express.

Then we use cpthe command to copy a .envconfiguration file named

Then we open and edit the file using the emacs software that comes with the cloud host .env:

You can also use the vi command to modify .env; the purpose is to configure the large model API, note that the chat/completion part needs to be deleted.

3.3 Run MateChat
After confirming that the configuration is correct, run the program with the following command:

npm run start

Hold down Ctrl and click

Try asking a question and see the response from MaasAPI:


At this point, we have successfully run MateChat!

I am participating in the first phase of [Case Co-creation] to write cloud product application construction and development best practices/evaluations, and co-create the official document.
Post Reply