Move hub auth out to new package

This commit is contained in:
Daniel Hiltgen
2024-02-05 12:59:52 -08:00
committed by jmorganca
parent 9da9e8fb72
commit f397e0e988
6 changed files with 142 additions and 115 deletions

View File

@@ -25,6 +25,7 @@ import (
"golang.org/x/exp/slices"
"github.com/jmorganca/ollama/api"
"github.com/jmorganca/ollama/auth"
"github.com/jmorganca/ollama/gpu"
"github.com/jmorganca/ollama/llm"
"github.com/jmorganca/ollama/openai"
@@ -479,7 +480,7 @@ func PullModelHandler(c *gin.Context) {
ch <- r
}
regOpts := &RegistryOptions{
regOpts := &auth.RegistryOptions{
Insecure: req.Insecure,
}
@@ -528,7 +529,7 @@ func PushModelHandler(c *gin.Context) {
ch <- r
}
regOpts := &RegistryOptions{
regOpts := &auth.RegistryOptions{
Insecure: req.Insecure,
}