🐛 Did not use ollama server url set in config

This commit is contained in:
LittleSheep 2025-01-30 02:14:41 +08:00
parent 974266b2c1
commit 53e9d4de03

View File

@ -29,7 +29,7 @@ var LargeModel *ollama.LLM
func ConnectOllama() error {
model := viper.GetString("ollama.model")
llm, err := ollama.New(ollama.WithModel(model))
llm, err := ollama.New(ollama.WithModel(model), ollama.WithServerURL(viper.GetString("ollama.url")))
if err != nil {
return err
}