-
-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vectorstores:weaviate|pinecone): do not return error when zero documents are retrieved #1077
Conversation
@mdelapenya it looks like pinecone also returns error when no documents are found: langchaingo/vectorstores/pinecone/pinecone.go Line 172 in 238d1c7
Can you also change the implementation there before we merge? |
Sure thing, will add a commit with that ASAP Thanks for your work here |
* main: Comment should end in a period handle callbacks comment public symbols gofmt review changes add doc.go api key as option fix lint fix data race for accessToken add fail test case to r/w accessToken from some goroutines chains_test: use mutex to lock openaiclient: fix data race at createChat ci: add -race flat go test in CI Implement perplexity agent tool
@FluffyKebab I added the changes to pinecone too. PLMK if you need anything else 🙏 Cheers! |
@@ -22,6 +22,7 @@ var ( | |||
ErrEmbedderWrongNumberVectors = errors.New( | |||
"number of vectors from embedder does not match number of documents", | |||
) | |||
// Deprecated: ErrEmptyResponse is not used anymore and will be removed in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not removing this field although it's not used anymore, but as public API, I thought the deprecation path is the way to go.
In any case, PLMK if I should proceed in any other way
PR Checklist
memory: add interfaces for X, Y
orutil: add whizzbang helpers
).Fixes #123
).golangci-lint
checks.What is this PR doing?
It reverse the logic in Weaviate and Pinecone stores to not return an error if zero docs are retrieved from a SimilaritySearch.
Closes #1065