Skip to content

Commit

Permalink
Add missing error check in minimal example
Browse files Browse the repository at this point in the history
  • Loading branch information
philippgille committed Mar 23, 2024
1 parent f971ad9 commit c967487
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/minimal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func main() {
panic(err)
}

c.AddDocuments(ctx, []chromem.Document{
err = c.AddDocuments(ctx, []chromem.Document{
{
ID: "1",
Content: "The sky is blue because of Rayleigh scattering.",
Expand All @@ -28,6 +28,9 @@ func main() {
Content: "Leaves are green because chlorophyll absorbs red and blue light.",
},
}, runtime.NumCPU())
if err != nil {
panic(err)
}

res, err := c.Query(ctx, "Why is the sky blue?", 1, nil, nil)
if err != nil {
Expand Down

0 comments on commit c967487

Please sign in to comment.