Skip to content

Commit

Permalink
Merge pull request #62 from philippgille/improve-minimal-example
Browse files Browse the repository at this point in the history
Add missing error check in minimal example
  • Loading branch information
philippgille authored Mar 23, 2024
2 parents f971ad9 + c967487 commit 2b31168
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 2b31168

Please sign in to comment.