add embedding_bathc_num and embedding_func_max_async to env
Browse files- lightrag/lightrag.py +2 -2
lightrag/lightrag.py
CHANGED
@@ -183,10 +183,10 @@ class LightRAG:
|
|
183 |
embedding_func: EmbeddingFunc | None = field(default=None)
|
184 |
"""Function for computing text embeddings. Must be set before use."""
|
185 |
|
186 |
-
embedding_batch_num: int = field(default=32)
|
187 |
"""Batch size for embedding computations."""
|
188 |
|
189 |
-
embedding_func_max_async: int = field(default=16)
|
190 |
"""Maximum number of concurrent embedding function calls."""
|
191 |
|
192 |
embedding_cache_config: dict[str, Any] = field(
|
|
|
183 |
embedding_func: EmbeddingFunc | None = field(default=None)
|
184 |
"""Function for computing text embeddings. Must be set before use."""
|
185 |
|
186 |
+
embedding_batch_num: int = field(default=int(os.getenv("EMBEDDING_BATCH_NUM", 32)))
|
187 |
"""Batch size for embedding computations."""
|
188 |
|
189 |
+
embedding_func_max_async: int = field(default=int(os.getenv("EMBEDDING_FUNC_MAX_ASYNC", 16)))
|
190 |
"""Maximum number of concurrent embedding function calls."""
|
191 |
|
192 |
embedding_cache_config: dict[str, Any] = field(
|