Merge pull request #3835 from dhiltgen/harden_llm_override

Trim spaces and quotes from llm lib override
This commit is contained in:
Daniel Hiltgen 2024-04-22 19:06:54 -07:00 committed by GitHub
commit ee448deaba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -180,7 +180,7 @@ func NewLlamaServer(model string, adapters, projectors []string, opts api.Option
availableServers := availableServers() availableServers := availableServers()
servers := serversForGpu(info) servers := serversForGpu(info)
demandLib := os.Getenv("OLLAMA_LLM_LIBRARY") demandLib := strings.Trim(os.Getenv("OLLAMA_LLM_LIBRARY"), "\"' ")
if demandLib != "" { if demandLib != "" {
serverPath := availableServers[demandLib] serverPath := availableServers[demandLib]
if serverPath == "" { if serverPath == "" {