mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-27 14:05:00 +00:00
feat: move llama to a grpc
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
b816009db0
commit
58f6aab637
13 changed files with 454 additions and 340 deletions
|
@ -2,13 +2,11 @@ package model
|
|||
|
||||
import (
|
||||
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
|
||||
llama "github.com/go-skynet/go-llama.cpp"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
backendString string
|
||||
modelFile string
|
||||
llamaOpts []llama.ModelOption
|
||||
threads uint32
|
||||
assetDir string
|
||||
|
||||
|
@ -35,12 +33,6 @@ func WithLoadGRPCOpts(opts *pb.ModelOptions) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithLlamaOpts(opts ...llama.ModelOption) Option {
|
||||
return func(o *Options) {
|
||||
o.llamaOpts = append(o.llamaOpts, opts...)
|
||||
}
|
||||
}
|
||||
|
||||
func WithThreads(threads uint32) Option {
|
||||
return func(o *Options) {
|
||||
o.threads = threads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue