Skip to content

Commit

Permalink
chore: fix go.mod module (#2635)
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <[email protected]>
  • Loading branch information
sozercan authored Jun 23, 2024
1 parent eb4cd78 commit 5866fc8
Show file tree
Hide file tree
Showing 125 changed files with 456 additions and 498 deletions.
34 changes: 17 additions & 17 deletions .github/ci/modelslist.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var modelPageTemplate string = `
<div class="container mx-auto px-4 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<a href="/" class="text-white text-xl font-bold"><img src="https://github.com/go-skynet/LocalAI/assets/2420543/0966aa2a-166e-4f99-a3e5-6c915fc997dd" alt="LocalAI Logo" class="h-10 mr-3 border-2 border-gray-300 shadow rounded"></a>
<a href="/" class="text-white text-xl font-bold"><img src="https://github.com/mudler/LocalAI/assets/2420543/0966aa2a-166e-4f99-a3e5-6c915fc997dd" alt="LocalAI Logo" class="h-10 mr-3 border-2 border-gray-300 shadow rounded"></a>
<a href="/" class="text-white text-xl font-bold">LocalAI</a>
</div>
<!-- Menu button for small screens -->
Expand All @@ -92,9 +92,9 @@ var modelPageTemplate string = `
<!-- Collapsible menu for small screens -->
<div class="hidden lg:hidden" id="mobile-menu">
<div class="pt-4 pb-3 border-t border-gray-700">
<a href="https://localai.io" class="block text-gray-400 hover:text-white px-3 py-2 rounded mt-1" target="_blank" ><i class="fas fa-book-reader pr-2"></i> Documentation</a>
</div>
</div>
</div>
Expand All @@ -116,15 +116,15 @@ var modelPageTemplate string = `
🖼️ Available {{.AvailableModels}} models</i> <a href="https://localai.io/models/" target="_blank" >
<i class="fas fa-circle-info pr-2"></i>
</a></h2>
</a></h2>
<h3>
<h3>
Refer to the Model gallery <a href="https://localai.io/models/" target="_blank" ><i class="fas fa-circle-info pr-2"></i></a> for more information on how to use the models with LocalAI.<br>
You can install models with the CLI command <code>local-ai models install <model-name></code>. or by using the WebUI.
</h3>
<input class="form-control appearance-none block w-full mt-5 px-3 py-2 text-base font-normal text-gray-300 pb-2 mb-5 bg-gray-800 bg-clip-padding border border-solid border-gray-600 rounded transition ease-in-out m-0 focus:text-gray-300 focus:bg-gray-900 focus:border-blue-500 focus:outline-none" type="search"
<input class="form-control appearance-none block w-full mt-5 px-3 py-2 text-base font-normal text-gray-300 pb-2 mb-5 bg-gray-800 bg-clip-padding border border-solid border-gray-600 rounded transition ease-in-out m-0 focus:text-gray-300 focus:bg-gray-900 focus:border-blue-500 focus:outline-none" type="search"
id="searchbox" placeholder="Live search keyword..">
<div class="dark grid grid-cols-1 grid-rows-1 md:grid-cols-3 block rounded-lg shadow-secondary-1 dark:bg-surface-dark">
{{ range $_, $model := .Models }}
Expand All @@ -139,10 +139,10 @@ var modelPageTemplate string = `
</div>
<div class="p-6 text-surface dark:text-white">
<h5 class="mb-2 text-xl font-medium leading-tight">{{$model.Name}}</h5>
<p class="mb-4 text-base truncate">{{ $model.Description }}</p>
</div>
<div class="px-6 pt-4 pb-2">
Expand Down Expand Up @@ -178,7 +178,7 @@ var modelPageTemplate string = `
{{ $model.Description }}
</p>
<p class="text-base leading-relaxed text-gray-500 dark:text-gray-400">
To install the model with the CLI, run: <br>
<code> local-ai models install {{$model.Name}} </code> <br>
Expand All @@ -193,7 +193,7 @@ var modelPageTemplate string = `
<ul>
{{ range $_, $u := $model.URLs }}
<li><a href="{{ $u }}" target=_blank><i class="fa-solid fa-link"></i> {{ $u }}</a></li>
{{ end }}
{{ end }}
</ul>
</p>
</div>
Expand All @@ -209,7 +209,7 @@ var modelPageTemplate string = `
</div>
</div>
</div>
{{ end }}
{{ end }}
</div>
</div>
Expand All @@ -221,10 +221,10 @@ var lazyLoadInstance = new LazyLoad({
});
let cards = document.querySelectorAll('.box')
function liveSearch() {
let search_query = document.getElementById("searchbox").value;
//Use innerText if all contents are visible
//Use textContent for including hidden elements
for (var i = 0; i < cards.length; i++) {
Expand All @@ -238,8 +238,8 @@ function liveSearch() {
}
//A little delay
let typingTimer;
let typeInterval = 500;
let typingTimer;
let typeInterval = 500;
let searchInput = document.getElementById('searchbox');
searchInput.addEventListener('keyup', () => {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/image/stablediffusion/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions backend/go/image/stablediffusion/stablediffusion.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
// This is a wrapper to statisfy the GRPC service interface
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
import (
"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/go-skynet/LocalAI/pkg/stablediffusion"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/stablediffusion"
)

type Image struct {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/image/tinydream/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions backend/go/image/tinydream/tinydream.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
// This is a wrapper to statisfy the GRPC service interface
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
import (
"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/go-skynet/LocalAI/pkg/tinydream"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/tinydream"
)

type Image struct {
Expand Down
4 changes: 2 additions & 2 deletions backend/go/llm/bert/bert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
bert "github.com/go-skynet/go-bert.cpp"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
)

type Embeddings struct {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/bert/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions backend/go/llm/gpt4all/gpt4all.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
"fmt"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
gpt4all "github.com/nomic-ai/gpt4all/gpt4all-bindings/golang"
)

Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/gpt4all/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions backend/go/llm/langchain/langchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"os"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/go-skynet/LocalAI/pkg/langchain"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/langchain"
)

type LLM struct {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/langchain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions backend/go/llm/llama-ggml/llama.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package main
import (
"fmt"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/go-skynet/go-llama.cpp"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
)

type LLM struct {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/llama-ggml/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/llama/llama.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"path/filepath"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/go-skynet/go-llama.cpp"
"github.com/mudler/LocalAI/pkg/grpc/base"
)

type LLM struct {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/llama/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion backend/go/llm/rwkv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions backend/go/llm/rwkv/rwkv.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"

"github.com/donomii/go-rwkv.cpp"
"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
)

const tokenizerSuffix = ".tokenizer.json"
Expand Down
2 changes: 1 addition & 1 deletion backend/go/stores/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"flag"
"os"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
Expand Down
4 changes: 2 additions & 2 deletions backend/go/stores/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"math"
"slices"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"

"github.com/rs/zerolog/log"
)
Expand Down
2 changes: 1 addition & 1 deletion backend/go/transcribe/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion backend/go/transcribe/transcript.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/ggerganov/whisper.cpp/bindings/go/pkg/whisper"
"github.com/go-audio/wav"
"github.com/go-skynet/LocalAI/core/schema"
"github.com/mudler/LocalAI/core/schema"
)

func ffmpegCommand(args []string) (string, error) {
Expand Down
6 changes: 3 additions & 3 deletions backend/go/transcribe/whisper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package main
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
import (
"github.com/ggerganov/whisper.cpp/bindings/go/pkg/whisper"
"github.com/go-skynet/LocalAI/core/schema"
"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/core/schema"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
)

type Whisper struct {
Expand Down
2 changes: 1 addition & 1 deletion backend/go/tts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"flag"

grpc "github.com/go-skynet/LocalAI/pkg/grpc"
grpc "github.com/mudler/LocalAI/pkg/grpc"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions backend/go/tts/piper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"path/filepath"

"github.com/go-skynet/LocalAI/pkg/grpc/base"
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
"github.com/mudler/LocalAI/pkg/grpc/base"
pb "github.com/mudler/LocalAI/pkg/grpc/proto"
piper "github.com/mudler/go-piper"
)

Expand Down
6 changes: 3 additions & 3 deletions core/application.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package core

import (
"github.com/go-skynet/LocalAI/core/config"
"github.com/go-skynet/LocalAI/core/services"
"github.com/go-skynet/LocalAI/pkg/model"
"github.com/mudler/LocalAI/core/config"
"github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/pkg/model"
)

// The purpose of this structure is to hold pointers to all initialized services, to make plumbing easy
Expand Down
6 changes: 3 additions & 3 deletions core/backend/embeddings.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package backend
import (
"fmt"

"github.com/go-skynet/LocalAI/core/config"
"github.com/mudler/LocalAI/core/config"

"github.com/go-skynet/LocalAI/pkg/grpc"
model "github.com/go-skynet/LocalAI/pkg/model"
"github.com/mudler/LocalAI/pkg/grpc"
model "github.com/mudler/LocalAI/pkg/model"
)

func ModelEmbedding(s string, tokens []int, loader *model.ModelLoader, backendConfig config.BackendConfig, appConfig *config.ApplicationConfig) (func() ([]float32, error), error) {
Expand Down
6 changes: 3 additions & 3 deletions core/backend/image.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package backend

import (
"github.com/go-skynet/LocalAI/core/config"
"github.com/mudler/LocalAI/core/config"

"github.com/go-skynet/LocalAI/pkg/grpc/proto"
model "github.com/go-skynet/LocalAI/pkg/model"
"github.com/mudler/LocalAI/pkg/grpc/proto"
model "github.com/mudler/LocalAI/pkg/model"
)

func ImageGeneration(height, width, mode, step, seed int, positive_prompt, negative_prompt, src, dst string, loader *model.ModelLoader, backendConfig config.BackendConfig, appConfig *config.ApplicationConfig) (func() error, error) {
Expand Down
Loading

0 comments on commit 5866fc8

Please sign in to comment.