Welcome to ROSMASTER A1 repository
2. Configuring API-KEY
Configure API-KEY
Configure API-KEY1. Course Content2. Start the Dify Service3. Configure Model Service Provider API-KEY4. Testing the API Key5. Configuring the multi_brains6. Modify the Dfiy service API7. Compiling the Function Package
1. Course Content
- Using the previously registered API key, configure the API key for the car.
[!WARNING]
Note: Please ensure the car system is connected to the internet to use the cloud-based model services.
2. Start the Dify Service
[!TIP]
ROSMASTER-A1 uses Dify to build a multi-agent system, with Dify centrally managing the access to cloud-based models.
- Connect to the car's infotainment system via VNC or SSH. Enter the following command in the terminal:
xxxxxxxxxxsh bringup_dify.sh

- View the infotainment system's IP address. This can be done via the OLED screen or in the terminal using
ifconfig.

- Enter the infotainment system's IP address directly into your browser's address bar to access the Dify management page. If this is the first time logging in, you will need to use a username and password. You can select the language in the upper left corner.
[!NOTE]
- Username:
yahboom@163.com- Password:
yahboom123- All account passwords, agent applications, and RAG data are stored locally.
- After logging in, see the image below.

3. Configure Model Service Provider API-KEY
- Click Settings

- Here, we take configuring the API for a Bailian account as an example. Click Model Provider -> Setup

- Enter your Bailian platform's API-KEY, then select whether it is an international battle account, and click Save.

4. Testing the API Key
[!TIP]
- If you need to test if the API key is available, you can refer to this tutorial. If not, you can ignore this section.
- Click on the yahboom-nuwa application in the studio (international clients can use the yahboom-nuwa_en application for testing).

- Click on "Decision-making AI" and "Executive-level AI," then select any model from the available options to test.


- After modifying the model, you need to click "Publish" in the upper right corner.
- Click Preview, then type "Hello" and press Enter

You can see the agent's reply

5. Configuring the multi_brains
- Enter the parameter file path
xxxxxxxxxx~/yahboomcar_ros2_ws/yahboomcar_ws/src/multi_brains/config/multi_brains_setting.yaml
Open the parameter file (using any method such as vscode, nano command line, or VNC), and make the following modifications in the multi_brains_setting.yaml file:
- Change the
LANGUAGEparameter to en - Select the corresponding application for the camera
- Change
ASR_SUPPLIERin ASR function setting to xunfei - Change
TTS_SUPPLIERin TTS function setting to xunfei
- Change the

- Other parameter modifications
LANGUAGE parameter: Domestic users should select zh, international users select en.
DEBUG_MODE parameter: Debug mode, when enabled you can see logs printed for each step in the terminal.
USE_ONLINE_ASR parameter: Select speech recognition method, can choose online or offline recognition. TRUE for online recognition (only Orin mainboard has offline recognition).
ASR_SUPPLIER parameter: Effective when online, domestic users need aliyun model, international users select xunfei model.
USE_ONLINE_TTS parameter: Select speech synthesis method, can choose online or offline recognition. TRUE for online recognition (only Orin mainboard has offline recognition).
TTS_SUPPLIER parameter: Effective when online, domestic users need aliyun, baidu models, international users select xunfei model.
6. Modify the Dfiy service API
- Note: This section is for reference only for users with development needs; it can generally be ignored.
- If you need to modify the API accessed by the car's infotainment system in the Dify application later, or if Dify is deployed on other servers, you will need to modify the address accessed by the car's infotainment system. Open the parameter configuration file:
xxxxxxxxxxgedit ~/yahboomcar_ros2_ws/yahboomcar_ws/src/multi_brains/config/multi_brains_setting.yaml
Locate the
DIFY_API_KEYandDIFY_BASE_URLparameters, where:DIFY_BASE_URLis the address for accessing the Dify backend serviceDIFY_API_KEYis the API key for the AI application in Dify
xxxxxxxxxx##################### dify setting# dify配置选项####################DIFY_BASE_URL"http://localhost/v1"DIFY_API_KEY"app-mhawRyoHteauIho7wvXhlhwR" #dify applies API_KEY7. Compiling the Function Package
Then, switch to the /yahboomcar_ros2_ws/yahboomcar_ws#/ workspace in the terminal: Recompile the multi_brains function package to apply the configuration (For Jetson Nano and Raspberry Pi , you need to enter Docker first)
xxxxxxxxxxcd ~/yahboomcar_ros2_ws/yahboomcar_ws/
Recompile the function package:
xxxxxxxxxxcolcon build --packages-select multi_brainssource install/setup.bash
