Skip to content

Commit 24b54dc

Browse files
committed
fix
1 parent 6fc5365 commit 24b54dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

embedder/llamacpp/llamacpp.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ func (l *LlamaCppEmbedder) embed(ctx context.Context, text string) (embedder.Emb
8484
}
8585

8686
func parseEmbeddings(str string) (embedder.Embedding, error) {
87-
var output output
88-
err := json.Unmarshal([]byte(str), &output)
87+
var out output
88+
err := json.Unmarshal([]byte(str), &out)
8989
if err != nil {
9090
return nil, err
9191
}
9292

93-
if len(output.Data) != 1 {
93+
if len(out.Data) != 1 {
9494
return nil, errors.New("no embeddings found")
9595
}
9696

97-
return output.Data[0].Embedding, nil
97+
return out.Data[0].Embedding, nil
9898
}

0 commit comments

Comments
 (0)