Next, in the previous article, we will create an agent in dify.
We open our deployed dify homepage and click to create a blank application.
We randomly select one, defaulting to the first one, the chat assistant.
Fill in the relevant information, then click create.
Next, we will make relevant settings for this demo, such as prompts, llm configuration, etc.
We will directly choose ollama, but you can also choose others, such as chatgpt, grok, etc.
Set up ollama by selecting llm, filling in the url, adding the model, and then clicking save.
At this point, there may be a brief lag, but it’s fine, just wait for it to add successfully. Does that url look familiar? Port 8434, yes, that’s the one after opening!
The url that prompts "Ollama is running."
On the successful addition page, a model list will appear.
Close the dialog box, at this point, it prompts that there is a problem with the model.
Click 1 once, then click 2, and select the ollama model we just added.
Modify parameters according to your needs; I set the temperature to the default 0.8.
Then proceed to debugging.
I used the official prompts from deepseek.
After debugging is complete, we can set some functional settings, in the bottom right corner.
Which functions to enable depends on personal needs.
After setting is complete, we click the close button in the upper right corner.
Once done, we click the publish button in the upper right corner to publish.
After successful publication, how do we embed it into a webpage?
Click the small arrow next to the publish button and select "Embed on website."
Choose a suitable layout based on the style.
Note the URL here; they are actually incorrect and need to be modified to:
http://80.app.cloudstudio.work/
Change to:
https://evwewc-tzfevj-80.app.cloudstudio.work/
For example, the original web page.
Let’s embed it into this page and see the effect; we click to start chatting.
Look at the prompt.
At this point, the first dify application has been successfully built.
Note here that the api address recognized by dify is incorrect.
Dify recognizes: http://80.app.cloudstudio.work/v1
While the actual address is the one in the red box above: https://evwewc-tzfevj-80.app.cloudstudio.work/v1