Skip to content

Commit

Permalink
chore: Enhancing the error message with context about embedding query
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Jun 26, 2024
1 parent 4893b58 commit d38fa45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chroma.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ func (c *Collection) QueryWithOptions(ctx context.Context, queryOptions ...types
ctx, cancel := context.WithTimeout(ctx, types.DefaultTimeout)
defer cancel()
if len(b.QueryEmbeddings) == 0 && c.EmbeddingFunction == nil {
return nil, fmt.Errorf("embedding function is not set. Please configure the embedding function when you get or create the collection")
return nil, fmt.Errorf("embedding function is not set. Please configure the embedding function when you get or create the collection, or provide the query embeddings")
}
embds, embErr := c.EmbeddingFunction.EmbedDocuments(ctx, b.QueryTexts)
if embErr != nil {
Expand Down

0 comments on commit d38fa45

Please sign in to comment.