Hi there, when I upsert they upsert doesn’t get uploaded… Here is what I have done
import json
from pinecone import Pinecone
pc = Pinecone(api_key="my_api_key")
index = pc.Index("blabla-bot")
filename = 'output_vectors_chunk_1.json'
# Open the file and load vectors
with open(filename, 'r') as file:
vectors = json.load(file)
index.upsert(vectors=vectors)
print(f"Upserted vectors from {filename}")
My json looks like this:
[
{
"id": "dfa273a7-0498-4726-bbec-57f57200e8c5-0",
"values": [
-0.03402634337544441,
0.05481314659118652, # etc
],
"metadata": {
"video_title": "Title of the video",
"video_url": "https://www.youtube.com/watch?v=video_id",
"original_text": "blablablabla"
}
},
{
"id": "dfa273a7-0498-4726-bbec-57f57200e8c5-1",
"values": [
-0.033837657421827316,
0.029345935210585594, # etc
This should be the correct format.
The index seems to be up and running, I checked with pc.list_indexes():
{'indexes': [{'dimension': 1536,
'host': 'blabla-bot-25ieqpn.svc.gcp-starter.pinecone.io',
'metric': 'cosine',
'name': 'blabla-bot',
'spec': {'pod': {'environment': 'gcp-starter',
'pod_type': 'starter',
'pods': 1,
'replicas': 1,
'shards': 1}},
'status': {'ready': True, 'state': 'Ready'}}]}
I’m extremely lost, according to the docs I did everything right but somehow no vectors are uploaded
The prints do get through to the code is running at least… but when I refresh my page still nothing there.
print(index.describe_index_stats())
Returns
{'dimension': 1536,
'index_fullness': 0.0,
'namespaces': {},
'total_vector_count': 0}
Any help would be greatly appreciated