MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / __post_init__

Method __post_init__

LightRAG/lightrag/storage.py:70–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 cosine_better_than_threshold: float = 0.2
69
70 def __post_init__(self):
71 self._client_file_name = os.path.join(
72 self.global_config["working_dir"], f"vdb_{self.namespace}.json"
73 )
74 self._max_batch_size = self.global_config["embedding_batch_num"]
75 self._client = NanoVectorDB(
76 self.embedding_func.embedding_dim, storage_file=self._client_file_name
77 )
78 self.cosine_better_than_threshold = self.global_config.get(
79 "cosine_better_than_threshold", self.cosine_better_than_threshold
80 )
81
82 async def upsert(self, data: dict[str, dict]):
83 logger.info(f"Inserting {len(data)} vectors to {self.namespace}")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected