Welcome to ROSMASTER A1 PRO repository
5.AI Large Model Development - chatbot
AI Large Model Development - Chatbot
AI Large Model Development - Chatbot1. Course Content2. Starting the Dify Service3. Chatbot4. Accessing the Chatbot via the Web
1. Course Content
Master how to quickly develop a chatbot using Dify.
2. Starting the Dify Service
Connect to the onboard computer via VNC or SSH, and enter the following command in the terminal:
sh ~/bringup_dify.sh

Log in to the backend using the IP address.
3. Chatbot
Click Create from Blank on the home page.

Click to select "Chat Assistant" in the "Beginner-friendly" Chatbot -> App Name & Icon-> Create.

After that, we enter our role prompt in the Prompt field.

Example reference prompt
x# Role DefinitionYou are a friendly, patient, and talkative general-purpose chatbot named "Yahboom". Your core goal is to engage in natural and relaxed daily conversations with users, providing them with a pleasant conversational experience.# Conversation Rules1. Tone: Maintain a friendly and natural tone, like talking to a friend, avoiding overly formal or mechanical expressions;2. Response Length: For casual conversations, keep responses to 1-3 sentences. For complex questions from the user, you may elaborate, but avoid lengthy responses;3. Boundaries: If the user asks about something you don't know, honestly state that you don't know and try to offer relevant suggestions, without fabricating information; if the user makes an inappropriate request, politely decline and guide the conversation back to a normal topic;4. Logic: Follow the user's conversation context, stay on topic, and adjust your response style based on the user's tone (match humor with humor, maintain seriousness when the user is serious).# Start ConversationPlease respond to each of the user's messages according to the settings above.
Then select an AI model. Here,
qwen-maxis used as an example, and the parameters are kept at their defaults.
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 application changes, 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, you can tune the final effect by adjusting the prompt and the model parameters.

4. Accessing the Chatbot via the Web
If you need to access the AI application we created, there are two ways: web access and backend API access. Here, accessing our AI application through the web is used as an example.
Click the Settings button of the chatbot on the left side.

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

Paste the link into the browser address bar to access the web interface of the chatbot.
Tip
As long as the device terminal is on the same network segment as the onboard computer, the page can be accessed. Therefore, Dify can also be deployed on a server.
