-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add sparseVector
to QueryByVectorValues
type
#236
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…er (#234) ## Problem We want to allow `:` in `sourceTags` that are applied to user-agent headers on network requests. ## Solution - Update `normalizeSourceTag` function to allow `:` as an accepted character. - Add new unit test permutation to validate functionality. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Test locally using the TyepScript repl with `PINECONE_DEBUG` and `PINECONE_DEBUG_CURL` to monitor network traffic: ![Screenshot 2024-06-26 at 7 17 05 PM](https://github.com/pinecone-io/pinecone-ts-client/assets/119623786/e8014ff2-c623-4522-8361-7ea602b27e4b) --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1207476368919278
jhamon
approved these changes
Jul 3, 2024
austin-denoble
commented
Jul 3, 2024
@@ -173,11 +173,6 @@ describe('IndexHostSingleton', () => { | |||
expect(mockDescribeIndex).toHaveBeenNthCalledWith(1, 'index-1'); | |||
expect(mockDescribeIndex).toHaveBeenNthCalledWith(2, 'index-2'); | |||
|
|||
console.log( |
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.
whoops, must have left this in previously 😅
mcpaddy
approved these changes
Jul 4, 2024
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.
Very nice.
2 tasks
2 tasks
austin-denoble
added a commit
that referenced
this pull request
Jul 15, 2024
## Problem `sparseVector?: RecordSparseValues` was left out of the `QueryByVectorValues` type. While the API supports sending `sparseVector` with query requests, if you attempt to compile the client with TypeScript you'll get a build error. Issue: #218 ## Solution - Update the `QueryByVectorValues` type to include `sparseVector?: RecordSparseValues`. This should allow users to pass a `sparseVector` along with their `query` operation if needed. - Update `query` docstring + integration tests. ## Type of Change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Verify CI integration tests pass. I added `sparseVector` to several of our happy-path `query` tests. Testing this via the repl wasn't sufficient as you could pass the value directly, and you don't get TS build errors. To properly test you'll need a TypeScript project that uses the Pinecone SDK, and queries with a `sparseVector` in the request object. `tsc` will fail if using the previous client.
austin-denoble
added a commit
that referenced
this pull request
Jul 19, 2024
## Problem `sparseVector?: RecordSparseValues` was left out of the `QueryByVectorValues` type. While the API supports sending `sparseVector` with query requests, if you attempt to compile the client with TypeScript you'll get a build error. Issue: #218 ## Solution - Update the `QueryByVectorValues` type to include `sparseVector?: RecordSparseValues`. This should allow users to pass a `sparseVector` along with their `query` operation if needed. - Update `query` docstring + integration tests. ## Type of Change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Verify CI integration tests pass. I added `sparseVector` to several of our happy-path `query` tests. Testing this via the repl wasn't sufficient as you could pass the value directly, and you don't get TS build errors. To properly test you'll need a TypeScript project that uses the Pinecone SDK, and queries with a `sparseVector` in the request object. `tsc` will fail if using the previous client.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
sparseVector?: RecordSparseValues
was left out of theQueryByVectorValues
type. While the API supports sendingsparseVector
with query requests, if you attempt to compile the client with TypeScript you'll get a build error.Issue: #218
Solution
QueryByVectorValues
type to includesparseVector?: RecordSparseValues
. This should allow users to pass asparseVector
along with theirquery
operation if needed.query
docstring + integration tests.Type of Change
Test Plan
Verify CI integration tests pass. I added
sparseVector
to several of our happy-pathquery
tests.Testing this via the repl wasn't sufficient as you could pass the value directly, and you don't get TS build errors.
To properly test you'll need a TypeScript project that uses the Pinecone SDK, and queries with a
sparseVector
in the request object.tsc
will fail if using the previous client.