Skip to content

Customize your local AI assistant using Dify ​

Dify is an AI application development platform. It's one of the key open-source projects that Olares integrates to help you build and manage AI applications while maintaining full data ownership. Additionally, you can integrate your personal knowledge base documents into Dify for more personalized interactions.

Learning objectives ​

In this guide, you will learn how to:

  • Connect Dify to a local chat model through Router.
  • Create an assistant and add documents to its knowledge base.

Before you begin ​

  • Install Qwen3.8-27B (llama.cpp) from Market.

Install Dify ​

INFO

Starting from Olares 1.11.6, if "Dify For Cluster" or "Dify" was previously installed, uninstall them before proceeding.

  1. Install "Dify Shared" from Olares Market.
  2. Launch Dify from your desktop. Please ensure the admin has already installed Dify Shared.

Create an AI assistant app ​

  1. Open Dify, navigate to the Studio tab, and select Create from Blank to create an app for the AI assistant. Here, we created an agent named "Ashia". Create App

  2. Click Go to settings on the right to access the model provider configuration page. You can choose between remote models or locally hosted models. App initial age

Add a chat model through Router ​

Get model connection details ​

  1. Open Router from Launchpad. On Default models, set Qwen3.8-27B (llama.cpp) as the default chat model and wait until default-chat shows Callable.

  2. Copy the Router address from your browser. Keep only the protocol and domain, then append /v1. Replace the domain in this example with your own:

    text
    https://router.laresprime.olares.com/v1

Configure the model in Dify ​

  1. In Dify, open Settings > Model Provider, then install and select the OpenAI-API-compatible provider plugin.
  2. Add a model with Model Name set to default-chat and the model type set to chat or LLM.
  3. Set Base URL to the URL copied from Router, including /v1. Leave the API key empty if allowed, or enter olares if required.
  4. Save the configuration.

Configure Ashia ​

  1. Navigate to Dify's Studio tab and enter Ashia.

  2. From the model list on the right, select the default-chat model you just configured.

  3. Click Publish. Now you can chat with Ashia in the Debug & Preview window.

    Chat

Set up local knowledge base ​

  1. In Dify, navigate to the Knowledge tab.
  2. Locate your default knowledge base. It will be named after your Olares ID and monitors the /Documents folder in Files. Default KB
  3. Enter /Documents and add documents to the knowledge base. Default KB
  4. In Ashia's orchestration page, click addAdd to add context support for Ashia. Add KB
  5. Click Publish. Now try asking a domain-specific question with the help of the knowledge base. Add KB