Find answers from the community

s
F
Y
a
P
Updated 2 years ago

Hello jerryjliu98 9313 I get an null

Hello @jerryjliu0 I get an null response whenever I try to query when I try to query the pinecone namespace. Here's the code:

indexer = GPTPineconeIndex('', pinecone_index=self.index, pinecone_kwargs={'namespace': self.namespace}) response = indexer.query(self.query) print(response) return response

Am I missing anything?
j
o
4 comments
hi, so i'm assuming the pinecone index already has documents loaded in it? in which case could you try GPTPineconeIndex([], ...) (not sure if your first argument was supposed to be an empty string)
@jerryjliu0 yes you assumed right, when I query a pinecone index without a namespace, I get a response but when I query an index with a namespace, that is when I get null response.

Went through the code and I see a pinecode_kwargs argument for GPTPineconeIndex, however, I am not sure that argument is used when querying.

Is it possible that GPTPineconeIndex always query the default namespace which is an empty string?
oh i see what you're saying. i think you also need to specify pinecone_kwargs during the index.query call
This works!! πŸ™ πŸ™
Add a reply
Sign up and join the conversation on Discord