mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-25 04:54:59 +00:00
debug
This commit is contained in:
parent
e459f114cd
commit
c71c729bc2
4 changed files with 46 additions and 69 deletions
|
@ -3,7 +3,9 @@ package tts
|
|||
// 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 (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-skynet/LocalAI/pkg/grpc/base"
|
||||
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
|
||||
|
@ -16,6 +18,9 @@ type Piper struct {
|
|||
}
|
||||
|
||||
func (sd *Piper) Load(opts *pb.ModelOptions) error {
|
||||
if filepath.Ext(opts.Model) != ".onnx" {
|
||||
return fmt.Errorf("unsupported model type %s (should end with .onnx)", opts.Model)
|
||||
}
|
||||
var err error
|
||||
// Note: the Model here is a path to a directory containing the model files
|
||||
sd.piper, err = New(opts.LibrarySearchPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue