allow for a configurable ollama model storage directory (#897)

* allow for a configurable ollama models directory

- set OLLAMA_MODELS in the environment that ollama is running in to change where model files are stored
- update docs

Co-Authored-By: Jeffrey Morgan <jmorganca@gmail.com>
Co-Authored-By: Jay Nakrani <dhananjaynakrani@gmail.com>
Co-Authored-By: Akhil Acharya <akhilcacharya@gmail.com>
Co-Authored-By: Sasha Devol <sasha.devol@protonmail.com>
This commit is contained in:
Bruce MacDonald
2023-10-27 10:19:59 -04:00
committed by GitHub
parent e5d1ce4dde
commit 5c3491f425
4 changed files with 37 additions and 21 deletions

View File

@@ -18,10 +18,6 @@ import (
"github.com/jmorganca/ollama/version"
)
const DefaultHost = "127.0.0.1:11434"
var envHost = os.Getenv("OLLAMA_HOST")
type Client struct {
base *url.URL
http http.Client