notebooklm-fast / check_users.py
jashdoshi77
Update UI styling and message formatting improvements
abc646e
raw
history blame contribute delete
956 Bytes
"""Check what users exist in the system."""
from services.chroma_service import ChromaService
def check_users():
print("Connecting to ChromaDB...")
c = ChromaService()
# Get all users
users = c.users_collection.get()
print(f"\nTotal users: {len(users['ids'])}")
for i, uid in enumerate(users['ids']):
meta = users['metadatas'][i]
print(f" User ID: {uid}")
print(f" Username: {meta.get('username')}")
print(f" Role: {meta.get('role')}")
print()
# Check buckets for first user
if users['ids']:
first_user = users['ids'][0]
buckets = c.buckets_collection.get(where={"user_id": first_user})
print(f"\nBuckets for user {first_user}:")
for i, bid in enumerate(buckets['ids']):
print(f" Bucket ID: {bid}")
print(f" Name: {buckets['metadatas'][i].get('name')}")
if __name__ == "__main__":
check_users()