Move envconfig and consolidate env vars (#4608)

This commit is contained in:
Patrick Devine 2024-05-24 14:57:15 -07:00 committed by GitHub
parent afd2b058b4
commit 4cc3be3035
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 81 additions and 51 deletions

View file

@ -15,6 +15,7 @@ import (
"golang.org/x/exp/slices"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/progress"
"github.com/ollama/ollama/readline"
"github.com/ollama/ollama/types/errtypes"
@ -183,7 +184,7 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error {
return err
}
if os.Getenv("OLLAMA_NOHISTORY") != "" {
if envconfig.NoHistory {
scanner.HistoryDisable()
}