Welcome to Raspbot V2 repository
当製品の日本語版マニュアル資料は、こちらからご取得ください。
5.Configure AI large model(Required)
Configure AI large model
Configure AI large model1. Overseas Version of OpenRouterOpenRouter Operation Steps2. Overseas Version of Tongyi Qianwen3. Local DIFY Configuration3.1 Enter the API key.
For large-scale model examples, an important prerequisite is connecting to a Wi-Fi network with internet access. For details on how to connect, see "Raspberry Pi Basic Settings" under "Raspberry Pi System Configuration" - 04. Network Settings for specific instructions.
This tutorial is about configuring large AI models. To run large model-related examples properly, follow the steps below.
1. Overseas Version of OpenRouter
Some online large models in the overseas version startup examples use the middleware of the OpenRouter platform, a third-party platform. This large model can be used 50 times per day for free. If you wish to continue using it, refer to the usage rules for expansion.
The following examples require this large model: scene description, dual-model intelligent agent application, intelligent action choreography, and free conversation.
OpenRouter does not have free models for video analysis or text-to-image creation, so models from the Tongyi Qianwen platform are required.
OpenRouter Operation Steps
- Log in to the official website:
- Log in. You can use a variety of methods, but this article recommends using a GitHub account.

- Go to the API-KEY page and create one.


- Copy and save the created key to your computer. You can only copy this key the first time you create it; you won't be able to view it again after leaving this page.

- Next, we'll use a free test model to see if the registered account is functioning properly.


- If the response is normal, it means it's functioning properly.


- The API key you create directly supports free models. If you wish to use non-free models, you will need to purchase the required amount with your credit card. This tutorial will not be explained in detail, so please research it on your own.
2. Overseas Version of Tongyi Qianwen
Some of the online large models in the overseas version startup examples use Tongyi Qianwen's large visual model. This platform is a third-party platform, and the large model is a powerful visual model provided by Alibaba. After registration and authentication, you can use some of the large model for free, or pay for additional model usage according to the website.
The following examples require this large model: dual-model intelligent agent-object tracking, video description, and text-based image creation.
- Open the website and register.


- After registration, enter your contact information based on your country and verify your identity. Without verification, you will not be able to receive the free large model.

- Go to Large Models, select Qwen-VL-Max, and receive your free model. Withdraw some large model credits





- Register your own API Key


Then remotely access the system of the car using VNC and open a terminal. For instructions on how to access the system using VNC, please refer to the tutorial in Chapter 1.
- Enter in the terminal
shellnano /home/pi/project_demo/09.AI_Big_Model/API_KEY.py

Then, following the prompts, enter the OpenRouter API-KEY and the API-KEY for TONYI_KEY. Press Ctrl+S to save and Ctrl+X to exit. You can now run the Big Model demo in the English version. The Spark Big Model key used by international customers is already included in the relevant examples and does not need to be entered here.
3. Local DIFY Configuration
The image's Dify function is disabled by default. Execute the above command to enable it.
xxxxxxxxxxcd ~/dify-1.6.0/docker./docker-compose-linux-aarch64 up -dThis will enable it.
If you don't want Dify to be running all the time (not recommended for 2GB of RAM), execute the following command to disable it.
xxxxxxxxxxcd ~/dify-1.6.0/docker./docker-compose-linux-aarch64 downEnter the Dify configuration page
- Observe the IP address of the OLED screen
- Open a browser on any computer in the Raspberry Pi system on the same network segment as the car and enter the IP address + :80 in the address bar. For example:

The page after entering dify is as follows:

If you are accessing the website from an unfamiliar device, you will need to log in with your account:
- Username: yahboom@163.com
- Password: yahboom123
3.1 Enter the API key.
Click your profile picture in the upper right corner, then click Settings.

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

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

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

At this point, set DIFY_SWITCH=True in API_KEY.py to run the configured agent in dify.
