mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
move OLLAMA_HOST to envconfig (#5009)
This commit is contained in:
parent
bba5d177aa
commit
c69bc19e46
6 changed files with 119 additions and 103 deletions
|
@ -960,17 +960,11 @@ func generate(cmd *cobra.Command, opts runOptions) error {
|
|||
}
|
||||
|
||||
func RunServer(cmd *cobra.Command, _ []string) error {
|
||||
// retrieve the OLLAMA_HOST environment variable
|
||||
ollamaHost, err := api.GetOllamaHost()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := initializeKeypair(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ln, err := net.Listen("tcp", net.JoinHostPort(ollamaHost.Host, ollamaHost.Port))
|
||||
ln, err := net.Listen("tcp", net.JoinHostPort(envconfig.Host.Host, envconfig.Host.Port))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue