MCPcopy Create free account
hub / github.com/TIGER-AI-Lab/TheoremExplainAgent / __init__

Method __init__

src/rag/vector_store.py:37–54  ·  view source on GitHub ↗
(self, 
                 chroma_db_path: str = "chroma_db",
                 manim_docs_path: str = "rag/manim_docs",
                 embedding_model: str = "text-embedding-ada-002",
                 trace_id: str = None,
                 session_id: str = None,
                 use_langfuse: bool = True,
                 helper_model = None)

Source from the content-addressed store, hash-verified

35 """
36
37 def __init__(self,
38 chroma_db_path: str = "chroma_db",
39 manim_docs_path: str = "rag/manim_docs",
40 embedding_model: str = "text-embedding-ada-002",
41 trace_id: str = None,
42 session_id: str = None,
43 use_langfuse: bool = True,
44 helper_model = None):
45 self.chroma_db_path = chroma_db_path
46 self.manim_docs_path = manim_docs_path
47 self.embedding_model = embedding_model
48 self.trace_id = trace_id
49 self.session_id = session_id
50 self.use_langfuse = use_langfuse
51 self.helper_model = helper_model
52 self.enc = tiktoken.encoding_for_model("gpt-4")
53 self.plugin_stores = {}
54 self.vector_store = self._load_or_create_vector_store()
55
56 def _load_or_create_vector_store(self):
57 """Loads existing or creates new ChromaDB vector stores.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected