File size: 462 Bytes
67e93c9
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import logging
logging.basicConfig(level=logging.ERROR)
from langchain_chroma import Chroma
from langchain_google_genai import GoogleGenerativeAIEmbeddings
import os
from dotenv import load_dotenv

load_dotenv()

emb = GoogleGenerativeAIEmbeddings(model="models/gemini-embedding-2-preview")
db = Chroma(persist_directory="data/viking_context/chroma_fallback", embedding_function=emb)
count = db._collection.count()
print(f"Total embedded chunks in DB: {count}")