Configure AI large model

0. Contents Introduction (Must Read Before Use)

0.2 International Users

0.2.1 Required Configuration Items

0.2.2 Optional Configuration Items

2. Account Configuration

2.1 Register an OpenRouter Platform Account

This step can be omitted; select as needed. Domestic users use the Bailian Large Model platform's model service by default. If you need to use single-model inference, refer to this tutorial to register an OpenRouter account.

2.1.1 Register an Account

Open the openrouter link and click the profile picture in the upper-right corner to register an account. Use your email address to register an account. The process is similar to the above and will not be repeated here.

15

Click Keys in the upper right corner to create an API key.

image-20250710144913914

Click Create API Key, then enter a name. Here, we use "yahboom" as an example. Then, click Create to complete the OpenRouter platform account registration and API key application.

image-20250710145035049

2.1.2 Create an API key.

After completing the first step of registration and login, click Keys in the list below your avatar in the upper right corner of the official website. Click Create API Key on the API key page. Then, enter a name. Here, we use "yahboom" as an example. Then, click Create to complete the creation.

image-20250710145035049

2.2 Registering an Account on the Alibaba Bailian Large Model International Platform

Open the Alibaba Bailian Large Model International Platform link and click Log in. Register an account

image-20250710142915777

image-20250710143059018

Select "Individual Account" to register.

image-20250710143154095

Return to the Bailian Model homepage and click "Get Free Credit" to complete your Bailian Model International registration.

F6342D18-D293-408c-9633-7120AEECDD70

8E63A23C-7AFD-4a89-BFF5-22E4E5688098

This completes the account registration and API key creation for Alibaba Bailian International.

3. Course Content

3. International Version Configuration

3.1 Entering the dify Configuration Page

Since dify is not enabled by default in the factory image, we must first enable dify to configure the international version.

dify will automatically load, allowing you to configure the following settings.

image-20250827171449080

image-20250827171504256

The page after entering dify is as follows:

image-20250827171524473

If you are accessing the website from an unfamiliar device, you will need to log in with your account:

3.2 Enter the API key.

Click your profile picture in the upper right corner, then click Settings.

image-20250827171555429

Click Model Provider, then click Setup for the corresponding model provider.

image-20250827171611379

Enter the API key you applied for in [2.3 Registering an OpenRouter Platform Account], then click Save.

image-20250827171621585

Click Setup for Tongyi, then enter the API key you applied for in [2.4 Registering an Alibaba Bailian Large Model International Platform Account], then select Use International. Endpoint, then click Save.

image-20250827171633276

3.3 Configuring the Decision-Making Level Model

3.3.1 Switching the Decision-Making Level Model

Return to the Studio interface and click Decision-Making Level AI Applications

image-20250827171712670

Click the Chat option in the upper-right corner and click the drop-down button to bring up a list of available models. This example uses the free model qwen2.5-72b-instruct, but other models are also available.

image-20250827171723693

After selecting your model, click Publish, then Publish Update to complete the model switch configuration.

image-20250827171734577

3.3.2 Replace and Update the Prompt Words

Copy the prompt words from the Decision-making-level-AI.md file in the accompanying documentation into the prompt words for the Decision-making-level AI application. Click Publish to publish the application. This configuration will take effect.

image-20250827171749945

3.3.3 Configuring the Decision-Level Knowledge Base

If you need to customize your intent mappings or add other open-domain knowledge or customized training samples, you can enrich the capabilities of the large model by adding a decision-level knowledge base.

Find the Knowledge tab and click +Add.

image-20250827171809748

Select the knowledge base you created and click Add.

image-20250827171820914

Then click Publish to complete the knowledge base configuration.

image-20250827171835362

3.4 Configuring the Execution-Level Model

3.4.1 Switch the execution layer model

On the Studio page, click Execution layer AI.

image-20250827171900582

Select a model from the list in the Model Options bar on the right. Here, we use qwen-vl-latest as an example.

image-20250827171911610

3.4.2 Replacing and Updating the Execution Layer Prompt Words

Copy the prompt words from the Execution-layer-AI.md file in the accompanying documentation into the prompt words of the Execution Layer AI application. Then click Publish to publish the application. This configuration will take effect.

image-20250827171926407

3.5 Expanding the Knowledge Base

Click Knowledge on the main screen, then click Create knowledge to create a new knowledge base.

image-20250827171939204

Select Import from file , then click Browse to browse for the local file and upload it. After uploading, click Next.

image-20250827172004040

You can choose High Quality or Economical embedding vectors. The difference between the two is:

image-20250710175934460

Click Save & Process at the bottom of the page to save.

image-20250827172205724

After the vector embedding is complete, the following display appears:

image-20250710180730063

This completes the creation of a custom knowledge base.

For information on how to use this knowledge base, refer to [3.3.3 Configuring the Decision-Layer Knowledge Base].

3.6 How to View Free Models on the OpenRouter Platform

On the OpenRouter official website, click Model and select "free" in the Prompt pricing filter to display free models.

image-20250827172249138

3.7 Using International Version Parameters

yahboom.yaml

International version users need to comment out the parameters for the domestic version.

Jetson Orin Nano, Jetson Orin NX Hosts:

Jetson Nano, Raspberry Pi Hosts:

You need to first enter Docker.

The commented-out content for the domestic version is shown below:

image-20250827172358770

large_model_interface.yaml

USB camera/depth camera users need to modify the corresponding API ID in the configuration file.

Jetson Nano host:

Jetson Nano, Raspberry Pi host:

You need to first enter Docker.

image-20250912172956341

Then compile the function package and save the configuration:

Each time you modify the configuration parameters of the large model, you need to recompile the function package for the configuration to take effect. The method is as follows:

Switch to the yahboomcar_ros2_ws/yahboomcar_ws/ workspace on the vehicle terminal and recompile the largemodel package to take effect.