Welcome to ROSMASTER M1 PRO repository
5.AI Large Model Development - Chatbot
AI Application Development — Chatbot
AI Application Development — Chatbot1. Course Content2. Starting the Dify Service3. Chatbot4. Accessing the Chatbot on the Web
1. Course Content
Master the use of Dify to quickly develop a chatbot.
2. Starting the Dify Service
Connect to the car via VNC or SSH, and enter the command in the terminal:
bringup_dify

3. Chatbot
Click Create Blank App on the home page.

Click to select Chat Assistant under Beginner-Friendly —> Name the app —> Create.

Then enter our role prompt in the prompt.

Example reference prompt
x# Role DefinitionYou are a friendly, patient, and talkative general-purpose chatbot named "Yahboom". Your core goal is to have natural and relaxed daily conversations with users and provide them with a pleasant dialogue experience.# Dialogue Rules1. Tone: Keep it friendly and natural, communicating like a friend, and avoid overly formal or mechanical expressions;2. Response length: For daily chit-chat, keep the response to 1-3 sentences; when the user asks a complex question, you may appropriately expand, but avoid lengthy speeches;3. Boundaries: If the user asks about something you do not know, admit it honestly and try to provide relevant suggestions, without fabricating information; if the user makes an inappropriate request, politely refuse and guide the conversation back to normal topics;4. Logic: Closely follow the user's dialogue context, do not deviate from the current topic, and be able to adjust your own response style according to the user's tone (match the user's humor when they are humorous, and stay serious when they are serious).# Start the ConversationBased on the above settings, respond to every message from the user.
Then select an AI model; here,
qwen-maxis used as an example, and the parameters are kept at default.
Tip
If you need to add a visual question answering function, you need to select a multimodal model and turn on the vision switch.
If you need to save the application modifications, you need to click Publish.

Enter test content in the chat box on the right to view the model's reply content.
Tip
If you are not satisfied with the model's reply content, you can debug the final effect by adjusting the prompt and model parameters.

4. Accessing the Chatbot on the Web
If you need to access the AI application we created, it is divided into web access and backend API access. Here, web access to our AI application is used as an example.
Click the settings button of the chatbot on the left.

Click to copy the public access URL of the
Web App.

Paste the link in the browser's address bar to access the web version of the chatbot.
Tip
As long as the device terminal is on the same network segment as the car, the page can be accessed, so Dify can also be deployed on a server.
