mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-29 22:20:43 +00:00
fix: add backend to autoload
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
fab26ac6fe
commit
b728bfa7b0
2 changed files with 5 additions and 3 deletions
|
@ -555,9 +555,10 @@ var _ = Describe("API test", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("returns errors", func() {
|
It("returns errors", func() {
|
||||||
|
backends := len(model.AutoLoadBackends)
|
||||||
_, err := client.CreateCompletion(context.TODO(), openai.CompletionRequest{Model: "foomodel", Prompt: "abcdedfghikl"})
|
_, err := client.CreateCompletion(context.TODO(), openai.CompletionRequest{Model: "foomodel", Prompt: "abcdedfghikl"})
|
||||||
Expect(err).To(HaveOccurred())
|
Expect(err).To(HaveOccurred())
|
||||||
Expect(err.Error()).To(ContainSubstring("error, status code: 500, message: could not load model - all backends returned error: 12 errors occurred:"))
|
Expect(err.Error()).To(ContainSubstring(fmt.Sprintf("error, status code: 500, message: could not load model - all backends returned error: %d errors occurred:", backends)))
|
||||||
})
|
})
|
||||||
It("transcribes audio", func() {
|
It("transcribes audio", func() {
|
||||||
if runtime.GOOS != "linux" {
|
if runtime.GOOS != "linux" {
|
||||||
|
|
|
@ -48,7 +48,7 @@ const (
|
||||||
//GGLLMFalconBackend = "falcon"
|
//GGLLMFalconBackend = "falcon"
|
||||||
)
|
)
|
||||||
|
|
||||||
var autoLoadBackends []string = []string{
|
var AutoLoadBackends []string = []string{
|
||||||
LlamaBackend,
|
LlamaBackend,
|
||||||
Gpt4All,
|
Gpt4All,
|
||||||
RwkvBackend,
|
RwkvBackend,
|
||||||
|
@ -56,6 +56,7 @@ var autoLoadBackends []string = []string{
|
||||||
WhisperBackend,
|
WhisperBackend,
|
||||||
GPTNeoXBackend,
|
GPTNeoXBackend,
|
||||||
BertEmbeddingsBackend,
|
BertEmbeddingsBackend,
|
||||||
|
LlamaMasterBackend,
|
||||||
FalconGGMLBackend,
|
FalconGGMLBackend,
|
||||||
GPTJBackend,
|
GPTJBackend,
|
||||||
Gpt2Backend,
|
Gpt2Backend,
|
||||||
|
@ -218,7 +219,7 @@ func (ml *ModelLoader) GreedyLoader(opts ...Option) (*grpc.Client, error) {
|
||||||
ml.mu.Unlock()
|
ml.mu.Unlock()
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
for _, b := range autoLoadBackends {
|
for _, b := range AutoLoadBackends {
|
||||||
if b == BloomzBackend || b == WhisperBackend || b == RwkvBackend { // do not autoload bloomz/whisper/rwkv
|
if b == BloomzBackend || b == WhisperBackend || b == RwkvBackend { // do not autoload bloomz/whisper/rwkv
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue