move OLLAMA_HOST to envconfig (#5009)

This commit is contained in:
Patrick Devine
2024-06-12 18:48:16 -04:00
committed by GitHub
parent bba5d177aa
commit c69bc19e46
6 changed files with 119 additions and 103 deletions

View File

@@ -2,7 +2,6 @@ package api
import (
"encoding/json"
"errors"
"fmt"
"log/slog"
"math"
@@ -377,8 +376,6 @@ func (m *Metrics) Summary() {
}
}
var ErrInvalidHostPort = errors.New("invalid port specified in OLLAMA_HOST")
func (opts *Options) FromMap(m map[string]interface{}) error {
valueOpts := reflect.ValueOf(opts).Elem() // names of the fields in the options struct
typeOpts := reflect.TypeOf(opts).Elem() // types of the fields in the options struct