http://localhost:11434
.
For other models, visit Ollama Models for more details.
Settings > Model Providers > Ollama
, fill in:
llama3.2
http://<your-ollama-endpoint-domain>:11434
Enter the base URL where the Ollama service is accessible. If filling in a public URL still results in an error, please refer to the FAQ and modify environment variables to make Ollama service accessible from all IPs
If Dify is deployed using Docker, consider using the local network IP address, e.g., http://192.168.1.100:11434
or http://host.docker.internal:11434
to access the service.
For local source code deployment, use http://localhost:11434
.
Chat
4096
The maximum context length of the model. If unsure, use the default value of 4096.
4096
The maximum number of tokens returned by the model. If there are no specific requirements for the model, this can be consistent with the model context length.
Yes
Check this option if the model supports image understanding (multimodal), like llava
.
Prompt Eng.
page of the App that needs to be configured, select the llava
model under the Ollama provider, and use it after configuring the model parameters.
localhost
usually refers to the container itself, not the host machine or other containers.
You need to expose the Ollama service to the network to resolve this issue.
launchctl
:
launchctl setenv
.
host.docker.internal
. Therefore, replacing localhost
with host.docker.internal
in the service will make it work effectively.
systemctl
:
systemctl edit ollama.service
. This will open an editor.
Environment
under section [Service]
:
systemd
and restart Ollama:
OLLAMA_HOST
, OLLAMA_MODELS
, etc.ollama
from a new terminal windowOLLAMA_HOST
environment variable.