(base) antdx@M3Pro-AntDX316 visionosdocsgpt-cli % python main.py
Traceback (most recent call last):
File "/Users/antdx/visionosdocsgpt-cli/main.py", line 26, in <module>
pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENVIRONMENT)
File "/Users/antdx/anaconda3/lib/python3.11/site-packages/pinecone/deprecation_warnings.py", line 38, in init
raise AttributeError(msg)
AttributeError: init is no longer a top-level attribute of the pinecone package.
Please create an instance of the Pinecone class instead.
Example:
import os
from pinecone import Pinecone, ServerlessSpec
pc = Pinecone(
api_key=os.environ.get("PINECONE_API_KEY")
)
# Now do stuff
if 'my_index' not in pc.list_indexes().names():
pc.create_index(
name='my_index',
dimension=1536,
metric='euclidean',
spec=ServerlessSpec(
cloud='aws',
region='us-west-2'
)
)