Hi,
I am able to create index using the below code & I can see its status as active, however when I am upserting or even querying(after inserting the data from Pinecone UI), I am getting the same issue as above.
Application: Search Application
API Key: tried with both default and key1
Index: langchain-1
Create Index
config = OpenApiConfiguration.get_default_copy()
** config.proxy = “http://xxxx.com:8080”**
** config.verify_ssl=False**
** pinecone.init(api_key=self.pinecone_apikey,**
** environment=self.pinecone_env,**
** openapi_config= config,**
** )**
** if index_name not in pinecone.list_indexes():**
** pinecone.create_index(name=index_name, metric=“cosine”, dimension=384) #dimension=1536**
** print(pinecone.describe_index(index_name))**
** index = pinecone.Index(index_name)**
Upserting:
index = pinecone.Index(index_name)
sentences = ['This is an example sentence', 'This is another example sentence']
model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
embeddings = model.encode(sentences).tolist()
for i in range(len(sentences)):
index.upsert(
vectors=[(i, embeddings[i])],
namespace="chaindemo"
)
Querying
index = pinecone.Index(index_name)
query_response = index.query(
namespace="chaindemo",
top_k=1,
include_values=True,
include_metadata=True,
id="1000"
# vector=[0.1, 0.2, 0.3, 0.4],
# filter={
# "genre": {"$in": ["comedy", "documentary", "drama"]}
# }
)