use vanity imports

This commit is contained in:
Blake Mizerany 2024-04-20 20:04:00 -07:00
parent 8645076a71
commit 425219f1ca
47 changed files with 78 additions and 78 deletions

View File

@ -20,8 +20,8 @@ import (
"runtime"
"strings"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/version"
"ollama.com/format"
"ollama.com/version"
)
// Client encapsulates client state for interacting with the ollama

View File

@ -9,8 +9,8 @@ import (
"os/signal"
"syscall"
"github.com/ollama/ollama/app/store"
"github.com/ollama/ollama/app/tray"
"ollama.com/app/store"
"ollama.com/app/tray"
)
func Run() {

View File

@ -11,7 +11,7 @@ import (
"path/filepath"
"time"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func getCLIFullPath(command string) string {

View File

@ -18,8 +18,8 @@ import (
"strings"
"time"
"github.com/ollama/ollama/auth"
"github.com/ollama/ollama/version"
"ollama.com/auth"
"ollama.com/version"
)
var (

View File

@ -4,7 +4,7 @@ package main
// go build -ldflags="-H windowsgui" .
import (
"github.com/ollama/ollama/app/lifecycle"
"ollama.com/app/lifecycle"
)
func main() {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"runtime"
"github.com/ollama/ollama/app/assets"
"github.com/ollama/ollama/app/tray/commontray"
"ollama.com/app/assets"
"ollama.com/app/tray/commontray"
)
func NewTray() (commontray.OllamaTray, error) {

View File

@ -5,7 +5,7 @@ package tray
import (
"fmt"
"github.com/ollama/ollama/app/tray/commontray"
"ollama.com/app/tray/commontray"
)
func InitPlatformTray(icon, updateIcon []byte) (commontray.OllamaTray, error) {

View File

@ -1,8 +1,8 @@
package tray
import (
"github.com/ollama/ollama/app/tray/commontray"
"github.com/ollama/ollama/app/tray/wintray"
"ollama.com/app/tray/commontray"
"ollama.com/app/tray/wintray"
)
func InitPlatformTray(icon, updateIcon []byte) (commontray.OllamaTray, error) {

View File

@ -13,8 +13,8 @@ import (
"sync"
"unsafe"
"github.com/ollama/ollama/app/tray/commontray"
"golang.org/x/sys/windows"
"ollama.com/app/tray/commontray"
)
// Helpful sources: https://github.com/golang/exp/blob/master/shiny/driver/internal/win32

View File

@ -30,12 +30,12 @@ import (
"golang.org/x/exp/slices"
"golang.org/x/term"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/progress"
"github.com/ollama/ollama/server"
"github.com/ollama/ollama/version"
"ollama.com/api"
"ollama.com/format"
"ollama.com/parser"
"ollama.com/progress"
"ollama.com/server"
"ollama.com/version"
)
func CreateHandler(cmd *cobra.Command, args []string) error {

View File

@ -14,9 +14,9 @@ import (
"github.com/spf13/cobra"
"golang.org/x/exp/slices"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/progress"
"github.com/ollama/ollama/readline"
"ollama.com/api"
"ollama.com/progress"
"ollama.com/readline"
)
type MultilineState int

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func TestExtractFilenames(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
"os/exec"
"strings"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func startApp(ctx context.Context, client *api.Client) error {

View File

@ -6,7 +6,7 @@ import (
"context"
"fmt"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func startApp(ctx context.Context, client *api.Client) error {

View File

@ -10,7 +10,7 @@ import (
"strings"
"syscall"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func startApp(ctx context.Context, client *api.Client) error {

View File

@ -13,8 +13,8 @@ import (
"google.golang.org/protobuf/proto"
"github.com/ollama/ollama/convert/sentencepiece"
"github.com/ollama/ollama/llm"
"ollama.com/convert/sentencepiece"
"ollama.com/llm"
)
type Params struct {

View File

@ -12,7 +12,7 @@ import (
"github.com/pdevine/tensor"
"github.com/pdevine/tensor/native"
"github.com/ollama/ollama/llm"
"ollama.com/llm"
)
type GemmaModel struct {

View File

@ -14,7 +14,7 @@ import (
"github.com/pdevine/tensor/native"
"github.com/x448/float16"
"github.com/ollama/ollama/llm"
"ollama.com/llm"
)
type LlamaModel struct {

View File

@ -13,7 +13,7 @@ import (
"github.com/pdevine/tensor/native"
"github.com/x448/float16"
"github.com/ollama/ollama/llm"
"ollama.com/llm"
)
type MistralModel struct {

View File

@ -16,7 +16,7 @@ import (
"github.com/mitchellh/mapstructure"
"github.com/x448/float16"
"github.com/ollama/ollama/llm"
"ollama.com/llm"
)
type safetensorWriterTo struct {

View File

@ -15,7 +15,7 @@ import (
"github.com/nlpodyssey/gopickle/types"
"github.com/x448/float16"
"github.com/ollama/ollama/llm"
"ollama.com/llm"
)
type torchWriterTo struct {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"log"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func main() {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"log"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func main() {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"log"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func main() {

View File

@ -6,7 +6,7 @@ import (
"log"
"os"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func main() {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"log"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func main() {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/ollama/ollama
module ollama.com
go 1.22

View File

@ -21,7 +21,7 @@ import (
"sync"
"unsafe"
"github.com/ollama/ollama/format"
"ollama.com/format"
)
type handles struct {

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func TestOrcaMiniBlueSky(t *testing.T) {

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func TestContextExhaustion(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"testing"
"time"
"github.com/ollama/ollama/api"
"github.com/stretchr/testify/require"
"ollama.com/api"
)
func TestIntegrationMultimodal(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
// TODO - this would ideally be in the llm package, but that would require some refactoring of interfaces in the server

View File

@ -21,9 +21,9 @@ import (
"testing"
"time"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/app/lifecycle"
"github.com/stretchr/testify/assert"
"ollama.com/api"
"ollama.com/app/lifecycle"
)
func FindPort() string {

View File

@ -14,7 +14,7 @@ import (
"golang.org/x/exp/slices"
"golang.org/x/sync/errgroup"
"github.com/ollama/ollama/gpu"
"ollama.com/gpu"
)
var errPayloadMissing = fmt.Errorf("expected payloads not included in this build of ollama")

View File

@ -21,9 +21,9 @@ import (
"strings"
"time"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/gpu"
"ollama.com/api"
"ollama.com/format"
"ollama.com/gpu"
)
// LlamaServer is an instance of the llama.cpp server

View File

@ -3,8 +3,8 @@ package main
import (
"context"
"github.com/ollama/ollama/cmd"
"github.com/spf13/cobra"
"ollama.com/cmd"
)
func main() {

View File

@ -11,7 +11,7 @@ import (
"time"
"github.com/gin-gonic/gin"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
type Error struct {

View File

@ -6,8 +6,8 @@ import (
"strings"
"time"
"github.com/ollama/ollama/format"
"golang.org/x/term"
"ollama.com/format"
)
type Bar struct {

View File

@ -15,8 +15,8 @@ import (
"strings"
"time"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/auth"
"ollama.com/api"
"ollama.com/auth"
)
type registryChallenge struct {

View File

@ -21,8 +21,8 @@ import (
"golang.org/x/sync/errgroup"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/format"
"ollama.com/api"
"ollama.com/format"
)
const maxRetries = 6

View File

@ -24,12 +24,12 @@ import (
"golang.org/x/exp/slices"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/convert"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/llm"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/version"
"ollama.com/api"
"ollama.com/convert"
"ollama.com/format"
"ollama.com/llm"
"ollama.com/parser"
"ollama.com/version"
)
type registryOptions struct {

View File

@ -7,7 +7,7 @@ import (
"text/template"
"text/template/parse"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
// isResponseNode checks if the node contains .Response

View File

@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ollama/ollama/api"
"ollama.com/api"
)
func TestPrompt(t *testing.T) {

View File

@ -27,12 +27,12 @@ import (
"github.com/gin-gonic/gin"
"golang.org/x/exp/slices"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/gpu"
"github.com/ollama/ollama/llm"
"github.com/ollama/ollama/openai"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/version"
"ollama.com/api"
"ollama.com/gpu"
"ollama.com/llm"
"ollama.com/openai"
"ollama.com/parser"
"ollama.com/version"
)
var mode string = gin.DebugMode

View File

@ -16,9 +16,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/version"
"ollama.com/api"
"ollama.com/parser"
"ollama.com/version"
)
func Test_Routes(t *testing.T) {

View File

@ -16,9 +16,9 @@ import (
"sync/atomic"
"time"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/format"
"golang.org/x/sync/errgroup"
"ollama.com/api"
"ollama.com/format"
)
var blobUploadManager sync.Map

View File

@ -12,7 +12,7 @@ import (
"strings"
"sync"
"github.com/ollama/ollama/types/structs"
"ollama.com/types/structs"
)
// Errors