
git clone --depth=1 https://github.com/langgenius/dify
cd dify/docker
cp .env.example .env
sudo docker compose --env-file .env up -d
- Dify →
<user>
→ Settings → Model Provider
- Ollama → Setup
Model Name: llama3.1:8b
Base URL: http://<your_host>:11434
- Ollama → Add Model
Model Type: Text Embedding
Model Name: mxbai-embed-large:latest
Base URL: http://<host>:11434
Model Type: Text Embedding
Model Name: jina/jina-embeddings-v2-base-en
Base URL: http://<host>:11434
- OpenAI → Setup
API Key: <apikey>
API base: https://api.openai.com
- OpenAI → Show Models
- Dify → Studio → Chatbot → Create from Blank
APP icon & name: llama 3.1
- Studio → llama 3.1 →
<model>
CHAT → llama3.1:8b
- Dify → Knowledge → Create Knowledge → Upload files → Save & Process → Go to Documents
Index mode: Economical
- Studio → llama 3.1 → Context → Add →
<knowledge>
