Skip to content

Commit

Permalink
Merge pull request #5 from philippgille/fix-nresults-arg-validation
Browse files Browse the repository at this point in the history
Fix nResults arg validation
  • Loading branch information
philippgille authored Feb 10, 2024
2 parents 9e56019 + a9a61ac commit f7f0840
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (c *Collection) Query(ctx context.Context, queryText string, nResults int,
return nil, nil
}

if nResults == 0 {
if nResults <= 0 {
return nil, errors.New("nResults must be > 0")
}

Expand Down

0 comments on commit f7f0840

Please sign in to comment.