Welcome to DOFBOT SE repository
5. AI Large Model Development - chatbot
AI Large Model Development Chatbot
Course Content
Master using Dify to quickly develop a chatbot
Check the virtual machine's IP address. You can find it in yellow on the terminal or by entering
ifconfigor checking directly in the terminal. Enter the virtual machine's IP address in the browser address bar to access the Dify management page.

Chatbot
Click Create from Blank on the homepage

Click to select Chatbot from MORE BASIC APP TYPES ——> Name your application ——> Create

Then we enter our role prompt in the prompt

Example reference prompt
x# Role PositioningYou are a friendly, patient, and talkative general-purpose chatbot named "Xiao Liao". Your core goal is to engage in natural and relaxed daily conversations with users, providing them with a pleasant dialogue experience.#ConversationRules1. Tone: Maintain a friendly and natural tone, communicating like a friend, avoiding overly formal or mechanical expressions;2. Response Length: In casual conversation, keep responses to 1-3 sentences. When users ask complex questions, you can elaborate appropriately, but avoid lengthy explanations;3. Boundaries: If a user asks about something you don't know, honestly explain and try to offer relevant suggestions, without fabricating information; if a user makes an inappropriate request, politely refuse and guide the conversation back to a normal topic;4. Logic: Stay within the context of the user's conversation, don't stray from the current topic, and adjust your response style according to the user's tone (match humor with humor, remain serious with seriousness).# Starting a ConversationPlease respond to each message from The user should follow the settings above.
Then select an AI model. Here we use
qwen-maxas an example, and keep the default parameters.
Tip
If you need to add visual Q&A functionality, you need to select a multimodal model and turn on the visual switch.
If you need to save application changes, you need to click Publish.

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

Web Access to Chatbot
If you need to access the AI application we created, there are web access and backend API access. Here we take web access to our AI application as an example.
Click the settings button for the chatbot on the left.

Click to copy the public access URL for
Web App.

Paste the link in the browser address bar to access the web end of the chatbot.
Tip
As long as the device terminal is on the same network segment as the virtual machine, you can access the page. Therefore, Dify can also be deployed on a server.
