Skip to main content
Glama

LiveKit RAG Assistant

by THENABILMAN
clear_pinecone.py•1.34 kB
""" Clear all vectors from Pinecone index """ import os from dotenv import load_dotenv from pinecone import Pinecone load_dotenv() PINECONE_API_KEY = os.environ.get("PINECONE_API_KEY") PINECONE_INDEX_NAME = os.environ.get("PINECONE_INDEX_NAME") or os.environ.get("PINECONE_INDEX", "livekit-docs") if not PINECONE_API_KEY: print("āŒ PINECONE_API_KEY not found in .env") exit(1) print(f"šŸ—‘ļø Connecting to Pinecone index: {PINECONE_INDEX_NAME}...") try: pc = Pinecone(api_key=PINECONE_API_KEY) index = pc.Index(PINECONE_INDEX_NAME) # Get index stats before deletion stats = index.describe_index_stats() vector_count = stats.get("total_vector_count", 0) print(f"šŸ“Š Current vectors in index: {vector_count}") if vector_count == 0: print("āœ… Index is already empty!") exit(0) # Delete all vectors by deleting all namespaces print("šŸ”„ Deleting all vectors...") # Delete from default namespace index.delete(delete_all=True) print("āœ… Successfully deleted all vectors from Pinecone!") # Verify deletion stats = index.describe_index_stats() vector_count = stats.get("total_vector_count", 0) print(f"āœ“ Remaining vectors: {vector_count}") except Exception as e: print(f"āŒ Error: {str(e)}") exit(1)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/THENABILMAN/THENABILMAN_LiveKit_MCP_Assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server