刪除索引
如果某個索引已經過時,或許是時候刪掉它了!刪除索引也會同時刪除其中所有資料,所以在自己的專案中操作時要特別小心!
本練習屬於課程
使用 Pinecone 構建 AI 應用
練習說明
- 使用你的 API 金鑰初始化 Pinecone 連線。
- 刪除你一直在使用的索引:
"my-first-index"。 - 列出你的索引以確認它已被刪除。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Set up the client with your API key
pc = Pinecone(api_key="____")
# Delete your Pinecone index
____
# List your indexes
print(____)