pinecone-io / pinecone-python-client

The Pinecone Python client
https://www.pinecone.io/docs
Apache License 2.0
306 stars 80 forks source link

Query method to accepts kwargs only #283

Closed jhamon closed 9 months ago

jhamon commented 9 months ago

Problem

Ever since I corrected a problem with top_k param not actually being optional and therefore needing to come first in the parameters list, people updating notebooks have been running into a lot of confusing errors. It seems that many people were relying on positional arguments with the query vector as the first param.

Solution

For query to accept kwargs only. This will at least give people an error message that makes sense instead of the one they currently see about passing two top_k values.

Type of Change

Testing

Will do manual testing in collab to examine the errors that now occur when passing incorrect values.