I’m trying to use pinecone pod based index and run through this error in azure container apps. any idea why?
Error searching for documents: Passing index_api is no longer
supported. Please pass individual settings such as proxy_url,
proxy_headers, ssl_ca_certs, and ssl_verify directly to the Pinecone
constructor as keyword arguments. See the README at
https://github.com/pinecone-io/pinecone-python-client/blob/main/README.
md for examples.
with following code :
class VectorService:
def __init__(self):
self.settings = Settings()
@lru_cache(maxsize=100)
def get_vector_db(self, index_name: str) -> PineconeDb:
try:
return PineconeDb(
name="hardcode index name here",
namespace=index_name,
dimension=self.settings.VECTOR_DB_DIMENSION,
metric="dotproduct",
spec=PodSpec(
pod_type="s1.x1", environment="asia-southeast1-gcp", replicas=3
),
api_key=self.settings.PINECONE_API_KEY,
use_hybrid_search=False,
)
except Exception as e:
logger.error(f"Error initializing PineconeDb: {str(e)}")
raise